Go Premium for a chance to win a PS4. Enter to Win

x

Programming

52K

Solutions

40K

Contributors

Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.

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

Sign up to Post

Need to convert text string to Bitmap image.  I have been provided C# code, but I program in Delphi.  The data is received from a pinpad and is a signature.

I have attached a sample cs document that they provided,

Any idea on how to convert this document to delphi?  Ultimately, I pass the text to a function that returns a bitmap or initializes an existing bitmap..
TriPosSignatureGenerator.cs
0
Important Lessons on Recovering from Petya
LVL 11
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

hi,

while doing maven install i got below error
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

while doing maven clean it is success though
i follwed below steps to resolve
http://javarevisited.blogspot.com/2016/06/maven-eclipse-error-no-compiler-is-no-JRE-JDK-installed.html

how
 maven clean
maven install
maven update
are different?
why maven clean is success and no issues in doing maven update as well where as maven install complained above jre?
0
Hello
Getting the attached.  The supplier saying network related issue not programming.
Ideas?
2017_11_16_09_22_49_Error_messages_u.jpg
0
I have inserted two shapes ("Plus Sign") in cell z14 of excel 2016. As per my requirement I am using below code for shape copy paste

Range("Z14").copy
Range("D15").activate
activesheet.paste
'------ I am using below code to fetch row number on click of macro ------
 Dim wb As Workbook
 Dim ws As Worksheet
 Set wb = ThisWorkbook
 Set ws = ThisWorkbook.Worksheets("Additional_Details")
 
    Set b = ws.Shapes(Application.Caller)
    With b.TopLeftCell
        cs = .Row
    End With

Above code works fine excel 2016 however it is providing old row number "14" in excel 2013

Please suggest.
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,

while executing below xquery

for $x in doc("Books.xml")/books/book
return if{$x/@category="XML")then<XMLBOOK>{data($x/title)}</XMLBOOK>
else <NONXML>{data($x/title)}</NONXML>


on below xml


<?xml version="1.0" encoding="UTF-8"?>
<books>
	<book category="JAVA">
		<title>Master Core Java</title>
		<author>JG</author>
		<year>2015</year>
		<price>50</price>
	</book>

	<book category="DOTNET">
		<title>Get Certified in .Net</title>
		<author>BG</author>
		<year>2016</year>
		<price>60</price>
	</book>

	<book category="XML">
		<title lang="en">XML and XML Schema Definition in easy steps</title>
		<author>BT</author>
		<year>2014</year>
		<price>20</price>
	</book>

	<book category="XML">
		<title lang="en">XSLT XPATH and XQuery Fundamentals</title>
		<author>BT</author>
		<year>2016</year>
		<price>30</price>
	</book>
</books>

Open in new window

getting below error

Syntax error on line 2 at column 9 of file:/C:/Users/sg/gpJava/ud/xsl_xpath_jquery/XQuery/Books2.xqy near {....xml")/books/book return if...}
  XPST0003: Unrecognized node constructor if{}
Static error(s) in query

how to fix it
please advise
0
hi,

eclipse java perspective kind of messed up as i tried to expand console which went to top right corner from bottom. I further tried to move which moved outline some where else etc. How bringing back to default view of java perspective so that i can see everything as origninal? if i restart the eclipse this problem resolved or there is any trick or command to fix this java perspective(even any other perspective for that matter like J2ee etc)
i tried restarting eclipse did not help though
please advise
0
This is a two part question. I'm using VS 2015 Enterprise with .NET 4.7 Projects are VB.NET
1. How do I setup my CR inside my VB.NET project so that the data .XML file resides in a environmental variable location?
    When I set my Datasource Location inside my application project (Using ADO.NET) it asks for a specific .XML location.
    I can put in "C:\SomeFolderName\data.xml" & it works, but I'd rather not clutter up Users Machine with a folder that may get deleted or altered. So my thinking is to put the file into [APPDATA] folder, but the project looks for the file upon entry.
2. How do I include, or automate the Crystal Reports redistributable inside my setup project?
    I can put the CR_64bit.msi & CR_32bit.msi on the disk & have the User install the correct one first, but I'd rather not leave the install up to possible omission or wrong one.
Thank you,
Russ
0
In the html world what is difference between
<th> vs <td>

when we use each under <tr> of <table>
please advise
can i use one another interchangeably?
0
hello, I am tasked to create a java chat application using socket programming with clients under a main server, is there any link that can help me? thank you
0
Keep up with what's happening at Experts Exchange!
LVL 11
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Hi, I used following code to add data to Combo box, But combobox showing results
String[] Array
Where is wrong
public List<string[]> Displayadd()
        {
            List<string[]> lstpartners = new List<string[]>();
         
            string sqlPartners = "SELECT name ,address from test";

            string results = string.Empty;
            PartnerCon=dbConnect.Connect();
            PartnerCon.Open();
            SqlCommand cmdPartners = PartnerCon.CreateCommand();
            cmdPartners.CommandText = sqlPartners;

            using (SqlDataReader rdr = cmdPartners.ExecuteReader())
            {
                //List<string> mylist = new List<string>(new string[] 
                while (rdr.Read())
                {
                    lstpartners.Add(new string[] { rdr["address"].ToString(), rdr["name"].ToString() });


                }

            }


            PartnerCon.Close();



            return lstpartners;
        
        }

Open in new window


Calling Combobox

 cmbPartnerID.DataSource = null;
            Partner ptr = new Partner();
            cmbPartnerID.DataSource = ptr.DisplayAdd();
            cmbPartnerID.DisplayMember = "address";
0
I have a small program I need created. Here is what it will do.

1) Run from the desktop
2) Check for the existence of a usb microphone plugged in
3) If no microphone then prompt user to plug one in.
4) If microphone present then run another application / exit
5) Gives user the option to copy predetermined file from point (a) to (b)
6) config file for # 4 and # 5

