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

How to prepare design document for a project enhancement without starting the coding work.

For the sequence and flow etc diagrams of the design document i need the class names, method names etc right even before starting the coding work.
any good links and references and tutorials, videos around this
please advise
0
OWASP: Forgery and Phishing
LVL 12
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

visio 2013 standard does not show the "UML Sequence" template as shown below
https://www.youtube.com/watch?v=_xtZIDI8Ajg
only professional viso 2013 shows it?
are there existing sample diagrams which i can use as sample and modify on top of them easily?
any alternate tool to draw these type of diagrams easily apart from visio like free open source tools?
Please advise
0
how to understand big new project code quickly and effectively to write new enhancement to existing code or to fix some defects or to debug to improve some areas of poor performance.

what are the tips and recommendations , best practices around this
Please advise
0
what is difference between below two eclipse short cuts

control +alt+h
(above does not yield any results saying members calling that method in workspace it shows at bottom again same method nothing else)

control +shift+g
(above shows like 8 references in workspace)

please advise
shortcut.png
0
Scenario:
A particular business card design can only accommodate up to three phone numbers.

Assume the phone numbers are always formatted as 10 digits with dashes. For example:
   Mobile: 456-789-1234
   Office: 987-654-3210
   Fax: 345-678-9012

There are only 2 lines to accommodate 3 phone numbers.

If (and only if) all 3 phone numbers contain a value, then the mobile and office numbers must appear on the first line, and the fax must appear on the second line, like this:
Mobile: 456-789-1234    Office: 987-654-3210
Fax: 345-678-9012

If (and only if) one of the 3 phone numbers does not contain a value, then the remaining 2 numbers must appear on their own line, like this:
Mobile: 456-789-1234
Fax: 345-678-9012

The example above assumes the Office number is the empty field. But if the Mobile number was the empty field then it would look like this:
Office: 987-654-3210
Fax: 345-678-9012

And if the Fax number was the empty field, then it would look like this:
Mobile: 456-789-1234
Office: 987-654-3210

If 2 of the 3 numbers are empty, then return just the one remaining number.

So given all of the possible phone number combinations, we have:
M   O   F
M   O
M       F
M
    O   F
    O
        F

Open in new window


