43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for TrustyTony

Ordering objects is one thing that is changing as we will move to Python3 Python 2.6 gives interesting results [CODE]a=[1,'23',('a','b'),False,[[]],[],'bc',['ab','34'],45,'0',{},True] >>> sorted(a) [False, 1, True, 45, {}, [], [[]], ['ab', '34'], '0', '23', 'bc', ('a', 'b')] >>> print True==1 True >>> print False==0 True >>> print False=='' False [/CODE] Python3 …

Software Development python
Member Avatar for vegaseat
0
219
Member Avatar for ubi_ct83

Hi and thanks for viewing my thread, i have a problem with JComboBox. in my situation, i have a code that display JTextArea and JComboBox. this is my code: [code] public class JScrollPanes extends JApplet { //-------------------------------------------------- static String[] t_value2 = { "2", "3", "4", "5", "6" }; // ----------------------------------------------- …

Software Development java
Member Avatar for javaAddict
0
64
Member Avatar for sennat_26

Hi, Im currently in a situation to get all the application name that is currently running in windows but i can get only the processes that is currently running using the following code Process p = Runtime.getRuntime().exec("tasklist.exe /v "); Can anyone help me out in getting the application name... Thanks …

Software Development java
Member Avatar for sennat_26
0
3K
Member Avatar for charqus

If i have a listBox , with 10 elements ( or whatever ) , can i select a element and to change it's color ? Only for that element , not for all ... Something like: listBox Collection: [B]ENG [COLOR="#ff0000"]UNG[/COLOR] IT RO [/B] Like in my example , to choose …

Software Development
Member Avatar for charqus
0
113
Member Avatar for jgehlot09

I am writing a simple code in c to extract the values from string for ex-P23V32 gives me output of 23*32. But when I am trying to use the isalpha() and isdigit() to check whether the value is a charecter or a digit, the compiler return always zero. Here is …

Software Development c
Member Avatar for jephthah
0
211
Member Avatar for white feather

ok, so i have this [B]so far [/B] [CODE] String p = "(http|ftp|https):" + // sees if the proto is any of these " (\\:[\\w^\\:]+:)? " + // gets the sub-proto " \\/\\/" + // the two forward slashes "([\\w*.]+)" + // gets the subdomain(s), domain and tld "[\\:\\w*^"; [/CODE] …

Software Development java
Member Avatar for white feather
0
83
Member Avatar for Lee21

Guyz please help me on how to know the value of the specific character when i pressed the keyboard, a messagebox will pop out and tell's value of the character that I pressed. For example character a=65 "not sure if it's the real value of a" heres my code.. [CODE]Private …

Software Development vb.net
Member Avatar for Lee21
0
87
Member Avatar for Mikayil

Hi everyone, I am having problem with the relative path in VB.Net. My project contains PDF file that reside on the same directory as all project files. I am using WebBorwser control to open that PDF file. The code below shows what I am doing to display the PDF file, …

Software Development asp.net pdf vb.net
Member Avatar for Mikayil
0
3K
Member Avatar for sam8

Hi guys, I'm trying to count the comparisons in the mergesort algorithm so that I can compare it to other sorting algorithms. I've managed to get a count to work for insertsort but mergesort is being a complete pain! It's probably a very simple problem but I've experimented around with …

Software Development algorithm java
Member Avatar for sam8
0
472
Member Avatar for sam8

Hi guys, I'm trying to count and time the comparisons in the mergesort algorithm so that I can compare it to other sorting algorithms. I've managed to get a count and stopwatch function to work for insertsort but mergesort is being a complete pain! It's probably a very simple problem …

Software Development algorithm java
Member Avatar for sam8
0
465
Member Avatar for DumbProgrammer

Ok I've spent more time than you would believe on this one. I built the program, started from scratch. Over the course of the last week I've spent no shit about 30 hours on this and still cant get it to work right. What is suppose to happen is the …

Software Development c c# c++
Member Avatar for CanYouHandstand
0
129
Member Avatar for sarfrazashfaq

Hi there I have following hash related code in Perl that i need to translate in Python if ( exists $legs->{$reference} ) { logg(" 2nd leg of swapes: $ref - merging"); my $swap = merge_swap_legs( $legs->{$ref}, $fields ); $ref = new_fk_ref( $fxall, $ref, $swap ); } else { $legs->{$ref} = …

Software Development perl python
Member Avatar for leegao
0
244
Member Avatar for johnnyd1986

Hey everyone, I need help with a Python issue. This is what I have so far: [CODE]scores = [] choice = None while choice != "0": print \ """ High Scores Keeper 0 - Quit 1 - List Scores 2 - Add a Score """ choice = raw_input("Choice: ") print …

Software Development python
Member Avatar for Gribouillis
0
145
Member Avatar for jiraiya

Hi everyone, I've written a small program to convert combinations of English characters into their corresponding Chinese and Japanese equivalents, and it's working on my computer at home, so so far so good. However, I'd also like it to work on computers which don't have Chinese or Japanese fonts installed, …

Software Development java
Member Avatar for jiraiya
0
171
Member Avatar for Dcurvez

I have a question I am hoping someone canhelp me with. I have a form that consists of a Tab Control..that is filled with text boxes..a ComboBox..and a Notes Box. I just really dont know what extension to put in the SaveFileDialog :(. Can I just put something like *.* …

Software Development vb.net
Member Avatar for Dcurvez
0
95
Member Avatar for rcsamich81

Hi, I'm trying to hide 5 to 12 buttons on a form until a screenshot is saved to the clipboard. I have it set right now so the user clicks a button(btnSavePDF) and then whichever buttons are visible are made not visible. But I haven't a clue how to restore …

Software Development gui vb.net
Member Avatar for rcsamich81
0
3K
Member Avatar for xerreck

Hello everyone I am working on a secruity program Demo. The program should allow the user to enter a message, one character at a time. The program should then display the corresponding digit or punctuation according to the ASCII character set. For example, if the user enters the letter a, …

Software Development assembly
Member Avatar for xerreck
0
157
Member Avatar for dragontruong

This is what my debugger says, but I can't find the problem. Holding.h:15: warning: `class Holding' has virtual functions but non-virtual destructor In file included from p6.cpp:12: Recording.h:13: warning: `class Book::Recording' has virtual functions but non-virtual destructor p6.cpp:90: error: expected `}' at end of input Book.h:14: warning: `class Book' has …

Software Development c++
Member Avatar for mitrmkar
0
159
Member Avatar for trantran

I've look in the C++ standard and, when listing list of compound stuff, it does not mention anything like "pointer to [B]data [/B]member of an instantiated class". So the question is: [CODE]struct test{ int a; double d; ..... //more complicated stuff here to make it a NON-pod structure) .... }; …

Software Development c++ data-structure legal
Member Avatar for trantran
0
122
Member Avatar for WackyZ

Can someone please help me - I need to write a function that will validate UK postcodes written in a textbox but every tutorial and example source code I find for it is in other languages such as VB and Javascript. The VB code looks extremely small: 1. Public Function …

Software Development delphi pascal regex
Member Avatar for Ionelul
0
479
Member Avatar for YeMiller

Hi there, I'm getting on pretty well with a project for uni I've got to do, although I'm currently slumped at a bit. I'm running a loop to constantly read numbers into a set of equations and I'm required to output these to an excel file. I've sussed making the …

Software Development c++ file-system
Member Avatar for YeMiller
0
603
Member Avatar for jozz3

I am trying to define a function that draws a triangle of a given size using the turn method. I've never used turtle graphics before and am not sure how to go about this. Thank you

Software Development python
Member Avatar for vegaseat
0
824
Member Avatar for duke.tim

okay so I am having an error with the code below and don't really know how to fix it, according to what I've looked up it should be right. I am using g++ on a linux system. (P.S. i'm a newbie ) okay and the error is: random.cpp: In function …

Software Development c++
Member Avatar for duke.tim
0
717
Member Avatar for Lee21

guyz i need your help. I want that everytime I press the ESC "ESCAPE key" there will be a message box popping out then will ask if I want to exit? then if I click the Yes button my Progrma Ends. I also used the form_closing event heres my code. …

Software Development vb.net
Member Avatar for Luc001
0
7K
Member Avatar for emaduddeen

Hi Everyone, Can you tell me how to change this code so the value in my DatePicker control will update to the database in this update statement? [CODE] strAttendanceUpdateStatement = _ "UPDATE Attendance " & _ "SET DateOfClass = " & DatePickerDateOfClass.Value & ", " & _ "Absent = " …

Software Development vb.net
Member Avatar for emaduddeen
0
123
Member Avatar for hellskier

Hello, I have a little program that needs to get data from two separate .csv files for afterwards parse them and translate info to vectors. Everything works fine when I am working with just one file (so just one ifstream), but when I try to use another ifstream to read …

Software Development c++
Member Avatar for hellskier
0
178
Member Avatar for k2k

just wondering if anyone could explain this... [code] if(loginF.equals("root") && passwordF.equals("root"))[COLOR="Red"]; [/COLOR] ---> if this semicolon is here, my program works.. but i can't have an else statement if i take out this semicolon, the code within the if statement don't execute.. but i can then have an else statement …

Software Development java
Member Avatar for JamesCherrill
0
108
Member Avatar for close_encounter

I'm brand new to C++ and I'm having a difficult time. I'm working on a project for school and I'm very confused with functions all together. How do I get my arrays from main so I don't have to have them in each function and how do I call each …

Software Development c++
Member Avatar for Banfa
0
146
Member Avatar for jiraiya

Hi everyone, I have a single string - let's call it string A. I have an ArrayList of objects. Each object contains three strings. I want to iterate through the ArrayList of objects and check if any of the strings contained within the objects are the same as string A. …

Software Development java
Member Avatar for jiraiya
0
94
Member Avatar for "ICode"

These days, as we all know, graphics is probably the most important thing. I made a program using C# and the only graphics im using is that of WFA, but i want to apply EXTREME graphics to it, like that of windows media center, or something like that. What would …

Software Development c#
Member Avatar for "ICode"
0
321
Member Avatar for kodera

This is just the beginning of my name sort prog... I am starting with just reading in the names and then outputting each name... As of right now, it is crashing after displaying the first name... I think it's something with my array.. rectangular, instead of square, but don't know …

Software Development c++
Member Avatar for jonsca
0
71
Member Avatar for crodriguez08

Hey, I'm pretty much almost done with this program, but I'm not sure how to clear a previous file (after opening it) in order to open a new one. My program is supposed to open a file with a maximum of 100 unordered decimals and allow the user to sort …

Software Development c++ file-system
Member Avatar for crodriguez08
0
106
Member Avatar for Hidden_mistakes

I am wondering why the right hand side of my split screen isn't in the middle and also why the game goes off of the background, any help would be much appreciated [code] #include "SDL.h" #include <stdlib.h> #include <stdio.h> #include <stdlib.h> #include <Windows.h> #pragma comment(lib,"Winmm.lib") /* ---------------------------------------------------------------------- */ /* Defines/Enumerations …

Software Development c++
Member Avatar for Hidden_mistakes
0
108
Member Avatar for kadvar

Hi, I basically have a dictionary with a few key value pairs in it. [CODE] mydict = {} mydict['key1'] = 2000 mydict['key2'] = 3000 mydict['key3'] = 6000[/CODE] I have read that you can check if a particular key is present in a dict with the '[B]in[/B]' statement like: [CODE]if 'key1' …

Software Development python
Member Avatar for kadvar
0
152
Member Avatar for charqus

I have a question. Can i select a string from my RichTextBox ? For example: I have this text: English Francais Spaniol And i want to select Francais , but as string , not at int - lenght ... ( richTextBox1.Select(7,15); ) I want something like: richTextBox1.SelectString("Francais") , is there …

Software Development
Member Avatar for "ICode"
0
114
Member Avatar for Avatar99

My overloaded operator isn't initializing the value passed through it. Please help!!! and yes I am aware that my insert function isn't complete... [CODE=c]#include <iostream> using namespace std; struct Node{ int value; Node * next; }; class linkedList { public: linkedList () {first=0; length=0;} bool operator > (int a) ; …

Software Development c++ linked-list
Member Avatar for Sky Diploma
0
111
Member Avatar for fattymuffin

Hello, So my problem is that I am supposed to write code in order to prove whether or not text in a file is topologically sorted correctly. I have the algorithm on how to do this, but the specifications say that I should use an array of lists to keep …

Software Development algorithm c
Member Avatar for tcstom
0
107
Member Avatar for summey

The code below is for my assignment it works i just want to make sure i did this correct any advice is wanted. Also one thing that is bugging me see basepay well if the base pay is 133.20 it chops off the 0 and only displays 133.2 why iv …

Software Development c c# c++
Member Avatar for summey
0
132
Member Avatar for rlhh

I'm trying to create a maze with a mouse inside moving up down left right in 200 moves. I've got everything working besides the fact that it duplicates the heart on the other side(If it exits on the left, it'll be duplicated at the right end) when the heart shape(mouse) …

Software Development c
Member Avatar for jephthah
0
196
Member Avatar for Dcurvez

hi everyone :) I hate to do this but I gotta.. This is what I want to do but dont have the foggiest about how to accomplish it! I have 4 forms..frmWeekOne, frmWeekTwo, frmWeekThree, frmWeekFour. These 4 forms are all added forms to my original project. what I need to …

Software Development vb.net visual-studio
Member Avatar for DGULLIVER
0
119
Member Avatar for JwhateverJ

I have this program where I'm trying to find the file size with the boost library. I find the files fine, but it won't get the file's size, where am I wrong? Thanx for your help... Here's my code so far. It compiles fine, but won't return the file size. …

Software Development c c# c++ file-system
Member Avatar for JwhateverJ
0
4K
Member Avatar for n.utiu

I am working at a project that is supposed to run a python script. Here is my main class: [CODE] #include <iostream> #include "scripting.hpp" int main(void) { cScripter oScripter; std::vector <double> vectMy (7, 32); oScripter.doRunScript (&vectMy, "test.py", "function"); return 0; } [/CODE] And here are respectively scripter.hpp and scripter.cpp : …

Software Development c++
Member Avatar for n.utiu
0
151
Member Avatar for jeff_mallatt

From within a template I'm trying to set a variable using a select= which references an absolute path. But when the "root" element specifies an xmlns= namespace, the select fails (returns an empty string). Here's the XSLT: [code=xml] <?xml version="1.0" ?> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://foo.bar.com/something" > <xsl:output method="xml" indent="yes" encoding="windows-1252" …

Software Development xml
Member Avatar for jeff_mallatt
0
1K
Member Avatar for nahmartin

I am having problems with sending my array N_List [CODE]int** N_List = create_2d_int_array(len_N_List, 100, "voro:N_List"); double** atoms = create_2d_double_array((int) (8*box_x*box_y*box_z/(lattice*lattice*lattice)), 3, "voro:atoms"); for(i=0;i<len_N_List; i++) for(j=0;j<100;j++) N_List[i][j] = 0; [/CODE] The code runs fine with N_list send and recv omitted but with it, it causes a segmentation fault Send [CODE] if(rank …

Software Development c++
Member Avatar for nahmartin
0
469
Member Avatar for jellybeannn

hallo can someone please help me my Access Database ConnectionString does not work on the server [code] string strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|calculator.mdb"; [/code]

Software Development microsoft-access
Member Avatar for Gospp
0
100
Member Avatar for ttboy04

I want to make an object move to a new height from the user request. My code below does not do that. Where am I going wrong. thanks in advance. /* instance variables */ private Aobject object; public void moveObject () { int number; { number = Integer.parseInt(Dialog.request("Enter new height?")); …

Software Development java
Member Avatar for ttboy04
1
96
Member Avatar for maddav

Hi, Recently (today) got an assignment to take a particular code that we've done previously, and split it into 3 files: 2 .cpp files and a header file. Now, i believe i've done it correctly, but the only thing that's throwing up errors is the use of friend for overloading …

Software Development c++ file-system
Member Avatar for maddav
0
3K
Member Avatar for Gospp

I've a problem when trying to convert my sql-query to a SqlCommand. The query: [CODE] SELECT L1.[App_Name], DATEDIFF(ss,MAX(L1.MESG_DATESTAMP),GETDATE()) as Seconds FROM sbyn_csf.CSF_CME_LOG AS L1 JOIN sbyn_csf.CSF_LOGGER_LOG AS L2 ON L2.MESG_ID = L1.MESG_ID WHERE logger_code = 101 AND [App_name] in ('002','010','022','025','036','037','040') GROUP BY l1.[APP_NAME], L2.LOGGER_CODE ORDER BY 1, 2 [/CODE] The …

Software Development
Member Avatar for Gospp
0
128
Member Avatar for FlynnLags

This is quite literally driving me insane. I'm new to C++ so bear with me on this one. Basically, I've got two files. One header file (Package.h) and the C++ file (Package.cpp) I've got a class called [B]Package[/B] and function prototype in the header file as follows [CODE] private: string …

Software Development c++
Member Avatar for Fbody
0
803
Member Avatar for Danny_501

Hi all, I have a file called Client.cpp, which has main() contained in it. my problem is at the start of the file: [CODE]#include <iostream> using namespace std; #include "Student.h" enum User { NO_USER = 0, STUDENT = 1, ADMIN = 2}; [/CODE] I get errors on the line with …

Software Development c++
Member Avatar for Danny_501
0
126

The End.