43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for stuartlross

I am a newbie to python so exude the not so well constructed code.. I have two text files. The first one (WordFile1.txt) is " John Mary Joe alice William ….." The second (SearchText.txt) is "JOHN EGGS,24,BEEF,36,BACON,56,HAM,66 ALICE TOMATOES,16,HAM,35,BEANS,35" ……." If my response number is 2 I will get BEEF …

Software Development programming-construct python
Member Avatar for woooee
0
288
Member Avatar for salah_saleh

Hi, I have a problem understanding what is going on in this code: #include <iostream> #include <omp.h> using namespace std; class A { public: A() { cout<<"A created"<<endl; }; ~A() { cout << "A destroyed" << endl; } void printA( void ) { cout<<"ok"<<endl; } }; int main() { A …

Software Development c++
Member Avatar for salah_saleh
0
132
Member Avatar for Zubi0777

public void printmembersdetails() { System.out.printin(member.FirstName = firstname); System.out.printin(member.LastName = lastname); System.out.printin(member.IDNumber = IDnumber); System.out.printin(members.PhoneNumber = PhoneNumber); } System.out.printin(member.FirstName = firstname); System.out.printin(member.LastName = lastname); System.out.printin(member.IDNumber = IDnumber); System.out.printin(members.PhoneNumber = PhoneNumber); } is this right

Software Development java
Member Avatar for JamesCherrill
0
130
Member Avatar for StephenopolousINC

Hello I am trying to create a class that called Lootable and create subclasses such as trunk, locker, etc. that will contain items that can be looted, they will inherit their lootability from the Lootable class. I am thinking of using the ArrayList for this. I have thought of different …

Software Development java ruby user-interface
Member Avatar for StephenopolousINC
0
929
Member Avatar for Ritesh_4

Hello Anyone can help me derive a validation for French phone numbers, given the following: String (max 255 chars) French telephone formats (0123456789, +33123456789, 0033123456789) T.I.A.

Software Development java
Member Avatar for Ritesh_4
0
136
Member Avatar for oks1998

Dim hTable As Hashtable = New Hashtable() Dim duplicateList As ArrayList = New ArrayList() Dim itm As ListViewItem For Each itm In ListView1.Items If hTable.ContainsKey(itm.Text) AndAlso hTable.ContainsKey(itm.SubItems(1).Text) AndAlso hTable.ContainsKey(itm.SubItems(2).Text) AndAlso hTable.ContainsKey(itm.SubItems(3).Text) Then 'duplicate duplicateList.Add(itm) Else hTable.Add(itm.Text, String.Empty) End If Next 'remove duplicates For Each itm In duplicateList ListView1.Items.Remove(itm) Next I …

Software Development listview vb.net
Member Avatar for tinstaafl
0
1K
Member Avatar for DM Galaxy

Actually I want to know How We can Create an installer? I just Create an application in VB.Net (Folder Locker) and want to create installer for it. # • What I Want? # 1. Compressor (As to compress file size) 2. Want to add my Installer to be placed on …

Software Development vb.net
Member Avatar for Uchiha Itachi
-1
324
Member Avatar for sk8ergirl

Hi, I've done with my project and the instructor said that the file should be excutable file how can I run my project wothput netbean .. I'm using macbook

Software Development java
Member Avatar for JamesCherrill
0
370
Member Avatar for saad749

How to correctly/standardly define schema for neo4j database in my C# application? In my application, I have nodes with properties and relations with properties. I want to define templates/Classes of these nodes and relations that can then be created and related at run time and retrieved as objects of a …

Software Development c# github
Member Avatar for saad749
0
319
Member Avatar for Necrozze

Hi, I need to make a program that can count and solve basic math problems (addition, subtraction) with natural integers using strings. I'm not aloved to use parseInt so thats basicly where my world started to fall apart... Would realy appreciate if someone could help me with this. The code …

Software Development java
Member Avatar for Necrozze
0
359
Member Avatar for meja

You are given a task to write a computer program for a Coffee Shop. Following is the table containing the list of product that you sell. Please be informed that all sales must include Sales Tax of 5%. For example if the customer orders one coffee with ice and creamer …

