64,152 Solved Topics
Remove Filter ![]() | |
I need to modify this movies program so that way the DVDs will be sorted by title at all times (A first thru Z). I need to use Binary Search so I put a method in DVDCollection but I'm probably missing something or calling it incorrectly. The program needs to … | |
Hello, The following applet displays two .jpg files (ImageIcon objects - x and y) on a JPanel. I would like to display the second ImageIcon object (y) as transparent. Is that possible? Thank you! [CODE] import javax.swing.*; import java.awt.*; public class PicPanel extends JApplet { ImageIcon x, y; JPanel panel; … | |
Hi guys I have part of the code that looks something like this: [CODE] if(c1=='a') myStack.push(c1); else if(c1=='b') myStack.push(c1); else if(c1=='c') myStack.push(c1);[/CODE] I just want to ask is there any way to rewrite this code, to make it more compact something like [CODE]if(c1==('(a'||'b'||'c') // I know this doesn't work [/CODE] … | |
1 using System; // help me to write this code in object oriented 3 namespace ConsAppl_OOP_Keo_c39 4 { 5 class Procedure_Orieted_Programming 6 { 7 static void Registration(string studentID, string courseNumber) 8 { 9 Console.WriteLine("Данныерегист-циистуд-та: №студента - " + studentID + ", №курса - " + courseNumber); 10 } 11 static … | |
I have a what should be a simple form program that has a comboBox, textBox, two buttons, and a label. once the user picks an item it shows the cost for that item. they can then enter a number into the textBox, once order is clicked the total amount for … | |
Hi All, I'm going crazy with this. I have a file called unique.txt with allot of values in. When I run my script it will add 1 value (1319613308.476855) to my value file but when I grep the value it displays nothing and I know the value is present in … | |
I am trying to archive a database entry using .post, but I am getting this error: "Uncaught SyntaxError: Unexpected token (" I am defintely still in the learning phase of jQuery, so any help is appreciated! [CODE] //Archive Table Row function archiveEntry(id){ function(){ if (confirm("Archive Fill #"+id+"?")) { $.post('/elevator/scripts/php-inc/archive.php', {id: … | |
Hey guys, I've been having a bit of a problem using the while function. Here is my code (Simplified): [CODE]Dim RandomNumber3 As Random Dim RandomOutput3 As Integer RandomNumber3 = New Random() RandomOutput3 = RandomNumber3.Next(1, 9) Dim RandomClass As Random RandomClass = New Random() While (RandomOutput3 = RandomOutput Or RandomOutput2) RandomOutput3 … | |
hey, im getting the exception [CODE]Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com.sun.media.jai.codec.SeekableStream at javax.media.jai.operator.BMPDescriptor.class$(BMPDescriptor.java:65) at javax.media.jai.operator.BMPDescriptor.<clinit>(BMPDescriptor.java:87) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at javax.media.jai.RegistryFileParser.getInstance(RegistryFileParser.java:224) at javax.media.jai.RegistryFileParser.registerDescriptor(RegistryFileParser.java:360) at javax.media.jai.RegistryFileParser.parseFile(RegistryFileParser.java:295) at javax.media.jai.RegistryFileParser.loadOperationRegistry(RegistryFileParser.java:55) at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:369) at javax.media.jai.JAI.<clinit>(JAI.java:382) at cbir.window1.ColorHistogram.<init>(ColorHistogram.java:61) at cbir.window1.SearchWindow.jButton1ActionPerformed(SearchWindow.java:92) at cbir.window1.SearchWindow.access$000(SearchWindow.java:22) at cbir.window1.SearchWindow$1.actionPerformed(SearchWindow.java:47) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) … | |
I have an integer called: int pID = 0; Inside my while loop I'm using pID++; to increment it. Sometimes the pID doesn't get incremented and sometimes it will. My sample output would be. 0 1 2 2 2 3 4 5 5 6 7 Does anyone have an idea … | |
Hello masters, I want to know how to check an empty textbox in the form. I can check it by assign Text1.Text = "". But i have many textbox in form. Thank you in advance | |
![]() | Im working on a Search index that searches through files that you manually add to the index, I'm having trouble with my GUI right now. Never used any java IDE before and its giving some unfamiliar suggestions. Netbeans wanted to make my main class abstract (but for no reason stopped) … ![]() |
Hi all, How i can split a sentences into words and add splitted words into listbox. Thank you. Best regards Eko | |
I want to change chars in string like this: if i input DaniWeb it will change it to EbojZfc I've come so far: But this changes to z at the end :S Please any help... [CODE]#include <iostream> #include <string> #include <algorithm> using namespace std; int numChars(string besedilo); int numWords(string besedilo); … | |
![]() | Hey, I'm kinda crappy with arrays. [CODE] int [] myArray = new int[5]; myArray[0] = num1; // initialize # of cols myArray[1] = num2; // in each row myArray[2] = num3; myArray[3] = num4; myArray[4] = num5;[/CODE] I want to use a for statement, to add these 5 things together, … ![]() |
Hi, I would do result loop where the only exists title attribute and how to make the result of the title attribute? This code does not work: [CODE]<html> <head> <script type="text/javascript"> function ppp() { var i=0; for(i=0;i<9;i++) { var idm='a' + i; var AttributeA=document.getElementById(idm).getAttributeNode("title"); if (AttributeA) { document.write("number: " + … | |
[CODE] Private Sub save_Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i As Integer w = New IO.StreamWriter("e:\test.txt") For i = 0 To ListBox1.Items.Count - 1 w.WriteLine(ListBox1.Items.Item(i)) Next w.Close() End Sub[/CODE] this code will save all items in listbox but i want when u click an item(selecteditem) … | |
![]() | Hi All. I'm getting to grips with OOP (slowly) and I was wondering how you go about applying general functions to classes. For example, if I have a few general functions - this is a silly example, but should give you an idea of what I'm asking: [CODE]function strBig($str){ return … ![]() |
I want to manually test my sites to check if they are secure against SQL injections. Whats a good way to attempt it. How do I get started? thank you | |
Good Morning... First let me start by thanking those of you that respond with great education information in here.. You have made my learning curve (time invested) much shorter than it would have been with just a reference manual. I know I still have a lot to learn, but this … | |
Hi All, I can't figure this out, I have a listview and I want to export it and finally found how to do it but I'm stuck here.. Here's the code. [CODE] Dim Row0 As WorksheetRow = sheet.Table.Rows.Add Row0.AutoFitHeight = False Row0.Cells.Add("PROJECT_NAME", DataType.[String], "s67") Row0.Cells.Add("USER_NUMBER", DataType.[String], "s68") Row0.Cells.Add("JOBNAME", DataType.[String], "s68") … | |
The startup that I set in my project is not the same when I open the exe file of my project. Someone can help me? tnx | |
Hi I have been going through a tutorial i came across online. Please let me know what this would read if it wasn't written in shorthand. Regards [CODE] $products = isset($_SESSION['products']) ? $_SESSION['products'] : array();[/CODE] | |
Hi Ive got an error message saying "Object reference not set to an instance of an object." It doesnt make sense to me and the troublshooting tips says to make a new keyword, but since Im new to C# I dont fully understand it. Heres the bit of code thats … | |
Hello, Can any one provide me with the Crsytal report runtime installer for Visual Studio 2010.. I have the installer of Visual Studio 2008 but its of no use... I need the installer that is the .msi file.... Can anyone provide it to me...coz I have searched a lot.... | |
Hey, We have a good few websites that use Google's reCAPTCHA and in the past 24 hours spammers have been bypassing the reCAPTCHA... has anyone else been having this problem?? Or know of a fix. Spammers haven't been able to use the form until last night when somehow they got … | |
Hi. I am a beginner with Python. I've done some PHP work in the past but I suspect this is not helping with my progress in Python. I have a text file that basically looks like this: [CODE]a=1 b=2 c=3 a=4 b=5 c=6 a=7 c=8 a=9 b=0 c=11[/CODE] At the … | |
ORA-01000: maximum open cursors exceeded tips I am getting following error. I made a combo box with select query behind it, i used itemlistener to fetch data. Today during testing i found that if user move too quickly in combo box so select query will be fired for each number … | |
Hi all! Quick summary: I'm attempting to shutdown a socket, but the framework that I'm inheriting an Interface from already contains an implementation of a "shutdown" method. Therefore, I am unable to call "shutdown" for the socket. Longer Explanation: How can I fix this? I originally tried looking for a … | |
Hi everyone, I'm building a project with CakePHP and I would like to be able to have pages that are created dynamically. So, if a user goes to [url]www.domain.com/page-name[/url], the controller should take the /page-name part of the URL, search the database for it, and then display the results in … | |
good day guys; I hope somebody could help me again with my problem I'm working with this for a month now and It seems I cant analyze what's wrong with my code. now here's what I want to happen I want to count and pull the records from a table … | |
My Table looks like Table Name: Categories CategoryID : int CategoryName: text Description: text Picture: Image Now I want to display all these fields in a DataGrid. I have done this, [CODE] DataGrid1.DataSource = DataTable or DataView; DataGrid1.DataBind(); [/CODE] [CODE] <asp:DataGrid ID="DataGrid1" runat="server" AutoGenerateColumns="False" Width="100%"> <Columns> <asp:BoundColumn DataField="CategoryID" HeaderText="Category ID" … | |
could any one help me on SDL_GetMouseState(0,0)........ my coding is as below [CODE] if(SDL_GetMouseState(0,0)&SDL_BUTTON(SDL_BUTTON_LEFT)) { //function calls } [/CODE] this coding works button when i click on the window the contents remain only till the button is in pressed state........ | |
How to open excel file with the program when the user selected program to open excel? I have a software to process data in excel file (*.xls, *.xlsx). My software loaded excel file to process by selecting the path to excel file. For convenience than I intend to add choices … | |
i need to ask about the "SharpPcap" function startCapture()... Does it capture both inward and outward traffic...??? | |
Hi all, I am looking to understand Html entities & html special chars in more details. I have a form and text area that users complete, the databse updates correctly and displays the information. The problem im facing is this: When the database displays the data, its display incorrectly. For … | |
hi all can i know how to find greatest of two numbers? the condition is we should not use any comparision operators.. thanks in advance | |
Hello I need to write Age Category Calculator program but I'm not sure how! I've to reed to inputs years and months This is the instruction : Write a subroutine for the button COMPUTE. The application will compute the user’s number of years as follows: if the number of months … | |
Whenever update the values in the text box.. its not submitted and update in database. Thanks and regards Here is my code : namespace sys.System { public partial class spareedit : System.Web.UI.Page { SqlConnection dbCon = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["sqlServer2"].ConnectionString); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { dbCon.Open(); SqlCommand … | |
Is it possible to pass a map container to the copy algorithm and display it to the std::cout? If so how? What I tried below doesn't work but it looks like it should. Any comments or pointers will be appreciated. [code] #include <iostream> #include <string> #include <map> #include <algorithm> #include … | |
Please tell me what I'm doing wrong. I have a list, and I want python to make a file out of it. [CODE]def changename(filename, modifier): return filename[:4]+modifier+filename[-4:][/CODE] [CODE]def fileWrite(filename, ext, sortedList): openthis =open(okfilename(changename(filename,'_'+ext)),'wb') for item in sortedList: openthis.write(item) openthis.write('\n') return[/CODE] [CODE]lastnames.append(newNames) lastnames.sort() print '\n'.join(lastnames) names.close() fileWrite(filename, "Last-sorted", lastnames)[/CODE] | |
[CODE]#include <iostream> using namespace std; int main() { { int count; int innercount; count = 1; while (count <=1) { innercount = 1; while (innercount <= (12 - count) /2) {cout << " "; innercount++; } innercount = 1; while (innercount <= count) { cout << "@"; innercount++; } cout … | |
I have to write a program that will decode a Ceasar cypher with any possible rotation length on a long string that will be imported into the program. I'm trying to figure out some pseudo coding on how I want to tackle this problem but there is one key thing … | |
Hi guys...... My problem is.... If we write some lines of code in button click event...... How to set the sleeping timer means..... For eg---- Suppose we wrote 10 line of code in button click event.... After the exicution of first 5 lines of code,,, remaining 5 lines of code … | |
I have a program that dynamically allocates an array and uses it. The thing is that under certain situations this array will get infinitely long. As such I would like to know if/when the array has gotten too long and then start saving it to a file (where length will … | |
Yo guys heres my code: Im trying to extract one line each time the sub is called and if no more lines re-set to 0 and start again Problem is that it does not increase even tho i have set it as an array, still brings up he first line … | |
Hi, I recieve the following error message: "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression'name '" when I run this statement: [CODE] sql = "INSERT INTO empDetail VALUES("; sql += txtName.getText()+ ", "; sql += "'" + txtAddress.getText()+ "', "; sql += "'" + txtSuburb.getText()+ "', … | |
Hello, I have been working with opengl and other graphics libraries and they all require the bits per pixel of the screen on initialization of a window. My question is, is there any way to get the system's preffered bits per pixel? or that of the monitor? | |
I am having a problem displaying random numbers, I'm trying to make a dice game where you play against the computer and the first one to 100 wins. However, my random number is never random, it always comes out as the same number. From what I understand to simply display … | |
![]() | There's definitely a way to make a for loop out of variables. So if this button I made is clicked, the program will parse the ints in the textfields and send them to variables num1-num5 [CODE] if (e.getSource() == calc) { num1 = Integer.parseInt(num1field.getText()); num2 = Integer.parseInt(num2field.getText()); num3 = Integer.parseInt(num3field.getText()); … ![]() |
The End.