Latest Software Development Posts

There is one problem I am facing what should be the range of radial coordinate given radius of earth is 6378.14 km. I want to convert spherical cordinates ot cartesian in relation to earth

There is an astropy where direct interconversion is possible

when i am trying to insert date into the datefield of the oracle then date value are stored in to database but each date value are same like


public class practicdate {
JDateChooser dateChooser,dateChooser1;
    dateChooser = new JDateChooser();
    dateChooser.setBounds(200, 200, 150, 20);
public void actionPerformed(ActionEvent e) {
java.util.Date utilDate=(java.util.Date) dateChooser.getDate();
java.sql.Date  sqlDate=new java.sql.Date(utilDate.getDate());
        try {
           java.sql.PreparedStatement ps=con.prepareStatement("insert into examdate values(?)");
           ps.setDate(1,new java.sql.Date(sqlDate.getDate()));


Python is one of the most commonly used programming languages today and this is an easy language for beginners to learn because of its readability. Python is used to develop 2D and 3D animation packages, and to create video games etc.,

I also have an issue regarding the same issue. Can someone help me out here. I need help for a code to do the following : restrict the input values to numbers between 10-100.

The union between the two tables seems to be fixed, but now I have this error: InvalidCastException Conversion from string '[customerName]' to type 'Integer' is not valid.

rproffitt commented: I see no customername in the code. Again, you may be leaving out code that the forum needs to see. +15
#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;

int main() {

    ifstream input_from_file("test.csv");

    string line;

    while (getline(input_from_file, line)) {

        line += ",";

        stringstream ss(line);

        string word;

        vector<string> words;

        while (getline(ss, word, ','))

        cout << words.size() << endl;

    return 0;

The line line += ","; should suffice.

There appears to be missing code or steps in your post. Read for an example of the UNION but you may need to redo your query (I don't see that here) to use the UNION ALL as the error calls out.

bckelley commented: since this is the only place I can comment! [customerName] is a string from the database i.e. George, Fred, Alice whatever, that was a placeholder +0

For this particular sub I type the customer id in a text box and then click the button, then I'm trying to get the relative information pertaining to that id.
Not sure what I am doing wrong.

Comes back with an error message of
Recursive common table expression '[customers]' does not contain a top-level UNION ALL operator.

Private Sub FillByCustomerIDToolStripButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles FillByCustomerIDToolStripButton.Click


            Dim customerID As Integer = CInt(CustomerIDToolStripTxtBox.Text)

            Dim id = Me.CustomersTableAdapter.FillByCustomerID(Me.DatabaseDataSet.customers, customerID)
            If Me.DatabaseDataSet.customers.Count > 0 Then

                For Each row As DataRow In DatabaseDataSet.customers.Rows
                    Dim i = row(id)

                    CustomerIDTextBox.Text = Me.CustomersTableAdapter.FillByCustomerID(Me.DatabaseDataSet.customers, customerID)
                    NameTextBox.Text = Me.CustomersTableAdapter.GetDataBy(customerID).Rows(i)(1).ToString


                Me.InvoicesTableAdapter.FillByCustomerID(Me.DatabaseDataSet.invoices, customerID)


                MessageBox.Show("No Customer was found with that ID.", "No Customer Found.", MessageBoxButtons.OK, MessageBoxIcon.Error)

            End If

        Catch ex As Exception

            MessageBox.Show(ex.Message, ex.GetType.ToString)

        End Try

    End Sub

I've created a web service app ( that provides services to my Xamarin Forms apps so the mobile app will login to SQL Server via the web service and indeed perform all SQL actions (Select, Insert, Delete, etc) using the web service framework. I would suggest that's the way to go for you and/or welcome to cover in more detail my solution (which is generic SQL server forms access) in case that's of interest to you.

In general both equals() and “==” operator in Java are used to compare objects to check equality but here are some of the differences between the two: ... In simple words, == checks if both objects point to the same memory location whereas .equals() evaluates to the comparison of values in the objects.

rproffitt commented: These posts needs to be removed. -3
JamesCherrill commented: Pathetic re-copy of previous answers. If you have nothing to say, don't post. -3

Define Your Site’s Purpose and Strategy
Research the Latest Web Design Trends
Choose Your Platform
Select a Template and Start Customizing
Decide on Your Branding
Add In and Optimize Your Content
Publish Your Website
Analyze and Improve

Your path (i.e. the list of directories Python goes through to search for modules and files) is stored in the path attribute of the sys module. Since path is a list, you can use the append method to add new directories to the path. For instance, to add the directory /home/me/mypy to the path, just do: import

[InvalidCastException: Specified cast is not valid.]
System.Data.SqlClient.SqlBuffer.get_Int32() +985292
System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i) +39
Allocate.Init() in c:\Inetpub\wwwroot\App_Code\Allocate.cs:156
Adjustments_AllocateDetails.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\Adjustments\AllocateDetails.aspx.cs:25
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

sort() - sort arrays in ascending order.
rsort() - sort arrays in descending order.
asort() - sort associative arrays in ascending order, according to the value.
ksort() - sort associative arrays in ascending order, according to the key.
arsort() - sort associative arrays in descending order, according to the value.

Thank you, already solved - my bad: made a second rowcount on the other items.. events? another class?! (..they will be, cause this's just been a quick workaround)

Since "occurs twice" appears to be the cause and what you need to investigate, where is the code that sets up or handles the drag, drop and mouse events?

PS. The code supplied doesn't appear to be causing this.

Milla S. commented: Thank you! +0 bad - i'm sorry. In this part there's no mistake, but other "name"s had, compared to this 'line 11.' a


what of course doesn't work.
Thanks for your efforts.

Why go to all this trouble writing everything from scratch?

Blame me; I'm the one who ws pushing this approach. This topic is all about learning about REST and JSON. In my opinion it's near impossible to understand (eg) Spring vs Jackson unless you first understand what JSON is and why it's so totally bloody useless for serving Java objects. Trying to implement a tiny example by hand will make that clear. For a learner it's also a great exercise to write a JSON parser.
But obviously for a real-life application you'ld be mad to do it all yourself from scratch.

Hi there
PyQt is not available as tag, but this should be a simple question anyway:

  • drag & drop: from QListWidget to QListwidget
  • pushButton action: inserts chosen items from second QListWidget into QTableWidget
    But: when i run my code - most of the time the chosen items are inserted twice into my QTableWidget,
    sometimes the code runs like expected - and i can't figure out why.
    Of course i tried a "print(num)", and the added really occurs twice, for example:
    (0) ListEdit
    (0) ListEdit
    (1) TextEdit
    (1) TextEdit
    ... a.s.o.

Here's the snippet:

    vheader = self.tableWidget.verticalHeader()
    r_count = self.tableWidget.rowCount()
    c_count = self.tableWidget.columnCount()
    for num in range(self.listWidget_3.count()):
            name = self.listWidget_3.item(num).text()
            if name == 'LineEdit':
                this = r_count
                that = (c_count -1)
                line_comboBox = QComboBox()
                new_line = QLineEdit()
                self.tableWidget.setCellWidget(this, that -1, line_comboBox)
                self.tableWidget.setCellWidget(this, that, new_line)
                vheader.setSectionResizeMode(this, QHeaderView.ResizeToContents)
            elif ......:

Err.. working on PyCharm. PyQt 5.13, Python 3.7.4 - if you'd need any further information: let me know.

Why go to all this trouble writing everything from scratch?
Far more practical to take an existing framework and write your entire REST call in a few lines of code :)

Building a REST service

Consuming a REST service

Doing it all yourself is a good learning exercise, and can be fun, but it's far from the most efficient way and extremely error prone.

That's not to say things can't get complicated using things like Spring, but the complexity is at an entirely different level and not something you're going to encounter for basic things like this.

You can write most things in most languages and have it perform either horribly or quite good enough.

And often people have a completely incorrect idea about performance.

I've just completed a project in Java for a customer who was insistent that Java would never be able to offer the required performance (they needed it to handle messages in under 80 milliseconds per batch of several hundred messages).
We delivered an application that didn't just match their requirements, but blew them out of the water.

We could have however just as easily written something that was so glacially slow it'd still be processing the first message 2 weeks after the test began. It all depends on proper application architecture, design, and implementation.

Problem is, if you're asking the question you are asking you're in no position to design such a system let alone implement it.

Hi, have you tried the java API from independentsoft?

Well done. You posted exactly the same question as the first post in this old thread. I guess you didn't read the complete discussion, or the complete solution in the last post. Then you asked for "help" without saying what help you needed.

People here wil help you, but you have to put in some efort and thought yourself.

Start a new topic for your discussion. Post what you have dome so far. Explain exactly what help youqare seeking. The brief spells out the code almost line by line, so it's not clear why you are having difficulty.

hi everyone...I need help on writing a pseudocode for this question...
Create a SavingAccount class. Use a static data member to contain the annualInterestRate for each of the saver.
Each member of the class contains a private data member savingsBalance indicating the amount the saver currently has on
deposit. Provide a calculateMonthlyInterest member function that calculates the monthly interest by multiplying
the balance by annualInterestRate divided by 12; this interest should be added to savingsBalance.
Provide a static member function modifyInterestRate that sets the static annualInterestRate to a new value.
Write a driver program to test class savingsAccount. Instantiate two different savingsAccount objects, saver1 and saver2,
with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 3% then calculate the monthly interest
and print the new balances for each of the savers. Then set the annualInterestRate to 4% and calculate the
next month’s interest and print the new balances for the saver. Your out put should able to display as below:

rproffitt commented: Think about what you did here. Very Vogon of you to bury a request in such an old discussion. +15

This code is wrong from some point the right code is here.


using namespace std;

int main(){
    int num1, num2, c;
    char opr;
    cout<<"Enter the first number: ";
    cout<<"Enter the second number: ";
    cout<<"Enter operator (+, -, *, /, %)";
    if(opr== '+')
        c = num1+num2;

    if(opr== '-'){
        c = num1-num2;

    else if (opr== '*'){
        c = num1*num2;

    else if (opr== '/'){
        c = num1/num2;

    else if (opr== '%'){
        c = num1%num2;

    cout<<"You entered wrong operator";

    return 0;

If you want to be a front end programmer then go with JavaScrip and want to work as backend developer then PHP is the best. Otherwise, if you want to go with more advance options then go with Python. I am also conducting a course of machine learning in Python and have future plans to learn R. However, it is better to try free courses at first from Coursia or Udemy to understand which is easy for you.

EG -3

hi! I'm a new here but i badly needed help
i need a help about 1 hardware system proposal for our design and 1 software proposal for our Object Oriented Programming. can you sudgest about it a unique proposal that we going to create to hardware in DESIGN and a software to be programmed in OOP please.

rproffitt commented: EG. Hiding your request won't help. Make a new post. -3


  1. At the time of posting the Twitter link was non-op. Works now.
  2. You wrote "a tool that threats JSON" which is amusing but may not be what you intended to say.
  3. You made a bold claim but didn't back it up with test data or reports. Folk may think you are boasting or an assertion that is likely false.
Walterion commented: Thanks for the response. The website has more info but you may use this repo as a test data to make sure how it works. +0

I have created one table in access with field site,dealer and D_date
my data is like as follow

site dealer d_date
delhi asian 23-10-11
delhi led 24-10-18

so on.......

now i want haveing two combobox list of site and dealer in form when i press show button in form i need
if todays date is mor then 3 years of d_date then show msg. " out of warranty....

i am using access 207 and vb net basic 2008