Software Development c++
Member Avatar for Ketsuekiame
0
230
Member Avatar for venkates.99

1)On receipt of the signed MSA back from the customer, the original should be sent to the legal representative and a controlled copy should be sent to the TM/Account Manager by ___________. B D M DM 2)Runtime Profiling is used by which category of users? Developers and System Administrators Configuration …

Member Avatar for deceptikon
-1
487
Member Avatar for tony75

Hi I would like my python script take screenshot of my desktop every 15 mints and saving in my home dir in pic folder.but I get error? import os import sys import time import ImageGrab environ=os.environ img = ImageGrab.grab() FILES_DIR = 'pic' SAVE_PATH = os.path.join(environ['HOMEDRIVE'], environ['HOMEPATH']) LOGFILE_NAME = 'test.png' LOGFILE_PATH …

Software Development python
Member Avatar for tony75
0
4K
Member Avatar for satti

In sql server we use schema but iwant to know that how we get data from a specific column by selecting its column name. there is a combo box that contain column names , now i want that when we select column name in combo it show the data of …

Software Development vb.net
0
147
Member Avatar for SMYussef

Dear all, I am trying to write a code that would take in an array of numbers(salaries) and then calculating the mean and standard deviance. The number of salaries is first asked from the user, therefore the number of elements in the array is not predefined. I have written the …

Software Development java
Member Avatar for SMYussef
0
1K
Member Avatar for Learner010

i've 9 button(i've set "" to button text) there and all buttons have almost same code as button1 has and here is the code :- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If (exitgame = 0) Then If (Button1.Text = "") Then Label2.Text = "Active …

Software Development vb.net
Member Avatar for Learner010
0
124
Member Avatar for a8med

I nead too run a python program from another code. I have the main code wher you can chose what too do and if you chose 1 you will run a surten python program and then return and if you chose 2 you will run some other program and then …

Software Development python
Member Avatar for a8med
0
126
Member Avatar for bugmenot

Please find and correct the error in my c++ program. "Linker Error: Undefined symbol _main in module c0.ASM" The program is for transfering content of one file to another. #include<fstream.h> #include<iostream.h> #include<conio.h> class student { int rollno; char name[20]; int tm; public: void input(); void transfer(); void output(); } obj; …

Software Development c++
Member Avatar for NathanOliver
0
2K
Member Avatar for Pobunjenik

Hello dear codegurus! I've been working on a pet project of mine for 3 weeks now, and I think it is ready to be released into the open! However, just for cosmetic purposes, I would **LOVE** to add an icon (both for the application and in the upper left corner …

Software Development java
Member Avatar for Pobunjenik
0
334
Member Avatar for cool_zephyr

i have a simple note and images storing java program that stores data into the server..i'm confused about what to use for building the server..should the server be built using sockets?? or which listens for http requests (the client sends json data)?? could anyone please tell me which one would …

Software Development http-protocol java json socket-programming
Member Avatar for cool_zephyr
1
299
Member Avatar for ajit.nayak

