132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for COKEDUDE

Yes I did read these two posts. http://stackoverflow.com/questions/3082914/c-compile-error-variable-sized-object-may-not-be-initialized http://stackoverflow.com/questions/14186879/c-error-variable-sized-object-may-not-be-initialized My case is a bit different because I'm using `char * ptr[buflen]`. This is what I have tried: char *ptr[buflen] = {0}; //This gave me the variable sized object error. char *ptr[buflen]; memset( ptr, 0, buflen*buflen*sizeof(char)); //I figured this would work …

Software Development c c# c++
Member Avatar for deceptikon
0
8K
Member Avatar for LibraryCode

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package my.GeographyQuiz; import java.awt.*; import javax.swing.*; /** * * @author K00190164 */ public class GeograpgyQuiz extends javax.swing.JFrame { …

Software Development java java-swing oracle
Member Avatar for Traevel
0
196
Member Avatar for shayan_doust

Dear all, I was given a project to write a software that would track contracts. Everything is successful until I read or write the current data from the JTable to the textfile. This also happens when I read the textfile and insert the data into the JTable. The exception I …

Software Development gui java java-swing user-interface
Member Avatar for Traevel
0
491
Member Avatar for iarpana

import java.io.*; public class testprog { public static void main(String args[]) throws IOException, InterruptedException { String command="find BEL/ -type f | wc -l"; Process p=Runtime.getRuntime().exec(command); p.waitFor(); BufferedReader reader=new BufferedReader(new InputStreamReader(p.getInputStream())); String line=reader.readLine(); while(line!=null) { System.out.println(line); line=reader.readLine(); } System.out.println("Done"); } } It's return null value. plz help me

Software Development java
Member Avatar for jwenting
0
243
Member Avatar for James_43

Hey there, Over the past few weeks as an excerise I've been trying to create a C# image viewer. At the moment I have one window, with a list of images displayed in a ListBox. When I the F5 button, a second window pops up at fullscreen, and I want …

Software Development c c# c++ image operating-system
Member Avatar for James_43
0
1K
Member Avatar for shayan_doust

Dear all, I was told to write an application for my assignment that would keep track of contracts. The problem is, I have no clue how I can make this application write JTable into txt file every 5 seconds and wheever application would open, it would read the txt file …

Software Development display java java-swing
Member Avatar for JamesCherrill
0
563
Member Avatar for Doogledude123

I have a custom class which extends JPanel and overrides the paintComponent() method. Here's what that looks like: @Override protected void paintComponent(Graphics g) { if(redrawRequested) { g.setColor(ETCH_BACKGROUND_COLOR); g.fillRect(0, 0, owner.getAppWidth(), owner.getAppHeight()); redrawRequested = false; } g.setColor(Color.BLACK); g.fillRect(pointX, pointY, PIXEL_SIZE, PIXEL_SIZE); } The same custom class also implements KeyListener. I am …

Software Development java
Member Avatar for JamesCherrill
0
427
Member Avatar for loldafuq

Here is what i have to do Create Class CSalary with private member variables string m_strProfession double m_dSalary Constructors:Default,Copy,Explicit Functions: 1/string GetProf(void),double GetSalary(void) 2/SetProf(const string val),SetSalary(const double val) 3/Output(ostream&) and Input(istram&) 4/Operators:<<,>>,=,==,<,double operator*(const CSalary&obj) Create Class CCalcCorr with private member variables: vector<CSalary>m_vCity1//data for city 1 vector<CSalary>m_vCity2//data for city 2 double …

Software Development algorithm c++ file-stream
Member Avatar for tinstaafl
0
355
Member Avatar for tiger86

I've decided to write a Website in C++. I am sick of dealing with languages that layer on top of other languages, so I just want to write it in C++. I know about CGI++, but I was wondering if there were any other tools or methods used for writing …

Software Development c++
Member Avatar for zelrick
0
3K
Member Avatar for jamesjohnson25

There are two methods in different classes public EmployeeBean viewEmployeeByID(String EmployeeID) public EmployeeBean findByID(String id) Given, the description of each method of what it supposed to do public EmployeeBean findByID(String id) This method should use the JDBC select statements to retrieve the record based on the given Employee ID, Store …

Software Development java
Member Avatar for jwenting
0
357
Member Avatar for chubbyy.putto

what I am trying to do is store same letter to same node. For example: let say I have person, people is sent to be put into a node. This will create two node. I want to some thing like P: Person People Person and People are same note When …

Software Development c++ data-structure visual-studio
Member Avatar for bernardo.mclobo
0
418
Member Avatar for Nation

I have an elementary understanding of Atrificial Neural Networks but I havent worked on any project so far. I was asking you guys to recommend me some mini projects that can help me have a deeper understanding of Artificial Neural networks.

Software Development
Member Avatar for bernardo.mclobo
0
191
Member Avatar for JordanAMAN

I tried to make a program that would give the whole factors for an inputed number. When i run it throught the command prompt it gives me a bunch of 1's, how do I make it to print each factor only once? import java.util.Scanner; public class Factors { public static …

Software Development java
Member Avatar for Taywin
0
261
Member Avatar for baabjitvk

hi everybody.. I'm implementing an interface in vb6. In that I'm creating dynamic controls like comboboxes, buttons etc. how can i identify a button click that is created dynamically. if the button is clicked, then only i can move to next stage.. i.e. i have to write code for that …

Software Development gui visual-basic
Member Avatar for rproffitt
0
332
Member Avatar for JordanAMAN

I am trying to write a program where the user can enter a height and width and it creates a hollow box of asterisks. I can get the stars to print out but what is wrong with my code that it is putting them in weird lines. How do I …

Software Development java
Member Avatar for JamesCherrill
0
967
Member Avatar for eman neercs

I'm trying to run a python script from the cron but get the error "No module named requests" Traceback (most recent call last): File "testscript.py", line 2, in <module> import requests ImportError: No module named requests The script will run from the console but not through a cron job. I …

Software Development file-system python
Member Avatar for eman neercs
0
5K
Member Avatar for LukeJWhitworth

Hello, I am looking to return all the usernames and SIDs of users on a computer or network. Has anyone got any idea how to do this? I know I can return the SID of the current user using the code below: System.Security.Principal.WindowsIdentity.GetCurrent().User.ToString Any help with this would be great! …

Software Development listview vb.net
Member Avatar for Teme64
0
944
Member Avatar for Ahmed Padela

Please help me to solve the following program in C++ array. After compile message appears [B]"Possible use of "i" before definition.[/B] [code=c++] #include<iostream.h> #include<conio.h> void selsort(int [],int); void main() { int AR[50],N,z; clrscr(); cout<<"How many elements do U want to create array with?(max.50)....."; cin>>N; cout<<"\n Enter Array elements.....\n"; for(int i=0;i<N;i++) …

Software Development c++
Member Avatar for David W
0
585
Member Avatar for glao

Hello , I can't understand why this loop doesn't work as I wanted. Why the continue statement isn't executed. I want the code to count **only** the user input which is 1 or 2 and stop when the sum is >=25. i = 0 user = input('Enter '1' or '2': …

Software Development python
Member Avatar for glao
0
153
Member Avatar for Aditya0025

hello i m writing a program in which i try to write on the frame by mousemotionlistener and mouselistener methods till now i did the writing part and i i want to start that writing by clicking the button Ok then another frame is open in which i can write …

Software Development gui java java-swing
Member Avatar for Aditya0025
0
451
Member Avatar for Ferron

Hello I've found a working script for what I want to do: https://www.daniweb.com/programming/software-development/threads/384778/copy-files-from-a-list-in-excel Imports Excel = Microsoft.Office.Interop.Excel Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'get the last saved settings btnCopy.Enabled = False txtExcel.Text = My.Settings.ExcelFile txtSrce.Text = My.Settings.SourceFolder txtDest.Text = My.Settings.DestinationFolder SetCopyButtonText() …

Software Development assembly microsoft-office session vb.net
Member Avatar for Ferron
0
314
Member Avatar for Dat One Lefty

I am trying to make a MS-DOS like program like python. I am adding a system to see if a command exists. the file "known.txt" contains: ['catfish', 'cls', 'dl', 'hello', 'help', 'help1', 'help2', 'info', 'logout', 'ping', 'run', 'stop', 'time'] This is the code i am using to run it: if …

Software Development python
Member Avatar for Dat One Lefty
0
163
Member Avatar for James_43

Hi all, I am able to pull data from a CSV file into a string array using the following code. public static string[,] ReadCSV(string filename) { //Read Text string whole_file = System.IO.File.ReadAllText(filename); //Split into Lines whole_file = whole_file.Replace('\n', '\r'); string[] lines = whole_file.Split(new char[] { '\r' }, StringSplitOptions.RemoveEmptyEntries); //Calucluate Rows …

Software Development
Member Avatar for ddanbe
0
285
Member Avatar for Juan_11

So i am new to c++, I don't know what is wrong with my program, I keep looking for the issue but can't find why it won'r run. So i am trying to develop a program which reads the numbers the user inputs and convert those into rows of asterisks. …

Software Development c++ ios
Member Avatar for David W
0
462
Member Avatar for sing1006

the error i get from visual studio is `Number of query values and destination fields are not the same.` below is my insert statement "INSERT INTO tbl_ViewAll(EquipTag, S_Name, S_Function, S_Failure, MC_No, MC_Name, MC_Function)" & "SELECT EquipTag,S_Name,S_Function,S_Failure FROM tbl_System UNION " & "SELECT MC_No,MC_Name,MC_Function FROM tbl_MainComp"

Software Development visual-basic visual-studio
Member Avatar for Santanu.Das
0
291
Member Avatar for Dat One Lefty

i keep getting this error: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'F:/Term/cmdrun/new.log' how can i make the logging module stop loggin to new.log so it can be moved and renamed?

Software Development python
Member Avatar for Dat One Lefty
0
161
Member Avatar for tashiDuks

Hi EveryOne, I have a following controls in my vb.net form: txtID txtName btnAddNew btnSave This form will be storing a values to the SQL Database (SQL Server 2005). In the txtID textbox the auto id should be generated when ever user clicks on btnAddNew. The ID should be generated …

Software Development sql vb.net
Member Avatar for Syed Hassan Abbas
0
2K
Member Avatar for Leon Guerrero

Hello everyone, I'm new around here and yes, I've checked the forum before posting this thread :) I'm having big troubles with an app (developed for Windows Mobile phones) that has, basically, to control the temperature of a room and send a message to the phone if something's wrong... Well, …

Software Development
Member Avatar for Erdogan
0
3K
Member Avatar for Elliander_1

I have a program nearly complete - it creates a bank object which creates within it customers and accounts of multiple types and can successfully load this information to display on the screen. The problem is that I am now trying to deposit or withdraw a given balance which has …

Software Development apple java
Member Avatar for Elliander_1
0
626
Member Avatar for Suzie999

In my project I give user opportunity to add or remove a column of a DataGridView. I do not know at runtime how many columns there might be, so in order to remove it or add one at index *n* , I need to know the column index clicked. So …

Software Development vb.net
Member Avatar for Teme64
0
395
Member Avatar for nugab

Hi everyone, I'm new here. I don't know VBA and have been tasked with a VBA project for whatever reason. We have a recurring bug wherein a report we receive has semi-fake rows, causing all kinds of hell. The current logic I am attempting to execute should run as follows: …

Software Development microsoft-office
Member Avatar for ddanbe
0
455
Member Avatar for mattster

Hi All, I've just tried to get going with Django using MySQL, but linking them has been a nasty headache. I am using Python v3.5, Django v1.9 and MySQL 5.6. I've definately got MySQL/Python talking, but Django always has the problem: File "X:\Program Files\Python\lib\site-packages\django-1.9-py3.5.egg\django\db\backends\mysql\base.py", line 25, in <module> import MySQLdb …

Software Development mysql python python-django
Member Avatar for cereal
0
603
Member Avatar for Melon Lord

Hello! I'm new to VB and I'm having trouble finding the correct formula for the Average Discount :'( Option Explicit Dim mcurExtendedPrice As Currency Dim mcurFifteenDiscount As Currency Dim mcurDiscountedPrice As Currency Dim mcurTotalDiscountGiven As Currency Dim mcurBookCount As Currency 'Declare module-level variables Private Sub cmdCompute_Click() Dim intQuantity As Integer …

Software Development vb.net visual-basic
Member Avatar for zelrick
0
325
Member Avatar for overwraith

I recently lost a job, pretty much because my previous employer expected miracles from an entry level coder. I was tasked with reading years worth of code developed in a sloppy manner (by another coder) in a production environment where I quite literally could not debug without disrupting somebody. There …

Software Development asp.net visual-studio web-browser
Member Avatar for jwenting
0
579
Member Avatar for Brandon_11

So the objective of this program is very similar to another C# homework problem (practically the same) but I am allowed to use arrays. I still need to set up the last error checking statement, but I wanted to finish and test with what I have so far. I have …

Software Development objective-c
Member Avatar for hericles
0
241
Member Avatar for CreatorZeus

So I'm working with time.h for this (copied from msdn): int main( void ) { struct tm newtime; char am_pm[] = "AM"; __time64_t long_time; char timebuf[26]; errno_t err; // Get time as 64-bit integer. _time64( &long_time ); // Convert to local time. err = _localtime64_s( &newtime, &long_time ); if (err) …

Software Development c++
Member Avatar for triumphost
0
2K
Member Avatar for zachattack05

Just a question on preference: Given a method that returns a boolean value, how would you write an If statement to check the return value of it? Like this? private bool MyMethod() { // doing stuff } private void OtherMethod() { If (MyMethod() == true) { // do stuff if …

Software Development
Member Avatar for JOSheaIV
0
577
Member Avatar for Ritesh_4

Hello I have a VB.NET project (using Visual Studio 2015 Pro) currently found on my PC, and would like to make it shared across my LAN with others so that they can pull a copy on their own PC and work on it, and push their changes to the project, …

Software Development asp.net vb.net visual-basic visual-studio
Member Avatar for gusano79
0
1K
Member Avatar for TheFearful

Hey guys, I am trying to figure out how to do a double transposition cipher. This is what I have so far to take in a string and then put that string a 2x2 array of a fixed size that I made. I have the key that I want to …

Software Development c++
Member Avatar for TheFearful
0
2K
Member Avatar for screenedcreamy

Hello, I am getting this error org.apache.jasper.JasperException: The absolute uri: <requiredURI> cannot be resolved in either web.xml or the jar files deployed with this application. Although the required jar is present in the classpath I am still facing this issue. But if I insert the same jar into web-inf/lib folder …

Software Development apache java
Member Avatar for screenedcreamy
0
245
Member Avatar for Jacktheclimber

Can someone please help me write a convertor for Hexidecimal to Decimal, has anyone found a way to allow for the entries to be able to be multiplied as integers, even if the input is a character and not a natural number. Thanks Jack

Software Development python
Member Avatar for vegaseat
0
201
Member Avatar for toxicandy

First off, here is the code I will be referencing: package com.airamerica.dataConversion; import com.airamerica.Airports; import com.airamerica.Person; import com.airamerica.Products.Products; import com.airamerica.Products.Tickets; public class FindObject { public static Airports findAirport(String airportCode, Airports [] airportsArray){ Airports airport = null; for(int j = 0; j < airportsArray.length; j++) { if (airportCode.equals(airportsArray[j].getCode())){ airport = airportsArray[j]; …

Software Development java
Member Avatar for overwraith
0
290
Member Avatar for cambalinho

i have these code for save a structure data to a file and then read it: struct user { string name; image foto; string adress; int age; }; user usrName={"joaquim",image("C:\\Nova pasta\\acrobat.bmp"), "viseu",32}; user usrName2; FILE* f = fopen("C:\\Nova pasta\\username1.dat", "w+b"); if(f==NULL) DebugText("error"); fwrite(&usrName, sizeof( user), 1, f); fseek(f, 0, SEEK_SET); …

Software Development c++ data-structure
Member Avatar for Herry_1
0
461
Member Avatar for fonzali

hi , I have two different versions of python on my ubuntu machine : 2.7 and 3.4 . my question is how to tell sys.executable to use python 3.4 ? this is what I get when I run the code : `>>> import sys >>> print sys.executable /usr/bin/python which is …

Software Development python ubuntu
Member Avatar for fonzali
0
1K
Member Avatar for Labdabeta

Hi. I am familiar with the following C graphics libraries: Cairo, SDL, SDL2, and OpenGL. The problem I have found with these is that they either require shared libraries (Cairo/SDL/SDL2) or are difficult to make cross-platform (OpenGL). I am wondering if there are any graphics libraries for C that do …

Software Development c image opengl
Member Avatar for gusano79
0
2K
Member Avatar for James_43

Hi there, I'm still fairly new to programming. Would someone be able to explain exactly how different windows should be used in MS Visual Studio? It seems that variable sharing between different windows is problematic. So does that mean that if you are trying to do multiple things on one …

Member Avatar for ddanbe
0
287
Member Avatar for Varunkrishna

Hi guys why am I getting the error identifier expected at the package statement ? Here is my code. package com.example.abstract; public abstract class Car{ private double price; private String color; private String year; private String model; abstract double accelerate(); abstract double horsePower(); public void setPrice(double price){ this.price = price; …

Software Development java
Member Avatar for Varunkrishna
0
1K
Member Avatar for M.I.Sahil

hi all, I m developing a software in vb6 as front end and oracle 11g as backend (i.e. as database) I have desinged some reports with oracle reports builder, how i can call in vb6 program/how to add the oracle reports in vb6 programe. Thanks in advance for help.

Software Development oracle visual-basic
Member Avatar for M.I.Sahil
0
188
Member Avatar for Tcll

so what I'm doing is building my own python IDE using PyQt. nothing can do what I need it to without a loss of something else, let alone properly. so I'm using a QPainter and getting the best results yet. however I'm having a problem trying to build indent guides …

Software Development ide python
Member Avatar for Tcll
0
500
Member Avatar for zampi91

Hi everyone, I have registered a rotary encoder in /dev/input/event0 and i try to test it with evtest. This is the output of the test: Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0 Input device name: "rotary.4" Supported events: Event type 0 …

Software Development c c++ qt
0
330

The End.