Programming Languages-Other

19K

Solutions

66

Articles & Videos

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 had this question after viewing VB .Net - web browser control.  Automate clicking on and manipulating popup windows after downloading .exe file.

Basically, I am trying to do almost the same thing but I don't want to wait for the "Choose File to Upload" window to load. Instead, I'd like to:

1) Wait till the window becomes available
2) Automatically hide the window and send it back once it becomes available by intercepting the opening of that window
3) Set the file location to the file upload window in the background
4) Once set, click the "Open" button (like how it is being done now)

Could someone please provide some code on this scenario as I really need to get this working.

Cheers.
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Hi,
Is there one example to read each message, one by one, for one specific text string, within Sent folder of Outlook?
0
I have a python script that will construct a list of futures contracts for a specified symbol, exchange, and year window.  The script will download pricing information from Quandl for each contract in the strip.  This script works properly.

import pandas as pd
from pandas import ExcelWriter
import quandl

symbol = 'ES'
exchange = 'CME/'

start_year = 2015
end_year = 2016


#Constructs a list of futures contract codes for a particular symbol
#and timeframe.
futures = []
months = 'HMUZ'
for y in range(start_year, end_year+1):
    for m in months:
        futures.append("%s%s%s%s" % (exchange, symbol, m, y))

#Download the data from Quandl.
for f in futures:
    quandl.ApiConfig.api_key = "xxxx"  
    data = quandl.get(str(f))
    data = data.drop(data.columns[[3, 4, 7]], axis=1)

I have another python script that will create a continuous futures contract from 2 consecutive contracts in the futures strip.  It uses the perpetual method; identifying the roll date as the first day where volume of the far contract exceeds volume of near contract, and then adjusts the prices of the previous 4 sessions to roll date by weighting the near and far contracts in increments/decrements of 20%.  This script works properly.

import pandas as pd
from pandas import ExcelWriter
import quandl

#Get quandl futures data
quandl.ApiConfig.api_key = "xxxx"    
contract_near = quandl.get("CME/ESH2015")
contract_far = quandl.get("CME/ESM2015")

#Drop the columns …
0
Hi,
Further to this
https://www.experts-exchange.com/questions/29029100/Problem-to-show-list.html?anchor=a42174635¬ificationFollowed=190745230#a42174635

and I have ImageHandler.cs like
using System;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.Data.OleDb;
using System.Xml;
using System.Globalization;
using System.Collections.Generic;
using System.Drawing;
using System.Text; // This was needed to make ASCIIEncoding function
using System.Security.Cryptography; // This was needed to make everything related to MD5 function
using System.Web.Services;