I've managed to write JavaScript code using a bunch of if/then blocks, but I am sure there is an easier way to do it.
What is the most efficient code block that can return up to 3 phone numbers but follow the format rules above?
(Assume …
1
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
I have the following String.Join that I'm creating a csv export from but I'm having dificulty formating to a new line when it come the  Done By property String.Join(",", x1.StationActivity.SelectMany( y => y.ProductsUsed).Select(z => z.DoneBy))?? string.Empty,

I have included a screen shoot in what I'm trying to accomplish with my sample code.

           
                headerNames1.Add(ServiceAssistant.Tools.Language.Translate(Tools.Language.Keys.Product_Code, ViewBag));
                headerNames1.Add(ServiceAssistant.Tools.Language.Translate(Tools.Language.Keys.Description, ViewBag));
                headerNames1.Add(ServiceAssistant.Tools.Language.Translate(Tools.Language.Keys.Target, ViewBag));
                headerNames1.Add(ServiceAssistant.Tools.Language.Translate(Tools.Language.Keys.Done, ViewBag));
                var headers1 = String.Join(",", headerNames1.ToArray());

                sb.AppendLine(headers1);
                foreach (var x1 in (List<StationHistoryReportResults>)TempData["excsv"])

                {
                    var data1 = String.Join(",", new string[] {
                        //string.Format("\"{0}\"",item.B_Company),
                       
                      String.Join(",", x1.StationActivity.SelectMany( y => y.ProductsUsed).Select(z => z.ProductCode))?? string.Empty,
                      String.Join(",", x1.StationActivity.SelectMany( y => y.ProductsUsed).Select(z => z.ProductTranslatedDescription))?? string.Empty,

Open in new window

0
0
HI,
Is there any website where one can post there understanding of computer science concepts or explain them and then user can ask questions. Although expert exchange also has article section.
But i want to specifically do it for Java concepts Java 8 features etc.
The idea is to feel motivated to study it... as it helps learning the material in a quicker way
Any alternative suggestions
Thanks
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
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.

Which is the best out of the three -

Activiti
Camunda
Flowable

Is all of them support CRUD operation with default search options or filter options for any table or entity defined ?
if anyone of them has it by default, please let me know.
Does anyone knows the differences and pros and cons of the above?
Is there is any other open source is better than the above for java app?
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
try{
			
			previouslyTaken = new DataDAO().testForPkgPreviouslyTaken(this....., TimeStamp);//gives true or false boolean value
		}
		catch (XYZExceptionException xyze)
		{
			if(xyze.getMessage().contains("999"))
			{
				LOGGER.error("item is PreviouslyTaken due to aa", xyze);
				errorCodes.add(XYZConstants.PREVIOUS_TAKEN_EXISTS);				
			}
			else if(xyze.getMessage().contains("888"))
			{
				LOGGER.error("item is PreviouslyDumped due to bb", xyze);
				errorCodes.add(XYZConstants.PREVIOUSLY_DUMPED);
			}
			else
			{
				throw new XYZException(xyze);
			}	
			return ;
		}
		LOGGER.info("previouslyTaken indicator from DB {}",previouslyTaken); //coming false t me
		
		if(!previouslyTaken){
		processIt();
		else
		LOGGER.info("item taken or dumped so update status to new)

Open in new window


i have above code in a method.

i never saw if else inside a catch in earlier.

why some one use if else inside catch
when the catch is thrown as try block simply return true or false

when it has 999 or 888 etc value in the xyze exception

please advise
0
Hi,

I am working on an iOS application (in nativescript) that needs to get and post some data to an API in the background each 5 minutes. Now it seems that iOS is closing my application so I took a look at the long running tasks section of https://docs.nativescript.org/core-concepts/ios-runtime/how-to/BackgroundExecution but I fail to see how I should configure an interval now.

Also while it works correctly on the simulator (not thinking about the interval) with the debug fetch command, I can't get it to work correctly on a real device.
0
Hi,

I have got
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResul

Open in new window

with these codes
            List<HouseData> houseList = new List<HouseData>();
            try
            {
                using (SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["Mssqlconn3"].ConnectionString))
                {
                    using (SqlCommand sqlCmd = new SqlCommand("SELECT cast(ROW_NUMBER() OVER (ORDER BY house_id ASC) as int) serial_id, house_id, rent_type, house_name, area, area_unit2, clicked_times, area_unit, area_size, isnull(construct_area_size,0) construct_area_size, isnull(request_times,0) request_times, release_period_from, CONVERT(varchar,register_date,105) register_date,CONVERT(varchar,upd_date,105) upd_date, address1, address2, price, price_curr, ltrim(rtrim(cast(raised_by_user_id as varchar))) raised_by_user_id FROM house_tab where isnull(raised_by_user_id,0)=@raiser and isnull(deleted,'')<>'Y'", sqlConn))
                    

Open in new window

0
MQ under glassfish called imqdbroker not running when i double click on windows laptop.
path is
C:\Program Files\glassfish-4.0\mq\bin
i am not able to open default hosts under jms host to see that same mq that is supposed to be started
Please advise
MQ_glasfish.png
MQ_glasfish_2.png
0
hi,

I build one stateless session bean example with presentation tier html inddex page and web tier servlet within ejb web project then business tier in the ejb project


<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <form action="ConverterServlet" method="POST">
              <input type="number" name="value"></br>
              <select name="type">
                    <option value="C2F">celcius to fahrenheit</option>
                    <option value="F2C">fahrenheit  to celcius</option>
              </select></br>
              <input type="submit" value="Convert">
        </form>
            
    </body>
</html>

Open in new window


do i not need to add close tags for input html element
<input type="submit" value="Convert">

also do i not need to ad begin tag for </br>

please advise

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package servlet;

import bean.ConverterBeanLocal;
import bean.ConverterBeanLocal.ConvertType;
import java.io.IOException;
import java.io.PrintWriter;

Open in new window

0
Exploring ASP.NET Core: Fundamentals
LVL 12
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Need a python script to copy yesterday files to a destination location and gzip them in destination directory
0
one registerPhone flow goes through 30 stored procedures. Each stored proc connecting database individually and taking 100 milli seconds to connect.

so 30 multipled by 100 total 3000 milli seconds wasted due to this.

can i make all 30 stored procedures into one call so that only one database connection happens for 100 milli seconds

Like to save those 3000 milli seconds when i can do only with 100 milli seconds

Please advise
0
hi, i can get postman to POST to create a VM but using pycharm encountered this error.

code 1: obtain a token
==========================================================================
import requests
url = "https://IP/silvan/apigateway/v1.0/"
get_apis = "apis_include_throttles"

##API URLs
get_token_url = "https://iam-apigateway-proxy.domain.com/v3/auth/tokens"

create_volume_url = "https://evs.sitc-1.domain.com/v2/6d321dd88c7143ba8d6daf3e15f14be9/volumes"
delete_volume_url = "https://evs.stic-1.domain.com/v2/6d321dd88c7143ba8d6daf3e15f14be9/volumes/"
create_vm_url = "https://ecs.sitc-1.domain.com/v2/6d321dd88c7143ba8d6daf3e15f14be9/servers"



##Images Dictionary
images = {
    "Ubuntu 18.10": "5313ace4-4573-404b-abc6-8548ed14c4f7",
    "RHEL7.5-40G": "aa9d05f3-cb90-4776-9c02-617a9906b271",
    "WindowsServer2016WithGUI": "c54d05fa-5ad8-425e-be56-e60ede395230",
    "Windows10Pro": "29caef55-0617-4813-8a17-cb0bef19de16",
    "RHEL7.5": "c5ccd8a7-d8f3-4a4c-91c3-9d93303aee58",
    "Ubuntu16.04LTS": "3f8948fd-c108-48db-9951-1d617e8e5b03",
    "image-kvm-euler": "298e2912-5a7a-4178-8ac4-b260712d514c",
    "image-ManageOne": "80d9b0ee-a5b3-42fe-99ed-fc32c57da5b3",
    "esight_image": "e1e94234-f3e7-4793-8bdb-0cef9e3194cf"
}


def get_token():
    body = {
        "auth": {
            "identity": {
                "methods": [
                    "password"
                ],
                "password": {
                    "user": {
    …
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
i am learning to use Python / pycharm / PIP to provision 1000 VM through a script to call the  API but i don't know how to start doing it.
 
What is the proper way to install python with IDE, Pycharm and PIP for Windows 10?
Where to obtain the python template code to provision 1000 VMs for example for me to modify the flavours, image, types, servers, network?
How to put the digital token on the script and where & how to execute the script if is connected thr VPN client from my PC?
How to generate a private key from the python script as well?


I managed to use web POSTMAN from google chrome to test calling the API to provision some VM as stated in below.

1. Connected to Private Cloud Fusion Cloud 6.3 from Web POSTMAN

2. Obtained a digital token
POST => https://iam-apigateway-proxy.domain.com/v3/auth/tokens

{
"auth": {
"identity": {
"methods": [
"password"
],
"password": {
"user": {
"domain": {
"name": "XXX"
},
"name": "XXX",
"password": "XXX"
}
}
},
"scope": {
"project": {
"id": "XXX",
"domain": {
"name": "XXX"

3. Provisioned System Volume
POST => https://evs.domain.com/v2/cd088007d3b84e7fa894478e6fe667c4/volumes

{ "volume":
{
"size": 60,
"availability_zone": "az0.dc0",
"volume_type": "ssd",
"name":"volume1",
"multiattach": false,
"imageRef":"ca9384bd-5d78-49ce-a4c3-6d90d77c623c"
}
}

4. Provisioned VM  
POST => https://ecs.domain.com/v2/cd088007d3b84e7fa894478e6fe667c4/servers
{
"server": {
"flavorRef": …
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

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.