43,549 Solved Topics
Remove Filter ![]() | |
Hey! I'm using OpenGl GLUT on xcode 5.1.1 on mac osx 10.8.5 and I've can't figure out how to load bmp,jpg or png images as textures to my application. I've tried installing FreeImage and SOIL unsuccessfully. I'm a total newbie and some help would really be appreciated. Software Development opengl | |
Hye. i need to build an inventory system. In that system, the production department will scan the barcode in each item. **How should i connect the barcode scanner with the system ? ** and the requirement of the system is to be able to compare the information scanned **with** the … Software Development microsoft-access vb.net visual-basic | |
I dont clearly understand bool functions. this lends problems to my current assignment in class where i have to write a program that involves a bool function that tests for letters in a string that the user inputs. Can anyone offer help to me? the whole code is slightly confusing … | |
import java.io.*; class WriteFile { public static void main(String ss[]) { try { FileWriter fw=new FileWriter("output.txt"); PrintWriter pw=new PrintWriter(fw); String s1="Hello World"; String s2="I Am Learning Java"; pw.println(s1); pw.println(s2); pw.flush(); pw.close(); fw.close(); } catch(IOException e) { System.out.println(e); } } } in upper code println() is called with object of `PrintWriter` … Software Development java | |
It comes in handy of course that you can dynamically adjust the size of a List or Dictionary. But this time I want to use a Dictionary with sizes from 1 to 8. When I have e.g. size 3, it will stay that way. On the net I found a … Software Development | |
Hello all, I am a vb.net newbie and I am trying to write a code that when executed pulls the latest file on an FTP server (based on creation date). So far, I've been able to list all the files in the remote directory. I know this can be done … Software Development file-stream vb.net | |
#include<stdio.h> int main(int argc, char *argv[]) { char *states[] = { "California", "Oregon", "Washington", "Texas" }; printf("size of states: %d",sizeof(states)); return 0; } the result of this is: size of states: 16 why is that?I know that an int is 4 bytes,while a char is 1 byte.I got confused why … Software Development c | |
OK. I just don't understand what is the problem here. Here's the code .h file : #ifndef NVECTOR_H #define NVECTOR_H class Nvector { public: //Nvector(); Nvector(int Size = 0); void addElement(int a, int index); void getElement(int index); void push_me_back(int a); void push_me_front(int a); private: int *p_array; int velicina; int *resize_array(int … Software Development c++ | |
If I have an array and an array list: int[] myArray = new int[2]; myArray[0] = 1; myArray[1] = 2; ArrayList myArrayList = new ArrayList(); myArrayList.Add("1st element"); myArrayList.AddRange(myArray); By calling the Addrange() method in myArrayList, does this add the contents of myArray to the second element of myArrayList? If so … Software Development | |
I'm trying to create my own Database and Tables in SQL Server 2005 using VB.NET 2005. I get an error when I try ExecuteNonQuery, which says that the connection is not initialized. I'm not sure if I'm doing any of this right. Any help would be greatly appreciated! Sheryl [code=vb] … | |
Usercontrol1 private string lastName; private string nnovo; public string LastName { get { return lastName; } set { lastName = value; label2.Text = value; } } public string Nnovo { get { return nnovo; } set { nnovo = value; label1.Text = value;} } Form Button btn = (Button)sender; SqlCommand … Software Development image | |
I want to connect my access database to my project in vb 6. What are the steps i should follow? Once i'm done with that, i want to know how to drag them and place them on a form (like the way we do it in VB.NET). Thank you Software Development microsoft-access vb.net visual-basic | |
Exception message is not showing import java.util.*; class WrongException extends Exception{ public WrongException(String s){ super(s); } } public class UserDefinedException2{ public static void main(String s[]){ int a,b; a=b=0; Scanner ob=new Scanner(System.in); System.out.print("Enter your age = "); a=ob.nextInt(); try { if(a<=0) throw new WrongException("age cannot be zero or nagetive"); System.out.print("age = … Software Development java | |
Hi i tried to test some new features of C++ 11 but how come Visual Studio doesn't support `constexpr`? i tried this simple function but it won't compile constexpr int multiply(int x, int y) { return x * y; } Software Development c++ visual-studio | |
how can i write codes that only clears specified text boxes Software Development visual-basic | |
I Assembly even worth learning if your not going to be developing the root of an os? I've considered it but it just seems worthless. Software Development assembly | |
How would you "lock" the position of a SplitPane Divider in JFX? I've tried google-ing around, and all I can find is ways to make it Transparent, which I believe would still make it movable... Any Ideas? Software Development java | |
Hello programmers! I recieved the following assignment to do in C#.net: It is a class that: * Accepts an HTML report string * Converts the HTML string into a PDF file using PDF Creator (free open source library) What are some utilities that I will need to use? I so … | |
I cannot get the JFrame to display my JPanel. Either that, or my JPanel isn't displaying my JScrollPane. Here's my code: public class PokeBase extends JFrame { private static final long serialVersionUID = 1L; private static final int WIDTH = 1280; private static final int HEIGHT = 720; public static … Software Development java | |
Public Function getSelc() Dim com As New SqlCommand Sqlcon.Close() Sqlcon.Open() Try com = New SqlCommand("EXECUTE regionSelect '" & txtID.EditValue & "','" & txtRegion.EditValue & "','" & _ txtShortN.EditValue & "','" & txtStatus.EditValue & "'", Sqlcon) objDA.SelectCommand = com objDA.Fill(objDSs) '=> could not find stored procedure ( 'but I have it … Software Development vb.net | |
Hello everyone,my question is the following: I have a database with two tables.What i want to ask is ow can i bind one column of the database to a txt file eg: when i press a button in my form it saves the contents of my richtextbox to a file … Software Development file-system vb.net | |
I want to know if I would be able to replace different words all in one regex expression. For example if I wanted to replace the name John with Joe and Smith with Doe. Would I be able to do that with one expression? Here is a code that I … | |
Quite rare to see me post in the Java forum but have been picking it up as part of a long-distance university course I am doing. I am currently trying to read in an ASCII coded .txt file and output it but am seeing some funny characters showing up. The … Software Development java | |
Hello, I'm pretty new to Python, and I've been making simple projects to practice in. The issue I've run into though is I'm creating a GUI (Using Tkinter with Python 2.6) to take a text input and bring out "Name". What I want to do though is keep that "Name" … | |
Hi, I am trying to make my "Save All" button to save whatever is selected from the option menu or dropdown to that particular file. So if I have "animation" selected from the option menu it saves to the animation file 'ji.txt','r+'. Or if I have "compositing" selected from the … | |
Hi - I've done a bit of VB.net programming but am still learning .. I want to create a .net DLL which I will call from another application (NS Teststand). When I call the Dll - 1. I will need to pass a string to it, 2. It must show … Software Development vb.net | |
Me as one of the users in Dani web and a person who has interest in Java, I've tried to solve if not all, most of the begginers problems. I've even tried to solve some myself afterwards however, now I ran out of ideas. I would also like to move … Software Development java | |
Hi, I am extremely new to python, and I am completely stuck regarding filtering the contents of a list. I have a list of the first thirty elements, and i have been told to identify any beginning with the letter 's' and any that are four letters long. I have … Software Development python | |
well guys, i wanted to try somethng fun in java, so i made a simple form type navigation program.. i can compile this file, bt i cant run it..NOTE: i have no issues in my java software.. import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.regex.*; public class Nav2 extends JFrame … Software Development java java-swing regex | |
I am trying to insert some values into a database and I have the following SQL: insertString = "INSERT INTO SocialHistory (ExamID, Occupation, SafetyYN, ComputerYN, ComputerHrs) Values('" & CurrentExamID.ToString & "', (SELECT Occupation, SafetyYN, ComputerYN, ComputerHrs FROM SocialHistory WHERE ExamID = '" & LastExamID & "'))" When I execute the … | |
My girlfriend, as confused as she is when I talk about programming, wants me to program her something. She's away on vacation to Australia right now. Of course, I told her I would program something for her in time for when she gets back. But the part that I'm stuck … Software Development java | |
Write a code snippet to declare and accept an integer and calculate the cube value of the integer. The integer should be passed by reference to a function cube(). The function would calculate the result of cubing the integer. The function prototype to be used is: void cube (int *p); … Software Development c | |
I am trying to make a timer that refreshes every 5 seconds. Here is my code: using System; using System.Collections.Generic; using System.Windows.Forms; using System.Diagnostics; using System.Timers; namespace rpanel_server { public partial class MainForm : Form { public MainForm() { InitializeComponent(); Timer MyTimer = new Timer(); MyTimer.Interval = (4000); MyTimer.Tick += … Software Development | |
Dear members please help me in understanding the control flow in the following code, thanks #include <iostream> class constructs #include <iostream> class constructs { char inp; public: void acceptCharacter() { cout<<"Enter a character: "; cin>>inp; if(inp>='A') //ASCII value of A = 65 if(intp<='Z') //ASCII value of Z = 90 cout<<endl<<"Uppercase"; … Software Development c++ | |
Can abyone tell me what type of variable is a standard Form1? It's just a curiosity and not a real part of a project. here is the standard code visual studio starts with in my version 2010 when creating a new forms application with a couple of lines added/amended.. namespace … Software Development visual-studio | |
Hi all, I started to look into event handlers, and there is something I would like to ask, sorry if this is a silly one. I can see that different Java components generate different events when the user interacts with them, but when it comes down to 1)which interface the … Software Development api java oracle user-interface | |
Hi all, I have employee class which I have 100 variables with getters and setters. now I am passing employee object to processing method. Now I want to read all values in processing method. Should I want to use getter for all member? Is there any way to achieve this. … Software Development java | |
hi, im trying to insert data using Checklist and it is only inserting one even if i selected all che checkboxes, please help.hr is my Code protected void Button1_Click(object sender, EventArgs e) { //C:\Documents and Settings\PraiseM\My Documents\Visual Studio 2008\Projects\MiniProjectAcc\MiniProjectAcc\Employee.accdb OleDbConnection conn = new OleDbConnection(); conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\PraiseM\My … Software Development open-source visual-studio | |
I have a console application with two classes: - **MyIntList** Which initilzes the array and handles the input and outputs. - **Program** This has the Main() method which handles the users input and sends them too the handlers in **MyIntList**. The problem I am having is that when the array … Software Development | |
Following a tutorial [here](http://www.joecolantonio.com/2012/07/31/getting-started-using-selenium-2-0-webdriver-for-ie-in-visual-studio-c/). Code is as follows... using System; using System.Collections.Generic; using System.Linq; using System.Text; using OpenQA.Selenium; using OpenQA.Selenium.IE; using OpenQA.Selenium.Support.UI; namespace mySelenium { class Program { static void Main(string[] args) { IWebDriver driver = new InternetExplorerDriver(@"C:\Downloads\selenium"); driver.Navigate().GoToUrl("https://www.google.co.uk/"); } } } When I run the code all seems to … Software Development visual-studio | |
This is the code void CreateGUI() { try { //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); //myPicture = ImageIO.read(getClass().getResource("Companylogo_FINAL.jpg")); /*java.net.URL u = getClass().getResource("/resources/Companylogo_FINAL.jpg"); System.out.println(u); myPicture = ImageIO.read(u);*/ /*try {*/ //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); /*} catch (IOException e) { }*/ ImageIcon img = new ImageIcon(myPicture); //frame.setIconImage(img.getImage()); } catch (IOException e1) … Software Development java | |
Here is the error I'm getting Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: input == null! And here is the code try { //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); myPicture = ImageIO.read(getClass().getResource("/resources/Companylogo_FINAL.jpg")); ImageIcon img = new ImageIcon(myPicture); frame.setIconImage(img.getImage()); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } JLabel lbl = new … Software Development java | |
if a program throw 2 exceptions can we handled it by user defined exception.for example import java.util.*; class WrongException extends Exception{ public WrongException(String s){ super(s); } } public class UserDefinedException2{ public static void main(String s[]){ int a,b; a=b=0; Scanner ob=new Scanner(System.in); System.out.print("Enter your age = "); a=ob.nextInt(); try { if(a<=0) … Software Development java | |
I'm trying to modify this code: class Tree: def __init__(self, cargo, left=None, right=None): self.cargo = cargo self.left = left self.right = right def __str__(self): return str(self.cargo) def print_tree_inorder(tree): if tree is None: return print_tree_inorder(tree.left) print(tree.cargo, end=" ") print_tree_inorder(tree.right) So that it adds parentheses around every operator and pair of operands. … Software Development data-structure python | |
Hi everybody. I hope nobody is working too hard. I am trying to figure out a way to use the peek() method of the stringstream class but looking more than one place forward. For example, if I use stringstream.peek() it will let me know the value one value ahead of … Software Development c++ | |
Hi guys, I had a test the other day and missed a question out because it confused the hell out of me. I dont know if it was a badly written question or just me. Heres the program below: public static class Mailing { public static void SendTestEmail() { List<Person> … Software Development email |
The End.