catcit 0 Newbie Poster

Hi everyone,

I am looking for a free/open-source application similar to RescueTime. The features that I am looking for are automatic app tracking and optionally website tracking. Also, I would like to have the posibility to install the application on multiple computers and centralize all the statistics on a central server.

Do you know of any apps that might meet these requirements or at least about open-source apps that could be adapted?

Thanks in advance!

catcit 0 Newbie Poster

You're saying this works as a managed EXE, but not as a managed DLL?

Something like that. After compiling the first program, it works perfectly, but when I try to create the dll in the second piece of code, it produces those two errors.

catcit 0 Newbie Poster

I have some native C++ code that I want to use in C# and after doing some research I decided to create a C++/CLI wrapper for the native code. So far, so good. When running the program that contains the C++/CLI class, it works perfectly, but when I try to create the library that will provide me the chance of using the functionality of the native code in C#, I get the aforementioned errors (LNK2028 and LNK2019). Although I have tried several configurations for the linker and the compiler, I still cannot manage to get rid of these errors.

This is the code for the working wrapper:

//Wrapper_src.h

#include <cstdio>
#include "Project_Manager.h"

using namespace System;

public ref class WrapperParabola
{
private:
    ProjectManager *mainPM; //ProjectManager is the main class from the native code

public:
    WrapperParabola()
    {
        mainPM = new ProjectManager;
    }

    void InitSphereInfo(float R, float Cx, float Cy, float Cz, float H0, float H1, float dH, int segm)
    {
        mainPM->Init_SphereInfo(R, Cx, Cy, Cz, H0, H1, dH, segm);
    }

    void InitParableInfo(float P, float Refl, int Lsegm, int HSegm, float Lng)
    {
        mainPM->Init_ParableInfo(P, Refl, Lsegm, HSegm, Lng);
    }

    void InitRaysSetUpInfo(float Ora0, float Ora1, float dOra, int GridN, int NRays)
    {
        mainPM->Init_RaysSetUpInfo(Ora0, Ora1, dOra, GridN, NRays);
    }

    void InitSTPInfo(int zi, int luna, float LongLegala, float LongLoc, float Latitudine, float OraLegala, float UnghiInclinare, float UnghiAbatere)
    {
        mainPM->Init_STPInfo(zi, luna, LongLegala, LongLoc, Latitudine, OraLegala, UnghiInclinare, UnghiAbatere);
    }

    void ProcessData(void)
    {
        mainPM->ProcessData();
    }

    void PrintOutputData(void)
    {
        mainPM->PrintOutputData();
    }

    ~WrapperParabola()
    {
        this->!WrapperParabola();
    }

    !WrapperParabola()
    {
        delete mainPM; …
catcit 0 Newbie Poster

I'm not quit clear what you mean with boolean full-text search and what you're doing? Do you have an column that containing "True" or "False"?
The most dynamic feeling can be created by loading the records into memory. I cannot see what limitations you are confronted with.

By Boolean Full-Text Search I mean this. Also, by 'dynamic search feeling' I meant real time search. My problem is that after each TextChanged event I`m trying to load the search results into a DataGridView and that takes a lot of time for that to be done. For example if one inserts character 'a' into the search textbox it will iterate through all the database and load into a datatable and then into the DataGridView all the lines that contain the character 'a'. Afterwards, if someone inserts another character and you get the string "as", for example, it will search into the database for all the lines from the database that contain the string "as" and then load those lines into the DataGridView. Due to these repeated iterations through all the database it takes a lot of time to load the search results into the DataGridView, and I`m searching for something that could speed up the search.

So far I have tried splitting the search into 11 separate threads, each one of the first 10 searching through 2000 lines at a time and the last one searching through what is left but that does not help that much either. …

catcit 0 Newbie Poster

I have a table that contains approximately 22000 rows and I used a Boolean Full-Text Search in order to find what I`m interested in. My problem is that I created a 'dynamic search feeling' that consists of a DataGridView that it is refreshed after every TextChanged event. As you might have figured out it takes a lot of time to search for the inserted string after every event.

What could I do in order to improve the search speed?

Any suggestions are welcomed!

catcit 0 Newbie Poster

Hello!

I am interested how can I find the connection string in order to be able to connect to MySQL Server 5.1.50 using OleDbConnection(C#).

I used this auto generated string (after adding new data source in Visual Studio):

erver=localhost;User Id=MyID;password=MyPassword;database=MyDatabase

but I always get the same annoying error saying:

An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

.
I have tried adding all possible providers but none of them seems to work.

Whoever helps me with this, I will be forever grateful!
Thanks!

catcit 0 Newbie Poster

Hello!

I have the following problem. I want to create an animation that`s based on the following idea : Let`s say that we have a recipient(glass, bucket or anything alike) and we also have some rocks of three different dimensions, some sand and a glass of water. Introduced in a certain order in the recipient, these materials will fill the recipient completely. The task is to introduce the rocks, the sand and the water in the recipient in the order to have as a result a completely filled recipient. Obviously, the only possible way to do this is to first introduce the largest rocks followed by the smaller ones, than the sand that will trickle along the rocks and than the water.

Due to the fact that the animation will be pretty short I want to create something that is simple but interesting in the same time. I have in mind either a 2D animation like these - http://www.youtube.com/watch?v=0QRO3gKj3qw, http://www.youtube.com/watch?v=oraONu7Jp_Y&feature=channel[/url, http://www.youtube.com/watch?v=SCjMztLZLmQ&feature=related or a 3D one like this - http://www.youtube.com/watch?v=9X7pwsDWRJM&feature=channel or anything alike. Does any one know how those from Google create animations like the one aforementioned(the first youtube link).
I am interested if you know a good software that could allow me to do this as fast as possible. As I mentioned I want something simple that gets the job done. If you know an already done animation like this I would be grateful if you could share the …

catcit 0 Newbie Poster

Hello!
I am in the 11th grade and I have started with one of my colleagues to work on a file compression program based on Huffman coding. I have previously worked with python (a program that handles some .xls files) but this project is more complicated so I shall need some advice from you.
Firstly, I want find a good solid tutorial that treats the major aspects as clearly as possible. (From basics to OOP and GUI).
Secondly, I want to know which way is the most advantageous to deal with the GUI part.
Thirdly, any suggestions are welcomed! :icon_cheesygrin:

Thanks!

catcit 0 Newbie Poster

2x3x3 = 18, not 12. I suppose you meant 2x2x3??

Yes, my bad. It`s 2 x 2 x 3.

catcit 0 Newbie Poster

Here is a problem in my hand that I need so solve it. It sounds like this: Given a number (between 4 and 30000) x, which is the greatest number that can be written as a product made from numbers that have the sum x.

Example:
For x = 7 the result is 12.
Explanation:
12 = 2 x 3 x 3
7 = 2 + 2 + 3

I do not want to abridge the path for solving the problem and I do not want complete code for this problem. I only need some directions and documentation about the method that I could use in order to solve it.

catcit 0 Newbie Poster

Here`s the code with the problem.

import Tkinter, tkFileDialog

root = Tkinter.Tk()
dirname = tkFileDialog.askdirectory(parent=root,initialdir="/",title='Please select a directory')

and here`s the code with the problem solved

import Tkinter, tkFileDialog

root = Tkinter.Tk()
root.withdraw()
dirname = tkFileDialog.askdirectory(parent=root,initialdir="/",title='Please select a directory')

I used

root.withdraw

in order to get rid of the root from tkinter. If you want to find out more about it google it.

catcit 0 Newbie Poster

This works for me

from progress import PB
from time import sleep

def main():
    bar = PB(300, 50)
    bar.open()
    for i in range(10):
        bar.update((10.0 * i) / 100)
        sleep(1)
    bar.close()

main()

Also, you could replace self.__root = Tkinter.Toplevel() by self.__root = Tkinter.Tk() (or add an argument to __init__ to chose between the 2 classes)

Thanks for your help! My problem was at updating the bar.

catcit 0 Newbie Poster

Hello!

I need to create a progress bar and up to this our this class http://code.activestate.com/recipes/492230/#clast is the best class that fits my needs.
I posted my problem at comments.

Thanks,
Danci Emanuel

catcit 0 Newbie Poster

Take a look at:
http://sourceforge.net/projects/pyexcelerator/

Here is example code:
http://sujitpal.blogspot.com/2007/02/python-script-to-convert-csv-files-to.html

Hello!

I have a minor problem because I can`t install pyExcelerator. I`m using python 2.5 & Windows 7.

catcit 0 Newbie Poster

Hello!

I need some help regarding a file conversion. I have some .csv files and I need to convert them to .xls (to look exactly as a manually made table, not only to change the extension). The code should not be complex because the files have the same pattern so it`s doesn`t need to have all kinds of options and complicated stuff.

Thanks,
Danci Emanuel

catcit 0 Newbie Poster

Thanks! This is exactly what I was looking for.

catcit 0 Newbie Poster

Hello!

I have a little problem. I have to print a table (four columns from an Excel file) in a text box. I took a string and I kept appending all the cells from the file that interested me and I used the textbox provided by easygui.

textbox(msg='', title=' ', text='', codebox=0)

Here are my problems:

1.I want to format the text to look like one piece. The text looks like this:

TimeStamp  Ipv        Upv-Ist        Power
 6.15      0.0      293.92      0.0
 6.30      0.0      315.21      0.0
 6.45      0.11757      272.14      31.9954998
 7.00      0.19193      283.44      54.4006392
 7.15      0.25029      292.55      73.2223395
 7.30      0.30235      301.25      91.0829375
 7.45      0.35982      320.71      115.3978722
 8.00      0.75405      313.93      236.7189165
 8.15      1.12258      316.05      354.791409
 8.30      1.5482      314.7      487.21854

and I want it to be more nicely arranged (every line to be in it`s place). How can I do that?

2. Is there any way to convert it to read only? Normally the user is able to modify the text but I want it to be read only.

I`m interested if this things are possible using the textbox provided by easygui or I have to modify it and use something else (tkinter etc.).
Thanks!

catcit 0 Newbie Poster

Problem solved!

catcit 0 Newbie Poster

Hello!

As the title suggests I need some help regarding an "open directory" dialog box.

I tried this code but every time I run the module it appears a blank window in the back of the dialog box and normally after I select the directory it should disappear but it still remains in the background and only if I close it manually it stops. What`s the problem with this? How can I fix it or how can I replace this code with something else? (p.s : I`m still a beginner. A also used easygui for some of the needs)

import Tkinter, tkFileDialog

root = Tkinter.Tk()
dirname = tkFileDialog.askdirectory(parent=root,initialdir="/",title='Please select a directory')
catcit 0 Newbie Poster

Hey,

The code bsod1 gave you is much shorter dan mine but I want to give it anyway because it might help you out with future 'problems'...

import os

fpath = 'C:\\tmp\\Test\\TestText.txt'

(filedir, filename) = os.path.split(fpath)
(shortname,extension) = os.path.splitext(filename)

print filedir
print filename
print shortname
print extension

Thanks!

catcit 0 Newbie Poster

Thanks for your help!

catcit 0 Newbie Poster

Hi everybody!

For the last five days I`m working on a project and I see only python syntax in from of my eyes.
I have a small problem and I got stuck.

I have a string like this : file = "E:\xxx\yyy.txt" and I want to format it in order to get only the file name - file = "yyy.txt".

How can I do that?


Thanks!

catcit 0 Newbie Poster

After rethinking the problem appeared a new option. The file can also be CSV.

Thank you,
Danci Emanuel

catcit 0 Newbie Poster

Hi Danci,

There's a number of appropaches you could take to this. Just a few questions..

1. Is it going to be used on 1 Excel file or potentially lots?
2. Does it have to be an Excel file? Could it be an XML or CSV file (created in Excel)?

Chris Fry
Perth, Australia

The program will use just one Excel file at a time.
The file will be Excel.

The idea that I have in mind is a something like a sieve: the program takes the entire Excel file, counts the columns and extracts only two specific columns.

Thank you,
Danci Emanuel

catcit 0 Newbie Poster

Hello!
I`m new here and I hope you could help me. I have to make o program that takes an excel file, counts the number of columns and extracts only two columns from the file and prints them in a .txt file. The number of the columns are inserted from the keyboard.

I need some directions or some tutorials where to get the idea and to learn how to make it.
p.s: I found the xlrd but I want something more simple than that.

Thank you,
Danci Emanuel