Dear all I have downloaded matplot lib for python2.7.2 windows using[(http://matplotlib.org/downloads.html)][Click Here](http://www.) . As per example i tried coding i found pyplot is not highlighted.i have attached test.cv file for which graph has to be plotted import csv import matplotlib.pyplot as plt plt.figure() def main(): pass if __name__ == '__main__': …

Software Development python
Member Avatar for Gribouillis
0
697
Member Avatar for pritaeas

Anybody familiar with AutoVue? Am using Desktop V20.2.2 embedded in a WinForm. Am looking if it's possible to set the background color. So far I haven't found any conclusive answer whether or not this is possible.

Software Development
Member Avatar for pritaeas
0
389
Member Avatar for dean.ong.14

# calc.py - a Python calculator from tkinter import * # the main class class Calc(): def __init__(self): self.total = 0 self.current = "" self.new_num = True self.op_pending = False self.op = "" self.eq = False def num_press(self, num): self.eq = False temp = text_box.get() temp2 = str(num) if self.new_num: …

Software Development python tkinter
Member Avatar for Gribouillis
0
14K
Member Avatar for alina.nazchowdhury

After build and debug my program, i want to publish it, and after is installed in my compiuter, i want the program will have the icon that i want to use, not by default. Like any other program, i want my program will have to an icon. Please help me …

Software Development vb.net visual-basic
Member Avatar for ACE--
0
154
Member Avatar for aVar++

Hello, This if statement is always returning true and I cannot see why. Could you guys tell me why? menu = input("Choose what you would like to do:\n\n1. Work out how far you will travel with a set time and speed\n2. Work out the speed you will need to travel …

Software Development programming-construct python
Member Avatar for Gribouillis
0
249
Member Avatar for murali2489

Hi Team, I have written a Sample Code in which I cast SubClass reference to point to SuperClass Object. It behaves like a SuperClass reference ( I mean when i try to use Methods which are not in SuperClass,it throws error so it means it is an instance of superclass) …

Software Development java
Member Avatar for murali2489
0
176
Member Avatar for Alonso_1

So I'm trying to count the number of occurrences of each digit within an array. My code I've got so far looks like the following: #include <stdio.h> #include <string.h> int main() { int numbers [10]= {1, 4, 5, 5, 5, 6, 6, 3, 2, 1}; int count = 0; for(int …

Software Development c
Member Avatar for deceptikon
0
3K
Member Avatar for ObSys

Ok so I'm writing a program that outputs text to a file. Currently, I am writing it to a .TXT file for ease and convenience. Ideally, I would like to output some of the information so that it is formatted with Italics. I'm thinking that using a RTF file would …

Software Development java
Member Avatar for JamesCherrill
0
278
Member Avatar for rayborn66

Hi I need some help. I am trying to write a program that will search a file for numbers of type int and write the largest and the smallest numbers to the screen. This is how far I got but when I it came to writing the code that would …

Software Development c++ file-system
Member Avatar for Emran__
0
2K
Member Avatar for castajiz_2

So i want to hodl my mouse and by moving the mouse i want my vector to rotate around, which of the built in events should i use? i tryed mousedown event but that s not what i m looking for obviously.Maybe i should combine two mouse events instead?

Software Development
Member Avatar for castajiz_2
0
160
Member Avatar for amrahim

Hi, Please help, I don't know how to use arabic language in text box or label(caption) in VB6. I try to change language but the sign "?????" appears in text box. Please help me. TQ.

Software Development visual-basic
Member Avatar for el fahem
0
2K
Member Avatar for tunisia

Trying use radio buttons to select which host I'm referring to since ultimately there will only be two and they are fixed addresses. This is the error: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1410, in call return self.func(*args) File "Untitled 2.py", line 63, in command=lambda: callback_power_off(off, host)) File "Untitled 2.py", line 28, in …

Software Development python tkinter
Member Avatar for woooee
0
386
Member Avatar for Labdabeta

Hello, I can get OpenGL to render 3D scenes to the screen, but I want to render them to a pixel array. Basically I want some magical code to fill in the blanks for this code segment: int width=500; int height=500; uint32_t *colours=new uint32_t[width*height]; //Magic code! glBegin(GL_TRIANGLES); //other drawing stuff, …

Software Development c++ image opengl
Member Avatar for Labdabeta
0
5K
Member Avatar for refphlex

Hi, I've been having trouble getting the average and letter grades to print and they are outputting as 0 .. I tried everything calling the average function etc. but I still get a zero. Any advice? I don't have any other problems just need help with the average function and …

Software Development c++ data-science
Member Avatar for refphlex
0
454
Member Avatar for Rohan_1

Can u plz help why dis happens? I was told to write a cpp program to find the factorial of a number using go to

Software Development c++
Member Avatar for Ancient Dragon
0
205
Member Avatar for Jade87

Hello, I've created a script that parses and downloads images from a website however now what I want to do is create a script that matches the files I've downloaded against common image file type signatures and then tells me how many of the files aren't those types. I'm still …

Software Development python
Member Avatar for Jade87
0
375
Member Avatar for tukky

Hi guys, Im currently working on a java project but ive come across a small minor problem. I have 4 main classes that im working with. TextReader, WordCount, WordCollecter and DisplayWords. The **TextReader** class reads an input file and a method called *readNextWord* will return the next word from the …

Software Development java
Member Avatar for tukky
0
592
Member Avatar for ashu.dasgupta

frequent utility of inline function

Software Development c++
0
154
Member Avatar for castajiz_2

int main(int argc, char** argv) { FILE *f; char string[100]; int counter=0; f=fopen("New Text Document.txt","r"); if (f==NULL) { printf("error"); } while(!feof(f)) { fscanf(f,"%c",&string); } fclose(f); for(int i=0;i<100;i++) { if (string[i]=='a') /*doesnt work, why?*/ { counter++; } } printf("\n the number of vowels a is : %d",counter); getch(); return 0; } …

Software Development c
Member Avatar for deceptikon
0
151
Member Avatar for Pyler

would you just do @Override public boolean contains(T param){ return hashTable[function(param)]!=null; }

Software Development algorithm java
Member Avatar for JamesCherrill
0
220
Member Avatar for Derek_4

I know I am probably over thinking this but I cannot seem to figure this out. I am trying to check if the value is null and if not to continue. /** * */ public Item getItem(String theItem) { Iterator iter = myItems.iterator(); while(iter.hasNext()) { Item anItem = (Item) iter.next(); …

Software Development java programming-construct
Member Avatar for sebastianedu
0
298
Member Avatar for Gà_1

My program doesn't have compile-error but it sometime struck in 201 runtime-error. I don't know why, please someone help me. Here is my program: program TestNumber; uses crt; const fi='D:\program\text\ipTestNumber.txt'; fo='D:\program\text\opTestNumber.txt'; type proint=record len:word; //length of proint. val:array[1..256] of byte; //value of proint. sign:boolean; //is smaller than zero? end; dummy=string; …

Software Development pascal
Member Avatar for pritaeas
0
155
Member Avatar for nathan.pay.9

Hi everyone, I've been taking a Intro to Java class this year and been enjoying it, I recently had a assignment which was a simple dice game, however I was wondering if a few tweeks could be made. 1. Could we ask the user how many dice they want to …

Software Development java
Member Avatar for nathan.pay.9
0
473
Member Avatar for VIPER5646

Hi all I Currently have a MDI Form that contains a DataGridView. When I open a dialog form as a MDi MdiChildren the dialog form partionly hides behing the Datagridview. (I also tried with a windows form same thing happens). Can any one help me solve this with out having …

Software Development vb.net
Member Avatar for VIPER5646
0
351
Member Avatar for zortar

xhi, my task is to make a script, which displays the string read from console input in the form of 1 letters / line only. my code looks like this so far read string hossz=`expr length "$string"` for i in `seq 1 $hossz` do echo `expr substr $string $i 1` …

Software Development shell-scripting
Member Avatar for zortar
0
301
Member Avatar for Derek_4

For some reason this is only returning the description of a single item in the HashSet even when there are several items. I am not sure if the (Item)iter.next() is only getting the description of the first item in the list and that is why. /** * */ public String …

Software Development java
Member Avatar for JamesCherrill
0
228
Member Avatar for jackslv

This is just a piece of code I've found over the Internet, and I'm trying to understand why the output is 3 1 1 2 1 1 2 3. Could anyone explain using a stack representation or something else, I am really stuck on this one. #include <iostream> using namespace …

Software Development c++
Member Avatar for jackslv
0
235
Member Avatar for Derek_4

I am having trouble adding an item that will increase a player's energy in my BlueJ game. At the bottom of the createRooms() method in my game class I have added several items to rooms. At that point I tried setting boolean newEnergy equal to true. If the player types …

Software Development java
Member Avatar for Derek_4
0
328
Member Avatar for manel1989

hi all i use gecode solver to solve my model ; but i get this error Access Violation when reading of the location 0x0000001c and i don't konw how to fix it here is my code : #include <gecode/driver.hh> #include <gecode/int.hh> #include <gecode/minimodel.hh> #include <iostream> #include <vector> using namespace Gecode; …

Software Development c++ matrix-multiplication
Member Avatar for Ancient Dragon
0
627
Member Avatar for thrisha

I want to encrypt and decrypt an excel file via RC4 algorithm Obtained a code in c. I want for encryption and decryption of excel file in c#.

Software Development algorithm encryption
0
126

The End.