namespace Own_rec
{
    public class ImageHandler : IHttpHandler
    {
        /// <summary>
        /// You will need to configure this handler in the Web.config file of your 
        /// web and register it with IIS before being able to use it. For more information
        /// see the following link: http://go.microsoft.com/?linkid=8101007
        /// </summary>
        public void ProcessRequest(HttpContext context)
        {
            //string userId = string.Empty;
            int userId = 0;
            //-- get the ID from query string you get from <img src tag
            if (null != 

Open in new window

0
Hi,
Using these codes

        public static List<HouseData> GetHouseList()
        {
            List<HouseData> houseList = new List<HouseData>();
            using (SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["Mssqlconn3"].ConnectionString))
            {
                using (SqlCommand sqlCmd = new SqlCommand("SELECT house_name, address1, address2, price, price_curr, raised_by_user_id 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 = 

Open in new window

0
I am doing below challenge

http://codingbat.com/prob/p128270
public int[] front11(int[] a, int[] b) {
   //int[] z;
  if(a.length>0&&b.length>0){
 
 // z[0]=a[0];
 // z[1]=b[0];
 // return z;
   return new int[]{a[0],b[0]};
  }
   else if(a.length>=0&&b.length==0){
  // int[] z=new int[2];
  //z[0]=a[0];
  //z[1]=b[0];
  return new int[]{a[0]};
  }
  else if(a.length==0&&b.length>=0){
  // int[] z=new int[2];
 // z[0]=a[0];
 // z[0]=b[0];
 // return z;
   return new int[]{b[0]};
  }
  return new int[0];
  
}

Open in new window


i am failing one
how to improrve my code
Expected      Run            
front11([1, 2, 3], [7, 9, 8]) → [1, 7]      [1, 7]      OK      
front11([1], [2]) → [1, 2]      [1, 2]      OK      
front11([1, 7], []) → [1]      [1]      OK      
front11([], [2, 8]) → [2]      [2]      OK      
front11([], []) → []      ArrayIndexOutOfBoundsException: 0 (line:14)      X      
front11([3], [1, 4, 1, 9]) → [3, 1]      [3, 1]      OK      
front11([1, 4, 1, 9], []) → [1]      [1]      OK      
other tests
OK      
please advise
0
Hi,

I was working on below challenge again

http://codingbat.com/prob/p151359
public String withoutX2(String str) {
  
  if(str.length()==1&&str.charAt(0)=='x'){
    return "";
  }
  if(str.length()>=2){
  if ( str.charAt(0)=='x' && str.charAt(1)=='x' ){
  return str.substring(2);
  }else if(str.charAt(0)=='x'){
      return str.substring(1);
  }else if(str.charAt(1)=='x'){
      return str.substring(0,1)+str.substring(2);
  }
  }
  return str;
}

Open in new window

below code passes all tests
Expected      Run            
withoutX2("xHi") → "Hi"      "Hi"      OK      
withoutX2("Hxi") → "Hi"      "Hi"      OK      
withoutX2("Hi") → "Hi"      "Hi"      OK      
withoutX2("xxHi") → "Hi"      "Hi"      OK      
withoutX2("Hix") → "Hix"      "Hix"      OK      
withoutX2("xaxb") → "axb"      "axb"      OK      
withoutX2("xx") → ""      ""      OK      
withoutX2("x") → ""      ""      OK      
withoutX2("") → ""      ""      OK      
withoutX2("Hello") → "Hello"      "Hello"      OK      
withoutX2("Hexllo") → "Hexllo"      "Hexllo"      OK      
withoutX2("xHxllo") → "Hxllo"      "Hxllo"      OK      
other tests
OK      

But if i have input say z what would be output and my code fails in that scenario right

withoutX2("z") → z
public class WithoutX2 {

	public static void main(String[] args) {
		
		// TODO Auto-generated method stub
		System.out.println("Value is"+withoutX2("z"));//should get true but getting false
	}
	
	public static String withoutX2(String str) {
		  
		  if(str.length()==1&&str.charAt(0)=='x'){
		    return "";
		  }
		  if(str.length()>=2){
		  if ( str.charAt(0)=='x' && str.charAt(1)=='x' ){
		  return str.substring(2);
		  }else if(str.charAt(0)=='x'){
		      return str.substring(1);
		  }else if(str.charAt(1)=='x'){
		      return str.substring(0,1)+str.substring(2);
		  }
		  }
		  return str;
		}


}

Open in new window

0
Hi,
I tried below challenge as
http://codingbat.com/prob/p167430
public class Has271 {

	public static void main(String[] args) {
		int[] arr={1, 2, 7, 1};
		// TODO Auto-generated method stub
		System.out.println("Value is"+has271(arr));//should get true but getting false
	}
	
	public static boolean has271(int[] nums) {
		 int val=nums[0];
		 
		 for(int i=0;i<nums.length-2;i++){
		   
		   if(  (nums[i+1]==val+5)
		   && (  (Math.abs(nums[i+2]-val)<=2) )  )
		   return true;
		   continue;
		 }
		 return false;
		}


}

Open in new window


what is wrong with my above code why i am getting false instead of true?
please advise
0
Hello,

I am using MATLAB  to solve equation using (syms) then evaluating the result. The program is working. However, each loop taking almost 23 second. Is there anyway that I can optimize program so it will work faster?

I used the below code
clear;
clc;
syms A B C D E ; 
R=((4*B*A)/((D-C)^2+(B+A)^2));
R1=((4*B*A)/((D+C)^2+(B+A)^2));
F1 = ellipticK(R);
I1 = ellipticE(R);
F2 = ellipticK(R1);
I2 = ellipticE(R1);
P= ((((A*B)^(1/2))/(2*E*(R^(1/2))))*(((2 - R)*F1) -...
    (2*I1)))-(((((A*B)^(1/2))/(2*E*(R1^(1/2)))))* ...
    (((2 - R1)*F2) - (2*I2)));
P1=feval(symengine,'simplify',P,'IgnoreAnalyticConstraints');

X=(1/B)*(diff(P1,D));
X1=feval(symengine,'simplify',X,'IgnoreAnalyticConstraints');
[B,D]= meshgrid(linspace(0.1,10),linspace(0.1,10));
E=3;
N1 = 10*rand(100000,1);
N2 = 5*rand(100000,1);
M(:)=0;
for i=1:100000
    tic
    A=N1(i);C=N2(i);
    F = matlabFunction(X1);
    B = F(A, B, C, D, E);
    In(:,:,i)=B(:,:); 
    fprintf('%d\n ', i); 
    toc
end

Open in new window

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
What Is Transaction Monitoring and who needs it?
LVL 1
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

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
Dear Experts, I'mt rying to use GO to read a json file that I have.

I'm using the following code:
package main

import (
	"fmt"
	"encoding/json"
	"io/ioutil"
)

func main() {

	b, _ := ioutil.ReadFile("/home/david/jsontest/create.jsontest.campaigns.ninja.json")

	type UserData struct {
		user_id    string
		user_email string
		user_name  string
	}

	type campaign struct {
		domain      string
		Ssl         int64
		server_key  string
		certificate string
		bundle      string
		php_ver     string
		wp          int64
		lang        string
		start_date  string
		end_date    string
		description string
		user_data   UserData
		CampaignID  int64
	}

	var m campaign
	err := json.Unmarshal(b, &m)
	if err != nil {
		panic (err)
	}
	fmt.Printf("%d", m.CampaignID)
	fmt.Printf("%s",m.user_data.user_email)
}

Open in new window


When I run the code however, the Result is this:
/usr/lib/golang/bin/go run /home/david/GoglandProjects/CampaignsNinja/jsontest.go
80099700
Process finished with exit code 0

Which is correct, but partial.. I'm missing the 2nd value which should be 74 (according to the  attached JSON below)

{"domain":"jsontest.campaigns.ninja","ssl":1,"server_key":"","certificate":"","bundle":"","php_ver":"5.6","wp":1,"lang":"english","start_date":"2017-02-02","end_date":"2017-03-02","description":"This is a test","user_data":{"user_id":"74","user_email":"usertest@gmail.com","user_name":"usertest"},"CampaignID":80099700}

Any Ideas why is the code behaving that way?
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
I'm trying to read a string from a plain text file. The string contains the degree symbol(°). In the code ,it is read as ° (capital A circumflex accent and then the degree symbol). How can I just read the degree symbol?
I'm using Qt creator as the IDE and the language is FORTRAN 77
0
Hello,
I've followed the instructions below and nothing happens.  I have searched the internet and can't find much more, so I ask you;
How does one install the Selenium 3.4 javadoc in Eclipse Neon 3?
INSTRUCTIONS:
http://stackoverflow.com/questions/25781853/how-to-bind-selenium-javadoc-to-eclipse
selenium-server-3.4.0-javadoc
Navigate To:
project properties => Java Build Path => Libraries => Selenium-java-2.42.2.jar
Select Selenium-java-2.xx.x.jar & Expand it.
You will see Javadoc location option. Select it and click on Edit button.
On next window add
http://seleniumhq.github.io/selenium/docs/api/java/ 
link in javadoc location path textbox and click on Ok button.
0
Hi,
I also want to capture values of M/C/O, on either Column 3 or 4 of Sheet5. How to adjust Scan_list4, of the attached file?
Columns-Map2.xlsm
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
How to visualize call hierarchy in java using a pencil and paper all the way from beginning till end from UI to say model to controllers to dao to db calls etc including which object go in method and where the values changing etc in the new project

Please advise
0
Hi,
I am looking for String Format Method example using various date formats
https://www.javatpoint.com/java-string-format.

I found above link but no example there using the date format though like MMDDYYYY or YYYYMMDD etc to represent date?
please advise
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I have a list of 493 peeople buried in section B of the local cemetery.  I know which “lot” in the section and which of the 12 grave sites in the particular lot they are buried in.  Using Inkscape, I have drawn the names of the dead people in sections C, CE, D, and E. I was going to draw this section too but is there any way to have inkscape do it automatically from a csv file of the name, lot, and grave site that I can easily make from the spreadsheet I already have?
0
I have successfully installed LinqToXSD which is supposed to enforce strong typing and also provide a relatively easy way to create XML files but there are no classes to use "new" on which should create the document.  Does anyone know how to create a class that is an XML Document that is tied to a LinqtoXSD schema?
0
Hello,
For testing and verification purposes, I am trying to compute the count of good duplicates found in both Data1 and Data2  and in Data3, and in one or the other. These are the steps I am trying to accomplish to get to my final results:

#1.  Create a list (Data4) of unique Data1 and Data2 where variable rec_flag=A, B, C, D.
#2.  Build a duplicate (Data5) file from the list in #1 by generating a record linking each two records where Var3 and Var4 are linked to the same Var6 and Var7.
#3.  Match Data5 file with Data3 where variable rec_flag=B, C, D using key variables Var3, Var4, Var6, and Var7.
#4.  Display in the output .lis the number of records in:
     #4.1 Both Data5 and Data3
     #4.2 Data5 only
     #4.3 Data3 only
 
The issue that I am having is with #2 where I need to build a duplicate file Data5.

Here is my SAS code below with missing step #2:

libname mydir "/home/myprofile/links"; 
%macro cnt_lnks;

 /*  #1 */
proc sort data=mydir.Data1
          out=Data1out(where=(rec_flag='A', 'B', 'C', 'D') keep=Var3 Var4 Var6 Var7 rec_flag);
          by Var3 Var4 Var6 Var7;
run;

proc sort data=mydir.Data2
          out=Data2out(where=(rec_flag='A', 'B', 'C', 'D') keep=Var3 Var4 Var6 Var7 rec_flag);
          by Var3 Var4 Var6 Var7;
run;

/*********************************************
 Datastep: merge Data1 & Data2
           by Var3 Var4 Var6 Var7
 ********************************************/
data all_links1;
  merge 

Open in new window

0
Hi,

When i right click on junit test(say ProductWeightTest.java) and run as Junit test from eclipse i keep getting popup with error

error could not create the java virtual machine error a fatal exception has occurred. program will exit



when i run individual test (checkWeightLessthan10Lb) in above test ProductWeightTest.java  i keep getting initialization error in eclipse console.

i tried changing eclise .ini entries but still getting same error. please advise
0
when i run junit test class getting initializationError Runner: Junit 4

not sure why suddenly i am getting that error and how to resolve it.

please advise
0
Hi,

I have a setter method(setBeginDate) that changed by some one from calendar date object to String object.

now i have to change my unit test to reflect that by changing to String.

articleVisibleData.setBeginDate(setDateMonthYear(30, 1, 2015));

How i edit method above so that i get String

earlier method is

            public Calendar setDateMonthYear(int day, int month, int year) {
            Calendar cal = GregorianCalendar.getInstance();
            cal.clear();
            cal.set(Calendar.DAY_OF_MONTH, day);
            cal.set(Calendar.MONTH, month);
            cal.set(Calendar.YEAR, year);
            return cal;
      }

now i am trying like below but wont work


      public String setDateMonthYear(int day, int month, int year) {
            String str="";
            str= str.concatenate(date).concatenate(month).concatenate(year)
            return str;
      }


earlier from test case i used to call like

articleVisibleData.setDate(setDateMonthYear(30, 1, 2015));

please advise
0

Programming Languages-Other

19K

Solutions

66

Articles & Videos

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.