microphone is determined to exist by using the following command ...
wmic path CIM_LogicalDevice where "Name like 'PowerMIC%' " get /value
If mic isn't found I usually get " No Instance(s) Available. "



Thanks ..... Is this something you can do ? Windows 7 but should also be able to work with windows 10

Joel T Brown
0
hi,

i have 3 ant projects downloaded from tfs say project1, project2, project3
i need to import them to eclipse
when i unzipped there is no .project  no .eclipse etc files. so when i import as existing java project not recognizing them as existing project.

when i import as build.xml after import i am not seeing build.xml anymore to build the project

https://stackoverflow.com/questions/3880350/importing-ant-build-xml-in-eclipse

how to import regular ant project into eclipse. please advise
0
hi,

under eclipse -->general -->network connections
i see options like manual, native, direct

when i select manual and select http(giving usernae and password) https((giving usernae and password) socks(not giving  usernae and password) in proxy entries at the top
and
at bottom proxy bypass first three like local host then 12x.x.x.xx
and
tfs.crm.com
then it is connecting.

To my friend when selecting native which choosed al other options apart from above six then it connects for him.

what is difference between native and manual
when i try to do remote debugging on one unix server they are suggesting to change to mative from manual but my fear is i cannot connect to tfs any more. if i change to native and come back to manual again does it save the configurations as earier?


when to use direct?
https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-net-preferences.htm
https://stackoverflow.com/questions/27405988/remote-debugging-failed-to-connect-to-remote-vm-connection-timed-out
please advise
0
Hello,

I have a vbscript I have finished and pushing out via gpo.

I want to convert the vbs to html. How do I go about doing this?
0
I am from Chemistry background in India with 16 years of IT Programming and DB experience. Living in US for past 9 years.

Currently, I am assigned lots of SQL Data Correction work(Backend) that will make me obsolete in future.
My corporate work does not allow me to do any new work.
My Family(3 dependents) life does not allow me to learn a whole lot.

How to smoothly transition from my current legacy, obsolete work to more reliable & paying job in future(current age:46 years until 70+ years of age).
0
This could be an easy question and in fact, this is simple. But just wondering what's the proper algorithm for lucky draw chances?

Let's say in every new deposit amount of X get a no of chances of Y. Providing X = $1000, Y = 1

If there's a customer A credited $10000, he got 10 chances in this month.
If there's a customer B credited $2000, he got 2 chances in this month.
If there's a customer C credited $100, he got 0 chances in this month.
If there's a customer D credited $3500, he got 3 chances in this month.

By end of this month, how do I use a proper algorithm to pick a lucky draw winner? That's to pick a winner among this 15 chances.

One of the approaches is to create multiple chances in a temp table, and then random a position to pick the winner. But my question is what if the total no of chances is a very big number? Will the process of populating this temp table become slow?

Thank you.
0
I need a programmer to work for me.is anyone interested?
0
Hi,
I have a userinfo hibernate class
class userinfo {
@Id

@GeneratedValue(strategy = GenerationType.AUTO)

private Integer id;
@Column
String guid;
}

The guid is the unique userId for each user registered inside my application.
Now i use this class in another class Comments  which will be made by some user..
ex :
class comments {
 @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
   private Integer id;
   @Column
String comment;
@ManyToOne
userinfo user;
}

This is the current design. now i will get an api call when a user inside my application sends a comment.
so i was considering to send the following json from client side :
{
      "guid" : "sfsdf",
      "comment" : "random comment"
}

Now for storing this into the comments table.
I need the userinfo class element.
This will require a db query into userInfo table to fetch the userInfo corresponding to the guid. and then will insert the data
into comments table.
So there is an extra query involved. Is there any way to avoid it ?
Also is the above DB design good or there is an alternative better way ?

Thanks
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!

(i) Develop an algorithm to determine whether a graph represented by a node-node incidence matrix is connected or not. Provide a clear algorithm statement.
(ii) Code your algorithm in any programming language you prefer, run your code on the node-node adjacency matrices. The matrix is 300x300. Also, I need to report my results along with the computation time in seconds
0
Hi,
I need to install client computer C# Exe (Click once deployment) ,but how to ask him to give
Database server,DB  name and username and password

My configurations in the App.config
<connectionStrings>
    <add name="Test" connectionString="Data Source=UK-DB-eRP-001;Initial Catalog=ERPMain;Integrated Security=true" providerName="System.Data.SqlClient"  />

  </connectionStrings>

Open in new window


I thought giving text file to Edit, But how to connect with App.config?
0
hi,
I was writing below example
https://www.youtube.com/watch?v=ShO_Z64sGwI&list=PLZM-6wiKGRfGmXzuR8uX3UsE8g91K6Vp1&index=5

package com.gp.mockito;

import org.junit.Before;
import org.junit.Test;
import junit.framework.Assert;
import static org.mockito.Mockito.*;

public class CalculatorServiceTest {

	CalculatorService calService;
	
	@Before
	public void setup(){
		ICalculator cal_mock = mock(ICalculator.class);
		when(cal_mock.add(2, 4)).thenReturn(6);
		calService=new CalculatorService();
		//calService.setCal(cal_mock);
		
		
	}
	@Test
	public void testAddNumbers(){
		Assert.assertEquals(6, calService.addTwoNumbers(2,4));
	}
}

Open in new window

package com.gp.mockito;

public class CalculatorService {
ICalculator cal;
public ICalculator getCal() {
	return cal;
}
public void setCal(ICalculator cal) {
	this.cal = cal;
}
public int addTwoNumbers(int x, int y){
	return cal.add(x, y);
}
}

Open in new window

package com.gp.mockito;

public interface ICalculator {
public int add(int x,int y);
}

Open in new window

why we need setter for calservice implementation class.

why are they setting interface mock object to the calservice object

observerd one example here
https://www.youtube.com/watch?v=DyuWgBHfxNQ

i do not see any setter here though?
1
I want to use
Files.readAllLines()

Open in new window

to read a file inside the exported jar file, but I don't know how, can someone tell me how to do it?
0
RT Version 3.8.7
All tickets are being submitted to the 'General' queue.
They are submitted via email and on creation the Owner is set to 'Nobody in Particular'

Is there a way to configure RT so it assigns tickets based on email address? We have 5 people in this queue.
If person1@domain.com sends an email to RT , RT should auto assign the created ticket to person1.
Same with person2, person3, etc.

I found the suggestion of creating this scrip: https://rt-wiki.bestpractical.com/wiki/AutoSetOwnerForQueue
I entered this in my RT:
my $MyUser = "bob";

my $QueueName = "general";
my $Sender = "bob@domain.com";
return 1 unless $self->TicketObj->QueueObj->Name eq $QueueName;
my $Actor = $self->TransactionObj->Creator;
return 1 if $Actor == $RT::SystemUser->id;
return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
return 1 unless $self->TransactionObj->CreatorObj->Name() =~ /$Sender/;
$RT::Logger->info("Auto assigning ticket #". $self->TicketObj->id ." to user $MyUser" );
my ($status, $msg) = $self->TicketObj->SetOwner( $MyUser );
unless( $status ) {
  $RT::Logger->warning("Impossible to assign the ticket to $MyUser: $msg");
  return undef;
}
1;

Open in new window



I put all this code under 'Custom Action Cleanup Code'

The other settings in the scrip are:

Description:      
AutoAssignOwner - Bob
Condition: On Create
Action:          User Defined
Template:   Global Template:Blank
Stage:            Transaction Create
0
Hi,
I need to add records to dataGridview using loop

see below my code is not working
  dataGridJobView.ColumnCount = 3;
            dataGridJobView.Columns[0].Name = "Job Number";
           dataGridJobView.Columns[1].Name = "Message";
            dataGridJobView.Columns[2].Name = "Vehicle Number";
 if (jobs != null)
                 {
                     foreach (var j in jobs)
                     {
                         row = new string[] { j.Id.ToString(), j.Message.ToString(),j.VehicleId.ToString() };
                         //dataGridJobView.Rows.Add(row);
                         //this.dataGridJobView.Rows.Add(j.Id.ToString(), j.Message.ToString(), j.VehicleId.ToString());

                         
                         count = count + 1;
                         //MessageBox.Show(String.Format("id:{0} {1} {2}",j.Id,j.Message,j.VehicleId));
                     }
                    
                 }
                 dataGridJobView.DataSource = row;

Open in new window

0

Programming

52K

Solutions

40K

Contributors

Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.