43,549 Solved Topics
Remove Filter ![]() | |
I wanted to format this string but I don't know how I can do the formatting part at all. class MyTime: def __init__(self, hrs=0, mins=0, secs=0): self.hours = hrs self.minutes = mins self.seconds = secs if self.seconds >= 60: self.minutes += self.seconds // 60 self.seconds = self.seconds % 60 if … Software Development python | |
This is my code: class MyTime: def __init__(self, hrs=0, mins=0, secs=0): self.hours = hrs self.minutes = mins self.seconds = secs if self.seconds >= 60: self.minutes += self.seconds // 60 self.seconds = self.seconds % 60 if self.minutes >= 60: self.hours += self.minutes // 60 self.minutes = self.minutes % 60 if self.hours … Software Development python | |
What according to you is the simplest and best way to send your QUERY??? Software Development vb.net | |
What is the best way to get the object, within a list of that object type, that has the highest ID number? I've been trying to figure it out and I can manage to get the highest ID number but not the object containing that ID number. Any help would … Software Development asp.net | |
Hi guys, I need help in refreshing the data in datagrid view, I’ve tried datagrid.refresh but nothing happens, I have to close the form and open it again to view the data. I need the data that I add to automatically show on the datagrid without having to close the … Software Development vb.net | |
I'm trying to read a keyboard entry into a 256 char buffer then extract from just the chars entered (trying to restrict it to just 8 characters) I am fundamentally not understanding how the #$%#$^ing char arrays work: #include <iostream> using namespace std; int main() { char buffer[256]; char pw[8]; … Software Development c++ | |
Hi, What is the difference between "__inline__" and "inline"? I have programs with both. "inline" works, "__inline__" has an error "Unable to resolve identifier __inline__" thanks Software Development c | |
I keep running this code and it works until I press the button, `findShapeCalc()`, and then I get EXC_BAD_INSTRUCTION in the main.swift at the line `NSApplicationMain(C_ARGC, C_ARGV)`. Why does this keep happening? Code in question: import Cocoa class ViewController: NSViewController { @IBOutlet var dropDown : NSPopUpButton @IBOutlet var length : … Software Development objective-c | |
Hello Daniweb, I'm rebuilding a Flash-based website in PHP/HTML maintaining the same MySQL database. My problem now is, the user passwords are hashed of course - I need to use the same hash in the new application for old users to be able to still log in. But since the … Software Development encryption | |
I am having an error file object when opening and reading a text file(csv). I must be misusing the with so that when I call the function race table its getting a file object and not a readline. How can I get the with to correctly hand over the file? … Software Development python | |
I need to write a class that stores a user-input date as a String in the format mmddyyyy. The constructor validates the input, but it accepts a String input and it tokenizes it into three parts, all int variables and in order to do that I have to tokenize the … Software Development java | |
Hi i'm following a book but i don't understand `std::string::size_type` and some other data types specially `typedef` i see programmers use them too much. typedef int grades[5]; grades studenA[5], studentB[5]; and why just not use `int` instead of `size_type` while the result is same. #include <iostream> #include <string> #include <algorithm> … | |
First off this is my second day writing in Python. My manager switched us off SAS and moved us to Python and R which I actually am starting to like the flexibility. I have a few datasets that I work with on a regular basis that require a lot of … Software Development python | |
hello every body. I need a book at java swing package.i am new in java programming and i want to learn GUI so plz help me. i want to download book of herbert schildt. book name swing a beginner guide Author Herbert Schildt Software Development gui java java-swing | |
Hi all, I was just trying to write a simple prog in which i'm trying to add multiple components to a JPanel and inturn i'm adding that to a JScrollpane. Now the problem i'm facing is when i run the prog i can see the contents of the panel(not all) … Software Development java java-swing oracle perl | |
Hi, Is it possbile to join only specific items in a list using indexes. Lets say I have 100 items,i would only like to join items[1-30]. Please advise. Software Development | |
I was just wondering, what is a good rule of thumb for industrial-grade code when deciding whether to use the std::array template vs a built-in array? Software Development c++ | |
Hi! i want ADD empty row in DataGridView............Like This ! When user enter Number in textbox and click button then Add empty rows(as per user input number in textbox) in DataGridView.......... for example :- if user entered "5" in textbox and click button then "5" empty rows will be … Software Development vb.net | |
I need to dynamically group rows together in an EXCEL worksheet. The obvious choice to do this will be VBA. I hope you can help. My spreadsheet has 18 columns and (up to) 5,000 rows of data. I've written the following code which works "OK" however it fails to group … Software Development microsoft-office vb.net visual-basic | |
Hello, I have a device (a control relay board). I have it hooked into my home network and I have a different network that I would like to be able to access the device to control it. I have the mac address of my device and my ports are forwarded … Software Development | |
Hi guys and sorry if this is the wrong forum. I am messing around with visual studio and trying to make a picturebox move around on a form when a user clicks a directional button on the form. I am able to move the picturebox any direction I want by … Software Development c c# c++ visual-studio | |
I am trying to make a function that rounds number.. I declared the function above the main and voided it Then I recalled the function in the program and listed the variables needed in brackets and then I wrote the function I can't work out what is wrong. [ICODE]#include<stdio.h> #include<math.h> … Software Development c | |
Here is a piece of C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster: #include <algorithm> #include <ctime> #include <iostream> int main() { // Generate data const unsigned arraySize = 32768; int data[arraySize]; for (unsigned c = 0; … | |
Hello all, I have a Hindi Text file, from which i want to access the maximum repeated words and other similar operations. I went through many articles which help in accessing English text files. But i need to use the same operations on the Hindi text file, i am not … Software Development python | |
this might be a simple question so accept my appolegises , I am creating a 2 dimetional pointers to int and I want to release the memory at the end but I think I'm doing It all wrong and all of the memory isn't being relaesed. int **a; a = … Software Development c++ | |
I need to make an object called Accounts that can be used as a banking system. It requires 3 inputs, first name, last name, and initial deposit and 4 member functions: withdraw, deposit, fee and interest. The fee is $20 a month if the amount in the account is less … Software Development python | |
I'm trying to remember the name of a site - *pretty sure it was a wiki* - where you post different ways of writing the same program in different languages. I. E. writing "Hello World" or heap sorts in C, C++, Java, Haskell, etc. My google-fu is failing me, so … Software Development | |
I have been doing some exercises out of the Head First C# book and have just done this exercise where you write a complete sentence using a while loop. The book dosent explain how the while loop puts together the string. I am looking if someone could please explain the … Software Development | |
I need my program To detect the resolution of multiple monitors on a system. I have figured out to get the resolution of one monitor. Public Function ScreenResolution() As String Dim resX As Integer = Screen.PrimaryScreen.Bounds.Width Dim rexY As Integer = Screen.PrimaryScreen.Bounds.Height Return resX & " X " & resY … Software Development vb.net | |
HI guys, I wonder if you can help me understanding this please. Take the following code: // Fig. 14.23: ListFrame.java // JList that displays a list of colors. import java.awt.FlowLayout; import java.awt.Color; import javax.swing.JFrame; import javax.swing.JList; import javax.swing.JScrollPane; import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionEvent; import javax.swing.ListSelectionModel; public class ListFrame extends JFrame { … Software Development java java-swing | |
Currently i'm doing a project in C# where i've to support multiple languages. What i decided to do is this: Create language xml files and put them in a folder ("langs"). Language file structure: [CODE] <Lang name="en" /> <!-- All forms --> <form id="mainform"> <item id="mnuFile" text="File" /> <item id="mnuFileNew" … Software Development xml | |
My assignment is as follows: Create a higher/lower guessing game using a graphical user interface. allow users to keep guessing until they guess the number. Choose two colors for the game: one should be used to indicate that the value the users guessed is higher than the target; the other … Software Development assembly user-interface | |
I've been trying to compare a string which is stored in two diffrent variables(but the content is same). I get the two same inputs from user.. package switchcasepgm; import java.util.Scanner; public class stringcomp { public static void main(String[] args) { Scanner getinp=new Scanner(System.in); System.out.println(); String sdr = getinp.nextLine(); System.out.println(); String … Software Development java | |
Hi! I already established an iDB2Connection, now what I want to know, is how could I execute SQL Queries for INSERT, DELETE and UPDATE. I had tested the code already and it works. The code for count works; I get the total number of records. My question is that for … | |
Hi! My database is in AS/400 DB2 hence, I am using SQL. Here's my line of code for opening a connection. Dim str As String = "User ID=EDITH;Password=EDITH;Data Source=10.0.1.11;Initial Catalog=ictms;Integrated Security=True" Dim conn As SqlConnection = New SqlConnection(str) conn.Open() Now, I wanted to execute a delete query, however, I already … Software Development open-source vb.net | |
Hello programmers! I am having a function that has the user enter a name for an object, check if its valid, and return it if it is. I am getting the input via getline, but it seems that you have to press enter twice to make the input work. Here's … Software Development c++ | |
Hello, currently I am trying to send a byte array to a wireless device I have setup on my network. I'm having issues however and it's not working properly. I can send data to it while I have it interfaced usb, but over the network has been unsuccesful. This is … Software Development | |
What is the difference in: Set<Object> linksSet = new LinkedHashSet<Object>(); LinkedHashSet<Object> linksSet = new LinkedHashSet<Object>(); Actually, I want to create a Set, that would hold the objects in the same order, I insert into it. Many thanks for the help, in advance. Software Development java | |
hi friend here soved code for textbox data display in Gridview <form id="form1" runat="server"> <asp:TextBox ID="txtAdd1" runat="server"></asp:TextBox> <asp:TextBox ID="txtAdd2" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="show in gridview" onclick="Button1_Click" /><br /> <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField HeaderText="Select"> <ItemTemplate> <asp:CheckBox ID="chkbox" runat="server"></asp:CheckBox> <br /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Remark"> <ItemTemplate> <asp:Label ID="lblremark" runat="server"></asp:Label> </ItemTemplate> … Software Development session | |
I was learning about the static class and static method.Then i came across the following line: Only one copy of static member exists regardless of any no of instance of a class. what does it actually mean? It is in the msdn document http://msdn.microsoft.com/en-us/library/79b3xss3.aspx achfcssswwws follows: A non-static class can … Software Development microsoft-access | |
There is no **"Microsoft Outlook 14.0 Object Library"** in my **visual studio 2008 reference COM** List how can i update it. Thanks Software Development microsoft vb.net visual-studio | |
Hi guys, I've created a login form which works fine, i need assistance in comparing uppercase and lowercase input from a login form. Whenever the password is entered, the system has to compare uppercase and lowercase characters stored in the data..following is my code: 'Logic for login... Dim conn As … Software Development open-source vb.net video | |
I am a total newbie to programming. I was hoping to learn how to write a program that prints out a string representation of a random card from a deck of playing cards. The programs should use either “A”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “J”, “Q”, … Software Development python | |
This is my first time working with C++ and I have put together this program and came up with two errors and I am unsure what it is wanting me to do. The errors I got are: 1>c:\users\owner\documents\visual studio 2010\projects\week5\week5\passing_by_value.cpp(30): error C2064: term does not evaluate to a function taking … Software Development c++ visual-studio | |
Hi, I want to display a Frame2 when I clic the button4 in Frame1,my problem is when I clic in that button the Frame2 is not displayed this is my code: #Boa:Frame:Frame1 import wx import wx.animate def create(parent): return Frame1(parent) [wxID_FRAME1, wxID_FRAME1BUTTON1, wxID_FRAME1BUTTON2, wxID_FRAME1BUTTON3, wxID_FRAME1BUTTON4, wxID_FRAME1BUTTON5, wxID_FRAME1BUTTON6, wxID_FRAME1GIFANIMATIONCTRL1, wxID_FRAME1PANEL1, wxID_FRAME1STATICTEXT1, … | |
Hi Dw How can I delete a registry key for other program, I just checked my registry and the virus was registered under the same registry key of my other program and now I want to use java as also part of learning java and the method of accessing and … Software Development java | |
I have this simple problem but im still newb to vb.net where i should Reverse the "hello world" and the result "olleh" without the world without using any function like strReverse() its very hard for me any ideas would be helpful Software Development vb.net | |
I'm using: Windows 7 Home Premium 64-bit operating system Netbeans IDE 8.0 WAMP Server 2.5 Here is my issiue. I am attempting to follow the E-commerce tutorial in the Netbeans Java EE & Java Web learning trail (Section 3 "The NetBeans E-commerce Tutorial - Setting up the Development Environment"). In … Software Development client-server java mysql sql | |
I have a cart that shows product selected and the quantity and the price for each. What I am wondering is how to display the price for each as well as the total for all? Here is my code...Is there a way to do this in the public string Display()...what … | |
I am having trouble understanding exception handling, unfortunately it just really confuses me. So, I have to implement exception codes that have been created by my teacher in another code with try and catch blocks. I understand the majority of the try and catch blocks, but I don't know how … Software Development java |
The End.