Community Member
Member Avatar
xrj 19 Replied To a Post in Tutorial Math Parser and Evaluator Programming Overview Tutorial
Topic by xrj in Software Development
I appreciate your translation and interest. As I previously pointed, actually have no time left for programming. Heaven thanks, I have seen your message left here time ago. If and when possible, I'll try to fix the website's form and then give notice here: in this manner, you -and anyone … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Tutorial Math Parser and Evaluator Programming Overview Tutorial
Topic by xrj in Software Development
Please excuse me, since it's been a long while since last time I came to this page and today I read your comment for the first time.
Lately, I have a lack of time to spend programming and that's the reason why there haven't been any improvements during months in … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Code Snippet Mates8 grapher
Topic by xrj in Software Development
In order to improve the messages, lines 171 through 174:

If max = min Then
lblMessage.Text = "n/a: top and bottom values can't be equal or void."
Throw New Exception(lblMessage.Text)
End If

may be replaced by:


If max = min Then
If vDbl(2) = vDbl(3) Then
lblMessage.Text = "n/a: top … Reply by xrj
Member Avatar
Featured xrj 19 Began Watching Code Snippet Splitting a string, delimiters included
This piece of code is far from perfect, but it works!
It produces a list of substrings (consisting of digits and letters) and their delimiters.
If it is practicaly a sin to manipulate the index of a for loop, then I'm a sinner.
If two delimiters follow each other, an … Topic by ddanbe in Software Development
Member Avatar
Featured xrj 19 Replied To a Post in Code Snippet Splitting a string, delimiters included
Topic by ddanbe in Software Development
If you're looking for concision, you may code something like:


