43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for PhiberOptik

I am trying to execute a exe file within' a jar file. My question: 1. How do I locate the exe within' the jar? I am using the [ICODE]runtime().exec()[/ICODE] to launch it. Right now I have to extract it then launch it, then after it's finished delete it. Thanks PO

Software Development java
Member Avatar for masijade
0
108
Member Avatar for DimaYasny

Guys, I'm stumped here. Trying to retrieve a row from mysql using MySQLdb, I receive the number of matching rows found, not the data itself. here's the code: [CODE] def getKbd(kb_num): query="SELECT kbd_name, kbd_data, kbd_ps FROM kbd_ WHERE kbd_number = %d " % kb_num a = c.execute(query) return a print …

Software Development python
Member Avatar for DimaYasny
0
109
Member Avatar for firoz.raj

i simple was to add information in a listview using save button. but when click save it hangs.kindly help me .any help would be Greately appreciated. here is the code what i have written. [code=vb] Private Sub btSave_Click() Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset ' On …

Software Development listview visual-basic
Member Avatar for vb5prgrmr
0
96
Member Avatar for rasizzle

i'm trying to create a simple minimum function by comparing items in a list to each other. [code] list1 = [4,20,2,19,3254,234,21,03] for i in list1: if list[0] < list[0+i]: print i [/code] basically my thought process in pseudocode is for all items in the list if item n is less …

Software Development python
Member Avatar for woooee
0
117
Member Avatar for chg

I'm really kind of stuck here, and would really appreciate some help. I have a function that reads from a csv that can get quite large, and it will block some other routines from running in there allocated time slice. I need to make this code “non-blocking”. I think there …

Software Development python
Member Avatar for chg
0
256
Member Avatar for slawted

