43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for kxjakkk

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
Member Avatar for sepp2k
0
265
Member Avatar for kxjakkk

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
Member Avatar for kxjakkk
0
285
Member Avatar for kdejan87

What according to you is the simplest and best way to send your QUERY???

Software Development vb.net
Member Avatar for Ancient Dragon
0
148
Member Avatar for ChrisHunter

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
Member Avatar for Ketsuekiame
0
241
Member Avatar for mbowenitj

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
Member Avatar for OtepTheThird
0
1K
Member Avatar for mixelplik

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++
Member Avatar for mixelplik
0
298
Member Avatar for kent.johnstone_1

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
Member Avatar for kent.johnstone_1
0
345
Member Avatar for pars99

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
0
187
Member Avatar for Excizted

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
Member Avatar for Excizted
0
234
Member Avatar for flebber

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
Member Avatar for flebber
0
151
Member Avatar for brittney_2

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
Member Avatar for brittney_2
0
265
Member Avatar for Sarkurd

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> …

Software Development algorithm c++
Member Avatar for Sarkurd
0
762
Member Avatar for moone009

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
Member Avatar for moone009
0
7K
Member Avatar for moaz.amin.37

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
Member Avatar for stultuske
0
352
Member Avatar for kishor.m.n

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
Member Avatar for mKorbel
0
10K
Member Avatar for ondegotariq

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
Member Avatar for ondegotariq
0
98
Member Avatar for nathan.pavlovsky

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++
Member Avatar for mike_2000_17
0
1K
Member Avatar for hhm_pro992

Hi! i want ADD empty row in DataGridView............Like This![c9c3e54a6d28a6b686c9dcd1954b1f77](/attachments/large/3/c9c3e54a6d28a6b686c9dcd1954b1f77.png "c9c3e54a6d28a6b686c9dcd1954b1f77") ! 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
Member Avatar for hhm_pro992
0
3K
Member Avatar for Papa_Don

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
Member Avatar for Papa_Don
0
5K
Member Avatar for kiail

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
Member Avatar for kiail
0
291
Member Avatar for bigredaltoid

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
Member Avatar for bigredaltoid
0
252
Member Avatar for terence193

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
Member Avatar for panpwintphyu.loo
0
240
Member Avatar for iConqueror

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; …

Software Development algorithm java
Member Avatar for ~s.o.s~
1
371
Member Avatar for Vikram_2

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
Member Avatar for Gribouillis
0
2K
Member Avatar for kshahnazari

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++
Member Avatar for rubberman
0
170
Member Avatar for kxjakkk

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
Member Avatar for Hiroshe
0
616
Member Avatar for DeanMSands3

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
Member Avatar for Hiroshe
0
273
Member Avatar for iConqueror

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
Member Avatar for iConqueror
0
293
Member Avatar for Rabastan

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
Member Avatar for Rabastan
0
153
Member Avatar for Violet_82

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
Member Avatar for Violet_82
0
198
Member Avatar for JiThU89

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
Member Avatar for doxa.paradoxa
0
569
Member Avatar for behemothdave

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
Member Avatar for TalhaMoazSarwar
0
2K
Member Avatar for krnaveen14

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
Member Avatar for krnaveen14
0
149
Member Avatar for xuexue

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 …

Software Development sql vb.net
Member Avatar for xuexue
0
943
Member Avatar for xuexue

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
Member Avatar for xuexue
0
2K
Member Avatar for nathan.pavlovsky

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++
Member Avatar for nathan.pavlovsky
0
2K
Member Avatar for kiail

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
Member Avatar for kiail
0
327
Member Avatar for guideseeq

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
Member Avatar for guideseeq
1
243
Member Avatar for Rake$h

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
0
115
Member Avatar for suman_4

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
Member Avatar for hericles
0
154
Member Avatar for PM312

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
Member Avatar for PM312
0
1K
Member Avatar for mbowenitj

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
Member Avatar for mbowenitj
0
2K
Member Avatar for iuessele

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
Member Avatar for alexander.selin.7
0
13K
Member Avatar for masonketcham

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
Member Avatar for Ancient Dragon
0
213
Member Avatar for zina_a

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, …

Software Development display gui python
Member Avatar for vegaseat
0
366
Member Avatar for Mr.M

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
Member Avatar for Mr.M
0
2K
Member Avatar for jj.dcruz

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
Member Avatar for jj.dcruz
0
154
Member Avatar for henryz_box

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
Member Avatar for henryz_box
0
5K
Member Avatar for GingerDontCare

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 …

Software Development display ecommerce vb.net
Member Avatar for GingerDontCare
0
345
Member Avatar for brittney_2

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
Member Avatar for brittney_2
0
223

The End.