static void Main(string[] args)
{
string str = "abc,123.xyz;praise;end,file,clear";
Console.WriteLine(String.Join("\r\n",
Regex.Split(str, @"(\,|\.|\;)+")));
Console.ReadLine();
} Reply by xrj
Member Avatar
Featured xrj 19 Replied To a Post in Backgroundworker process types
Topic by paul1145 in Software Development
Well, there is a solution consisting in examing the destiny's folder size while the backgroundworker thread is executing. Attached is a sample. Uses a thread instance, instead, but to the case makes no difference. The main process enters a loop which ends when all the source files have been copied, … Reply by xrj
Member Avatar
Featured xrj 19 Replied To a Post in Backgroundworker process types
Topic by paul1145 in Software Development
Lets put down an example. If total size to copy, S, is 100 MegaBytes:
S= 100 M
Estimated speed, e, is 5 Megabytes per second:
e= 5M/s
When the elapsed time, t, is 1 second, copied % will be:
% = 1 second x 5M/s / 100 M x 100 … Reply by xrj
Member Avatar
Featured xrj 19 Replied To a Post in Backgroundworker process types
Topic by paul1145 in Software Development
To be exact, KB and seconds are units, but the units must be coherent, of course. % = [size] x [T]/[size] x [T]
[wiki](http://en.wikipedia.org/wiki/Dimensional_analysis) Reply by xrj
Member Avatar
Featured xrj 19 Replied To a Post in Backgroundworker process types
Topic by paul1145 in Software Development
Sorry, the % should be:
% = size_to_copy x (1/e) x time_elapsed / 100
[in dimensions: %(dimensionless) = (KB) x (seconds/KB) x (seconds) ] Reply by xrj
Member Avatar
Featured xrj 19 Began Watching Backgroundworker process types
When kicking off an async job using backgroundworker, the process I tried
is a My.Computer.FileSystem.CopyDirectory(a,b). The next step is to
check the progress with bw.ReportProgress(x) but that statement doesn't get
control until the copydirectory finishes. I'm not new to programming but to
this backgroundworker. Any help would be appreciated. Thank … Topic by paul1145 in Software Development
Member Avatar
Featured xrj 19 Replied To a Post in Backgroundworker process types
Topic by paul1145 in Software Development
I was wandering if, maybe, first a total size of the files to be copied could be obtained. Then, we could make an estimation e= Kb copied/second and, why not?, the main thread could show the progress bar, for example, each second a rate:
time elapsed (seconds) / e Reply by xrj
Member Avatar
Topic by savedlema in Software Development
Please, go to my website's download page [Here](http://xrjunque.nom.es/precis/swdownload.aspx#reports). If needed, I'll appreciate any feedback. Hope it helps! Reply by xrj
Member Avatar
Topic by savedlema in Software Development
Ops! I am sorry and thanks for your advice. Seems the file size exceeded the maximum. I hope this time it works. Reply by xrj
Member Avatar
Topic by savedlema in Software Development
If ever you change your mind and go for the open source solution find attached a VStudio 2010 project. Need to say I did no charting. The .vb file names ending in "pdf" invoke pdfsharp.dll. The ones ending in "xls" correspond to the "pdf" ones with same sufix and the … Reply by xrj
Member Avatar
Imports System.Data.OleDb
Imports System.Data
Imports System.Web
Imports System.Web.UI

Partial Class _TakeSurvey Inherits System.Web.UI.Page

Dim sid, query1, query2, query3, query4, query5, query6, qnos, currentQ, q_type, filledby, qid, status1 As String
Dim dbcon As String = "Provider=Microsoft.Jet.OleDb.4.0;" & _
"Data Source=|DataDirectory|SurveyDatabase.mdb"
Dim con, conn, conn1, conn2 As OleDbConnection
Dim da, da1, da2, … Topic by jasmine.koh.562 in Software Development
Member Avatar
xrj 19 Replied To a Post in ASP.Net Survey unable to update answers
Topic by jasmine.koh.562 in Software Development
Why not use try-catch to trap and visualize errors, at least during test sessions? Once you can see the error message, the fix, almost always, will be more affordable. BTW, there is little difficulty to modify the query string by the user. See [here](https://social.msdn.microsoft.com/Forums/vstudio/en-US/01face56-99bf-4712-8aad-830f738546b4/using-vs-try-catch) and [here](http://msdn.microsoft.com/en-us/library/ms971481.aspx). Reply by xrj
Member Avatar
Hi!
I'm developing an application for hospital patients information. Now, as common for hospitals, I need to add a feature for various reports.Now I would like to know if you think Crystal Reports are a good option still.

I would like to present many reports which a user will choose … Topic by savedlema in Software Development
Member Avatar
Topic by savedlema in Software Development
It depends, from my point of view and experience, on your taste and skills. I did an accounting project which employed Crystal Reports. Reading a good book or tutorial for Crystal Reports will save you many hours. The big advantage is that adding fields or totals in a report is … Reply by xrj
Member Avatar
Featured xrj 19 Replied To a Post in Code Snippet Simple RPN calculator
Topic by ddanbe in Software Development
Well, I think I see. Actually, it's none of my business to evaluate the work of
others, just to do my work, though one should not be blind, of course. Reply by xrj
Member Avatar
Featured xrj 19 Began Watching Code Snippet Simple RPN calculator
The idea for this snippet came from vegaseat, who wrote a very nifty RPN calculator in Python, simulating a switch/case statement, something that Python is missing. See this code on page 19 in the projects for beginners thread on the Python software development forum. In my opinion, he did a … Topic by ddanbe in Software Development
Member Avatar
Featured xrj 19 Replied To a Post in Code Snippet Simple RPN calculator
Topic by ddanbe in Software Development
Before getting variables into play, why not consider parentheses? As a hint, a parser could look into the most inner parentheses, calculate the enclosed expression and then focus on the next more outer parentheses. In order to calculate each enclosed parentheses expression, first one could look for ^operators, then /operators … Reply by xrj
Member Avatar
Featured xrj 19 Began Watching Code Snippet Calculate the daycode of a date
OK I know the DateTime structure is very good at doing this.
But if you ever wanted to design your own calendar, or just wanted to know how things are possibly done, this could be a handy function. Enjoy. Topic by ddanbe in Software Development
Member Avatar
Featured xrj 19 Replied To a Post in Code Snippet Calculate the daycode of a date
Topic by ddanbe in Software Development
Long time ago, by means of Bussiness Basic, I had this problem as "homework". It did was a headache and there was no Wikipedia nor Internet, just some colleagues comments that really did their best. Allow me to contribute with the following code:



static void Main(string[] args)
{
System.Globalization.CultureInfo ci … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Code Snippet Mates8 grapher
Topic by xrj in Software Development
In a recent fix Line #137 has been replaced by:


If Me.chkAutoTopBottom.Checked Then
max = max2 : min = min2
Else
max = vDbl(2) : min = vDbl(3)
End If

and, in mouseEventInit() method - line #226 -, Ymargin.value by:


Ymargin.Value = ((marginPt0.Y + marginPt1.Y) / 2.0 * bmpH / … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Code Snippet Permutations in Vb.net
Topic by xrj in Software Development
This snippet code is the responsible to obtain the determinant, cofactor, adjoint and inverse matrix. A expression class instance may hold a number, polynomial or any expression like, for example, 'sin(x)' in an AST tree. A exprMatrix class is nothing else than a matrix where the entries are expression class … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Code Snippet Permutations in Vb.net
Topic by xrj in Software Development
Really, there was no error but because of the way I programmed Gauss-Jordan method the polynomial degrees of the matrix's entries increased in excess. By finding the G.C.D., if any, the degree may be reduced. Anyway, as can see in the image, Gauss-Jordan (8.3.85) takes 234ms and through the determinant … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Code Snippet Permutations in Vb.net
Topic by xrj in Software Development
You're right again. I've been very imprecise, mostly trying to use few words. When previous version, 8.3.35, tries to calculate A^-1 through Gauss-Jordan times out at 1 minute, the longer configurable time. I suspect this is due to an error, because the polynomials degree involved increase too much. Calculations not … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Code Snippet Permutations in Vb.net
Topic by xrj in Software Development
Here is the reason I was working with permutations: to obtain the determinant and the inverse of a matrix. The calculator already had a method to retrieve the inverse (Gauss-Jordan through absolute pivot), but it was extremely slow. For a 5x5 matrix it could take about one minute to resolve. … Reply by xrj
Member Avatar
xrj 19 Replied To a Post in Code Snippet Permutations in Vb.net
Topic by xrj in Software Development
Right, as long as time is no problem. Reply by xrj
Member Avatar
xrj 19 Created Code Snippet Permutations in Vb.net
The present code snippet just does an especific task. This is, given an ordered sequence of natural numbers, starting at zero, generate all the different permutations there can be. When we talk about permutations, the order of the sequence does matter. So, the sequence 0, 1, 2 differs from 2, … Topic by xrj in Software Development