hello this code seems to give me wrong results and i carnt figure out why :( [code]#include <iostream> int main() { float pi = 3.142; char area; float diameter; area = diameter * pi; std::cout << "Hello. Please imput the diameter of your circle... "; std::cin >> diameter; std::cout << …

Software Development c++
Member Avatar for wildgoose
0
133
Member Avatar for Cman2020

[code] Hello guys i need help in doing "Saving text in TextBox" let say you want you have someone info already in the textbox already and you want to add in the existing info this is what i have so far txtOutput.Text = txtNotesEntry.Text; i know this just copy whatever …

Software Development c c# c++
Member Avatar for Cman2020
0
384
Member Avatar for SnagglezMaw

Is there something in Java that will perform the + or - operation? I need to compare a couple variables but the variables are not going to be exact, they'll be off by about +or- 2.

Software Development java
Member Avatar for peter_budo
0
112
Member Avatar for thebluestar

I had 1 exercise: read data form file then add into TREE. I read data in the file into an array, then add array into TREE, here is my solution but it does not work properly I know that data in array seq[] will be erased after ReadFile() function but …

Software Development c file-system
Member Avatar for jephthah
0
106
Member Avatar for TerabyteST

Is it possible? I need to use them with wxpython and I'd want to make a standalone program that contains them into the exe file.

Software Development python
Member Avatar for scru
0
120
Member Avatar for MrNoob

Hello i m reading chapter in K&R about bit operation whish totally confuses me i understand what all operators does but i dont understand the code itself [code] unsigned getbits(unsigned x, int p, int n) { return (x >> (p+1-n)) & ~(~0 << n); } [/code] it will right shift …

Software Development c
Member Avatar for jephthah
0
114
Member Avatar for CppFTW

I am really stumped with a problem my program keeps giving me. Randomly, a file I try to open returns fail() to ifstream and can't be read from. I have a feeling it has to do with these 2 functions I have been using. Please help. Thanks! PS: I tried …

Software Development c++ ios
Member Avatar for CppFTW
0
2K
Member Avatar for history84084

In my application I need to have the user select one program (item) from the collection in a listbox. This listbox click event then triggers a sql query of an existing sql server data table using the selected program (item) in the sql 'where' clause. The returned data then will …

Software Development
Member Avatar for history84084
0
110
Member Avatar for ippomarley

I have a program which is supposed to find the shortest path between airports and users' flight data to find the shortest path between airports; that is, the airports are the nodes and the flights are the edges. I've not started to implement the algorithm as yet but I am …

Software Development algorithm c++
Member Avatar for ippomarley
0
220
Member Avatar for sciwizeh

Hello all, it's been a while since I've had a question, but I'm back. I'm trying to write a Vector class which can be any type. The problem I have is that generics can only hold objects, so when I try to say x+=vec.x it says that it cannot do …

Software Development java
Member Avatar for sciwizeh
0
136
Member Avatar for catums14

I have a program that is using command line arguments to tell the program what to do. So to run the program, you type in: main airports.txt SC PER, where SC is a different thing the program can do and PER is the code for a city. So PER is …

Software Development c++
Member Avatar for catums14
0
159
Member Avatar for brandongood

Im working on a program that requires you to create an array with 10 elements, and asks the user to enter values for each array. Then, you need to copy the contents of the first array into another array, in reverse order. Can someone walk me through this one? Im …

Software Development java
Member Avatar for brandongood
0
93
Member Avatar for puneetkay

Hello, I just discovered that we can use unicode anywhere in the program. EG :[CODE=java] public class CheckUnicode { public static void m\u0061in(String\u005B\u005D args) { System.out.println("Hello World!"); } } [/CODE] \u0061 = 'a' .. \u005B = '[' .. \u005D = ']' This program will execute fine without any errors. But …

Software Development java
Member Avatar for puneetkay
0
168
Member Avatar for brandongood

Ok, I have to write a code snippet that prints out the value of 2 to the powers of 1 – 31 in a 10 character width, right-justified column. You may not use any literals or Math methods. Seeing as Im not allowed to use Math.pow, the only other option …

Software Development java
Member Avatar for brandongood
0
87
Member Avatar for TheFueley

How do you guys recommend searching an ArrayList for a specific string? My arraylist is defined as: [code=vb] Public Shared VisioSwitchArray As New ArrayList() Public Structure switch Public HOSTNAME As String Public IP As String Public MODEL As String Public VLANS As String Public NEIs() As neighbor End Structure Public …

Software Development vb.net
Member Avatar for TheFueley
0
1K
Member Avatar for poeticinsanity

I'm attempting to search a string for a certain sequence. I have not done anything with re, and it is... a bit confusing. I'm looking for this string: <div class="indexcenter"> (there's a portion of text here using newlines and characters) <!-- end indexcenter --> I am thinking something alone these …

Software Development python
Member Avatar for poeticinsanity
0
96
Member Avatar for versatile36

Whats the use of get and set in c# when we can add a property value like this [CODE]object.property="value"[/CODE]

Software Development c#
Member Avatar for versatile36
0
176
Member Avatar for PinoyDev

Good day.! [code=vb] dim varname as string varname="Nothing's" [/code] I need to double the Apostrophe next on the g letter of the varname. It should give a result like: "Nothing''s".Remember that varname is not constant. Every word that passes this variable with Apostrophe, then it will double the Apostrophe within …

Software Development visual-basic
Member Avatar for PinoyDev
0
77
Member Avatar for PinoyDev

Good day.! I just need a code that will trigger the listview to put some color like(red) in a row/cell being selected. Pls help.. Thank you for spending time.

Software Development listview visual-basic
Member Avatar for PinoyDev
0
71
Member Avatar for sean_wc

I need some help with a program I'm working on, I have to calculate the cost of a long distance phone call based on the day, time and length of the call. This is what I have so far. I need to figure out how to test what day they …

Software Development c++
Member Avatar for sean_wc
0
84
Member Avatar for StarZ

Hi all. I'm making a program about 'reading and writing text files' The assignment I have to do is suppose to look like this: [url]http://i39.tinypic.com/5554wi.jpg[/url] But I can't figure it how to make it so when it keeps looping until the user types in 'break' and it will list the …

Software Development python
Member Avatar for vegaseat
0
178
Member Avatar for ritu verma

I have a treeview with two nodes..I m showing the contextmenu when the user clicks on any portion of treeview .... [code] Public Class Form2 Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try Dim N As New TreeNode() Me.TreeViewCategories.Nodes.Clear() With Me.TreeViewCategories.Nodes N = .Add("", "Main", …

Software Development vb.net
Member Avatar for ritu verma
0
143
Member Avatar for planetPlosion

I'm trying to print diff.txt that contains the differences between the 2 log files I have. I want it to print the diff.txt in the current directory, but I get nothing. [code] def difference(dirList1, dirList2): difFile = list(set(dirList1).difference(set(dirList2))) writeDif = open( 'diff.txt', 'w' ) writeDif.write( 'Yadda yadda, intro intro' ) …

Software Development python
Member Avatar for vegaseat
0
89
Member Avatar for mattyd

This demonstration was originally proposed to be posted as a Python tutorial but with further inspection it was deemed more of a "how-to" guide, in this case, how-to create simple animation via Tkinter (Tool Kit Interface) All the necessary elements are included in the attched zip file. This includes: [LIST] …

Software Development first-post python tkinter unix
Member Avatar for vegaseat
1
244
Member Avatar for mintsmike

Hello people: I am trying to create a ComponentListener method that will resize some components when the window is resized. I have tried the following code, only to find out that it didnt work: [code] import java.awt.event.*; import java.awt.*; public class PowerEvent { PowerMath gui; PowerEvent(PowerMath in) { gui = …

Software Development gui java
Member Avatar for mintsmike
0
318
Member Avatar for suncica2222

how can I trigger anything outside the method ??? like carry the boolean a outside [CODE]public void windowClosing(WindowEvent arg0) { System.out.println("Window Closing"); a=true; // cant refer to non final variable a inside an inner class defined in a different method[/CODE] I want to use "a" in while loop for instance …

Software Development java java-swing
Member Avatar for suncica2222
0
279
Member Avatar for everettnewell

[code] Public Sub add_emp(ByVal emp As EmployeeObj) Dim con As New SqlConnection Dim sqlcmd As SqlCommand 'Dim sqlrdr As SqlDataReader Try If is_emp(emp.Id) = False Then con.ConnectionString = My.Resources.ConnString con.Open() sqlcmd = New SqlCommand("INSERT INTO [Employees] (" _ & "[Id], [SocialSecurity], [FirstName], " _ & "[MiddleName], [LastName], [Suffix], " _ …

Software Development sql vb.net
Member Avatar for everettnewell
0
157
Member Avatar for pymatio

How would you count how many opening HTML tags there were & then closing tags in a line? eg [CODE] for line in something: for match in re.match("[I]opening_regex_here[/I]",line): # will match <H1> or <html> or whatever opentags += 1 for match in re.match("[I]closing_regex_here[/I]",line): # will match <H1> or </html> or …

Software Development html-css python
Member Avatar for vegaseat
0
3K
Member Avatar for MrNoob

i dunno im sure this output the good result i dont understand why it got not the output that i want [code] #include <stdio.h> void Squeeze2(char *str,char *save) { int i,x; int buffer=0;//used to save stuff for( i=0 , x=0 ; str[i]!=0 && save[x]!=0 ; i++, x++ ) { if( …

Software Development c
Member Avatar for csurfer
0
99
Member Avatar for stewie griffin

Hi, I have java code, in the code there is about 5 lines that I wont to open in new Thread, I don't wont to crate all new class for 5 lines , can I can I implement the Thread inside the method without new class?

Software Development java
Member Avatar for stewie griffin
0
103
Member Avatar for Agni

hey guys, I have a fixed length .txt file. Values in the file correspond to columns in a db table. ex file row is something like: [B]India 3455 78787 89898[/B] table has columns something like: [B]column_name length startPosn EndPosn[/B] country 6 1 6 ID 6 7 13 so you see …

Software Development c++
Member Avatar for tux4life
0
458
Member Avatar for Clockowl

Hey guys, So I have compiled my first home-written static library (named PixGUI) that happens to call OpenGL functions. However, I noticed that when compiling (using MinGWs GCC with Code::Blocks project set to "static library") it doesn't matter whether I supply the linker with libopengl32.a or not, it simply compiles …

Software Development c++ opengl
Member Avatar for Clockowl
0
207
Member Avatar for sravan953

I have a string, say for example: [CODE]str="aasd<script>"[/CODE] How do I make Python to note down one character at a time until it encounters the '<'? I know it has to be a loop, but which function? Thanks

Software Development python
Member Avatar for siddhant3s
0
106
Member Avatar for Sky_Blue

Hey, I am curious about making an application that will show current printers that are installed on the computer, will be windows XP, and at first returning them back for the user to see in command prompt. Although I am unable to find out how I can check to see …

Software Development api c++ windows-api
Member Avatar for Sky_Blue
0
137
Member Avatar for NickMalone85

I've been browsing the web for a while looking for an answer to this but I can't seem to find it. I created a .resx file in one of my DLL files that has a bunch of images stored on it. In this DLL I'm using an extended ImageManager (CustomImageManager) …

Software Development file-system
Member Avatar for sknake
0
76
Member Avatar for sravan953

Hey guys.... I use Python 2.6.2. I recently created a program which accepts commands from my website, here's the code I used: [CODE]import urllib import subprocess import time open_site=urllib.urlopen("http://www.sravan953.webs.com/command_python.htm") read_site=open_site.read() def run_program(): current=time.asctime() print 'Runnning program'+' ['+current+']' subprocess.call(read_site) def check_argument(): current=time.asctime() if read_site=='': print 'No command given'+' ['+current+']' timer() else: …

Software Development python
Member Avatar for vegaseat
0
164
Member Avatar for NickMalone85

I think I've run into a thread synchronization problem. I have a C# program where I have a extended Panel class (MapEditorPanel) and I also have a form that contains that MapEditorPanel. I have a MouseClick Event on both the Form and the Panel. The MapEditorPanels event updates the variables …

Software Development
Member Avatar for Diamonddrake
0
100
Member Avatar for pymatio

I have the following script: [CODE] import sys import os import re pages = [] if len(sys.argv) > 1: for root, dirs, files in os.walk(sys.argv[1]): for f in files: filename = os.path.join(root, f) if (filename.endswith('.html')) or (filename.endswith('.htm')): pages.append(filename) for page in pages: f = open(page, "r") count = 1 for …

Software Development html-css python
Member Avatar for pymatio
0
122
Member Avatar for Birendra Dhami

sir how can i add two fraction nos. to get again fraction eg. a/b+c/d=(ad+bc)/bd I would be very happy if u send me code.

Software Development c++
Member Avatar for csurfer
0
110
Member Avatar for leegeorg07

Hi, is there an internal module / method to change the colour of the text in the pythonwin? I am asking this so that I can make more exciting text based games

Software Development python
Member Avatar for leegeorg07
0
2K
Member Avatar for serkan sendur

i did it like this but it seemed stupid : [CODE]string path = Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf("\\")) + "\\Sounds";[/CODE] any other ideas? my actual goal is to locate the files in my project output directory. it can be any directory i created under my windows application. it is not as straight forward …

Software Development assembly web-server windows-server
Member Avatar for serkan sendur
0
456
Member Avatar for Lukezzz

I have a little problem that my Form gets stuck when I run this first code. I have a lot of code in the event. The code runs fine but if I now will deactivate the form by clicking with the mouse on the desktop and again click somewhere on …

Software Development c++
Member Avatar for Lukezzz
0
99
Member Avatar for MrNoob

i m trying to code htoi function in chapter 2.3 for K&R but problem i dunno where to start should i first read all string then after that change each character to its decimal and then add them ? or any better ideas?

Software Development c
Member Avatar for Narue
0
573
Member Avatar for themaster

Does anyone know how to give a GUI look to your C++ "Console Application". I cannot use Win32 API or any other template except the console application because I use Turbo C++ 3.0 IDE for development and I want my Application to be platform independent while using WIN32 API will …

Software Development api c++ gui ide windows-api
Member Avatar for Ancient Dragon
0
293
Member Avatar for njparton

I'm stuck trying to get mechanize working as part of a larger project I'm working on. I'm trying to logon to the following website which I am registered at (but not as "bob" as below obviously): [url]http://www.morningstar.co.uk/uk/membership/signup.aspx?loginType=1&lastvisit=%2fuk%2fportfoliomanager%2fportfolio.aspx%3fSite%3duk%26lang%3den-GB[/url] I think I've managed to select the correct form (?) but I'm getting …

Software Development python
Member Avatar for njparton
0
208

The End.