43,549 Solved Topics
Remove Filter ![]() | |
Hello, When I'm using the 'open' function how should I specifiy the directory ? I'm getting an IOError and bit of confused! I'm not sure if my script is wrong or I've problems with specifying the directory. input = open('New.txt', 'r') text = input.read() wordlist = text.split() wordfreq = [wordlist.count(p) … Software Development python | |
Can someone please! Fix this for me? My program : loop reads 10 double numbers after that inserts them into an array list. after that print MAx and MIn And AVg THIS MY PROGRAM WHY I CAN NOT MAKE COMPILE Fix this for me : import java.util.Scanner; import java.util.ArrayList; import … Software Development java | |
Hello everyone! Is there a way in VBA to find a file name that has an unknown portion to it? Let me explain: Our computer system is UNIX based. It is creating a text file for us that uses the date, the hour, minutes and seconds that the file was … Software Development file-system microsoft-office unix visual-basic | |
Am using GetProgrammDir to get my application folder and it works but I need more control over it were I can select folders inside or outside of my program say there 2 folders Data and Items data will store exe and items will store information txt but the data will … | |
if corrct this code it will come of the list in the datagridview in VB from access this my code: Private Sub ComboBoxadm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxadm.SelectedIndexChanged Dim conn As New System.Data.OleDb.OleDbConnection() conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\temp\Database1.accdb" If conn.State = ConnectionState.Open Then conn.Close() conn.Open() Dim sql … Software Development microsoft-access open-source visual-basic | |
There are a lot of examples demonstrating how to connect to ms sql database from windows form application using Visual Studio Professional (right-clicking on the project name -> "Add" ->"new item" -> "LocalDatabase" -> give a name with .sdf extension to the newly created database - > and so on … Software Development sql visual-studio | |
Hello, I'm trying to script a Caesar cipher with the key, I find this exercise too much for me at this moment! I just can't come up with an algorith to get this done. Please advise. key = {'a':'n', 'b':'o', 'c':'p', 'd':'q', 'e':'r', 'f':'s', 'g':'t', 'h':'u', 'i':'v', 'j':'w', 'k':'x', 'l':'y', … Software Development python | |
python function that creates automatically a dropdown year selector (that is a "select" element poulated with all years starting from current and dating back to a given year)? I don't need day/month (otherwise i'd have used the datepicker), i just need the year! Thanks in advance Software Development python | |
don't work this: bg_fon2 = PhotoImage(file='2.GIF') from tkinter import* import random root = Tk() root.geometry("896x626") canv = Canvas(root, height = 626, width = 896) bg_fon = PhotoImage(file='fon.GIF') canv.create_image(0,0,image=bg_fon,anchor='nw') class Fish: image = 0 coor = 0 direct = 0 real_img = 0 obj = 0 canv = 0 def fiish1(): … | |
hii I have a list having m1 m2 m3........ m922 and in each there are a1 a2 a3 a4 are there like m1=a1 a2 a3 a4 a5 a6 m2=a1 a2 a3 a4 a5 a6 m3=a1 a3 a5 a7 a8 a2 etc and i want this as m1=a1 a2 a3 a4 … Software Development python | |
Is this considered good form when writing cross-platform code? #! /usr/bin/env python3 And how about this? if __name__ == "__main__": main() I've reviewed some recent sample snippets and not all of them use the shebang and the conditional main call, so I wasn't sure whether that is still considered good … Software Development python | |
Hi, I am a newby and am surprised I made it this far. My program is a TicTacToe program. I am having troubles with checking the validity of each move. I have tried multiple things, but could not figure it out. If someone could help point me in the right … | |
This is what I have so far :/ #include <iostream> using namespace std; int main() { int i; for (i = 1; i <= 12; i++) { cout << i; if ((i = 4) && (i = 9)){ cout << " \n"; } else { cout << endl; } } … Software Development c++ | |
Hello everyone I can export texblock.text and label.text to word. But there is no styling found back in the word document For example the background-color won't export. I use this as a conformation document. How can you also export the style of the form and can you export a table … Software Development | |
Hi guys Just started to get into Python so this site seems liek a gtreat resource for hints and tips. Nice to meet you all. Ben Software Development python | |
Hello i need some help on what to add to the following if statement for the out put to read the value of sum times the actual number of sum: public class ICMA42 { /* instance variables */ private int alpha; private int bravo; private int sum; /** * Constructor … | |
public class ICMA42 // instance variables - replace the example below with your own private int alpha; private int bravo; private int sum; /** * Constructor for objects of class sum which initialises sum to 0. */ public ICMA42() { this.alpha = 0; this.bravo = 0; this.sum = alpha + … Software Development java | |
I'm learning python (and programming in general) through Runestone Interactive. What do people think of that site as a place for beginners to learn python? Also, is there any harm in trying to learn perl and web design languages at the same time? I'm concerned about becoming confused. Software Development perl python web-design | |
i want to make my own splash screen. which appear on start of my program and after it finish my login screen come. i write one program based of 3 timers which is working fine but it not loading my form2 the code is Public Class Form1 Private Sub Timer1_Tick(ByVal … | |
Hello again :) I'm trying to define a simple "spelling correction" function that takes a string and sees to it that 1) two or more occurrences of the space character is compressed into one, and 2) inserts an extra space after a period if the period is directly followed by … Software Development python | |
How much of a source language's characteristics and ways of doing things is seen in a compiled executable? Let's say you use C++ and BASIC (compiled) to write 2 programs that functionally do the same thing. You compile them both on the same computer(and OS of course). How different will … Software Development | |
I am having problems with it continuous loop at the end of the program. Any help would be appreciated. Thank you. Below is the coding so far. [CODE]import static java.lang.System.out; import java.util.Scanner; import java.io.*; public class Investment { public static void main(String[] args) { double principal = 0; double interest … Software Development java | |
num = int(input("Enter a number: ")) if num==0 or num<0: continue else: if num > 1: if (num % i) == 0: print(num,"is not a prime number") print(i,"times",num//i,"is",num) break else: print(num,"is a prime number") Software Development python | |
I've to write a function that takes a list of English words and returns a list of Swedish words. For example, {"merry":"god", "christmas":"jul", "and":"och", "happy":gott", "new":"nytt", "year":"år"} used to translate English into Swedish. def translate(a): a = {"merry":"god", "christmas":"jul", "and":"och", "happy":"gott", "new":"nytt", "year":"år"} for k, v in a.iteritems(): print k,v … Software Development python | |
Is there are an easier way of serializing a vector attribute of an object in c++ using sqlite3? | |
Hi, If you look trough my code you can see that i have tried to print out some values (the mean value) with a scanner from a csv file with the help of an enhanced for loop (the absolut last loop) and it gives me NaN (not a number). And … Software Development java | |
Hello, I'm trying to define a function that takes an integer 'n' and a character and returns a string, 'n' characters long. I'm totally lost and I've nothing. I read in a forum "".join might help. But that too is beyond perceivable for me at this moment. I do have … Software Development python | |
i write this code in my program to encrypt my files but it showing me warning Warning 1 Variable 'csCryptoStream' is used before it has been assigned a value. A null reference exception could result at runtime please guide me. when i run the software it work fine but i … Software Development vb.net | |
Hi, Dear Friends im new with Crystal Report, i have created the crystal report by using the step by step procedure from the following link: [URL="http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-stepbystep.htm"]http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-stepbystep.htm[/URL] Now When i run it it always asking me the username and Password, i am using MS ACCESS Database, and i didn't set any … Software Development | |
Hello, I've been trying to write a function that takes a value (i.e. a number, string, etc) x and a list of values a, and returns True if x is a member of a, False otherwise. This is the script I could think of. I'm not even sure what might … Software Development python | |
I"ve been working on this dice game for the past few days. I made sure the game itself worked properly then I added a draw dice function that would show you the dice that were rolled on the canvas. I needed a continue button to make the rest of the … | |
Although I've been programming as a hobby for a while, most of it has been procedural and I've done very little OOP, and not very competent with the inheritance hierarchy of classes, which is the reason for my post here, to get a bit of advice as to whether im … Software Development oop | |
I'm trying to use this code, but it will only display the image in jtextpane and it does not display the text. JLabel label = new JLabel("<html>some text here<img src='http://www.yoursie.com/image.jpg'></html>"); then using this label in JTextPane. | |
I have written a program which allows the user to see specific SVN revision of a directory. It consists of an advanced TreeView and a ListView. The Treview is populated by the directory the user has specified and the ListView is populated when the user enters a revision number in … Software Development listview | |
I'm actually helping my wife. She's learning Python. Me? VB.net and C# are my preferance. So I try to help her. All she wants to do is paint a command button, use this to launch another program written in python. I have spent the past few days trying to find … Software Development machine-learning python visual-studio | |
Hello, I have a code I'm working on that is supposed to keep track of airline tracks. You need to know the airline name, the flight number, and the date and time of a set of flights. Once you have a set of flights, you would like to be able … Software Development c++ | |
Good day! Is there a way to make the data report to show only the fields selected by the user? I have a form where the user can select the fields(from ms access table) in the list box(checkbox enabled) to show in data report. The total fields is almost 50. … Software Development display visual-basic | |
I'm trying to learn scripting in Python. So, I started using an exercise and it had this question for me. Define a function that computes the length of a given list or string. And I can't use the built in function len(). I tried the code below and I can't … Software Development python | |
Now retiring and would like to resume hobby of writing programmes. Is VB6 Enterprise the one to buy or has it been superceeded? Software Development visual-basic | |
write a program that create an array with size provided by the user,let the user enter the value, after the data has been entered,have your program output the values with index number. Software Development c++ | |
My code does not appear to be formatting correctly when I ctrl k,f. looks like this... namespace CS_TexasHoldem { class Card { private char suit; char value; public Card() { } } } Does that look weird? What can I do about it, I'm pretty sure it does not do … Software Development | |
Am currently using the following code to build my userlist but the down side to this is it will loop names over and over making duplicate names so am having to do extra code to stop same names showing up in list so am wondering if there a more professional … Software Development pascal | |
count the number of lines of code in a file, excluding blanks and comments also Count How many classes, Count How many function or procedures, how many lOC in each function or class, Count the lOC in each part to get the total program size ? Software Development vb.net | |
Hi I installed a different version of Python but how to choose edit with IDLE to open scripts in python 2.7 or python 3.2 on my Windows desktop? Software Development python | |
I find a code that sorting the names and at this program shouldnt be difference Between "a" and "A" and my Question is what does line 20 said ..!? #include <iostream> #include <string.h> #define MAXNAMES 100 using namespace std; int compare(string s1, string s2){ int i; for ( i = … Software Development c++ | |
Implement a C function that can perform addition of two 15-digit (positive) integers. As in C the maximum integer number that can be stored in memory is 2147483647 it is not possible to use primitive data types in order to add very large whole numbers. For this reason, you are … Software Development c++ | |
Recently I've been fooling around with some fun mathmatic (dont knwo if that is even a word) stuff. I recently took on the task of trying to calcualte PI. I have a very simple program in python that does this for me: import math from datetime import datetime top = … Software Development python | |
Hello there, I have this code: If listItem.SubItems.Item(0).Text = " " Or listItem.SubItems.Item(0).Text = "" Then ListView1.Items.Remove(listItem) End If Now is it possible to make somehow to it actually count how much items got removed ? Want to show it example as: 'Clearing completed. XX Lines were removed.' Software Development vb.net | |
I've written the following program..but it doesn't work. Why? It shows an error: `cannot convert ‘std::string* {aka std::basic_string<char>*}’ to ‘std::string** {aka std::basic_string<char>**}’ for argument ‘1’ to ‘void print(std::string**)’|` #include <bits/stdc++.h> using namespace std; void print(string *ar[]) { for(int i=0; i<5; i++) { cout<<*ar[i]<<endl; } } int main() { string s[5]; … Software Development c++ |
The End.