I'm trying to add a progress bar to a working theaded program that uses a cancelation token too. The structure of the program is: I have a button "BeginButton" that calls the function "MyFunction()". The function runs in another thread and a cancellation token listens if I press a Cancel button. I needed to add the thread since the UI freezes when MyFunction() runs and I wasn't able to stop it. Since the MyFunction() reads a file in chunks of 1024 bytes, my logic to show the progress is get the 1% of File.Length and check when the loop increases …

Member Avatar
Member Avatar
+0 forum 2

Hello to all, I'm trying to use the function below to print strings to a file. When I use Console.Write() or Console.WriteLine() the output file grows up 3MB or 4MB per seconds, but when I try to use StreamWriter or File.AppendAllText the output in the way shown below, the file grows up only in 20KB or 30KB per second. Why the print speed decreases too much when I use StreamWriter instead of Console.WriteLine()? What method should I use to write to a file maintaining the same speed of Console.WriteLine()? public static void PrintFunction() { //using (StreamWriter writer = File.AppendText(@"C:\OuputFile.txt")) using …

Member Avatar
Member Avatar
+0 forum 5

Hello to all, I have a console executable file that I run from DOS console passing some options and an input file. I'd like to give to this exe file a GUI. I'd like that the GUI was a new exe file that could contain inside my console exe file and run the console exe from the GUI, having the console exe file inside of the GUI file. Is possible to do this with C++? Please suggestions. Thanks in advance. Regards

Member Avatar
Member Avatar
+0 forum 8

Hello to all in forum, Maybe some java expert could help me. How can I read chunks from binary file each chunk at a time? The chunks are separated with the bytes D2 followed by A7 and of variable length. This is whenever D2A7 is found, this is the End/Beginning of a new chunk. The code I have so far is below and in general does this: 1- Store 1024 bytes in "inputBytes" for each for loop 2- Convert to a hexadecimal string the content of "inputBytes" 3- Replace all the "E8F5" with carriage return \r (in order to be …

Member Avatar
Member Avatar
+0 forum 4

Hello to all, HAving a hash where its keys are associated with arrays like below: myHash = {"A"=>["HYU"], "B"=>["TU6"], "C"=>["11", "09","88","2"], "D"=>["01", "11"]} Each key represent one header and the arrays elements represent the values for each header. How to print each key in different column separated by comma "," and below each header print all the values of corresponding array. Since some arrays have more elements, for the arrays that have less elements print blank like below. A,B,C,D HYU,TU6,11,1 ,,9,11 ,,8, ,,2, Thanks in advance for any help.

Member Avatar
Member Avatar
+0 forum 4

Hello to all, Having to arrays of the same size like below. A = ["SL","MW","OP"] B = ["RU","YF","L2"] How can I concatenate in columns to print in parallel like below? SL - RU MW - YF OP - L2 I've tried with code below but is printing all in one column puts A << "-" << B Thanks in advance for any help.

Member Avatar
Member Avatar
+0 forum 18

Hello to all, I have a ruby script with a very long hash with more than 300 associations. The script looks like below: #!/usr/bin/env ruby Array_A = [] myHash = { "x1" => "2", "x2" => "0", "x3" => "1", . . . "X350" => "1" } myHash.keys.each do |z| Array_A << "This is key " + z end puts myHash.values.join("|") puts Array_A.join("|") But since the hash is very large, for reading purposes I'd like to put the hash at the end of the script and the each.do loop and puts command first, something like below. Is there a way …

Member Avatar
Member Avatar
+0 forum 8

Hello to all, Please some help with this. I'm newbie to XML, XLS, Xpath, etc. How can I set correctly the reference in the command "for-each select" to avoid issues with this Top node that has namespace? I'm trying to get a XLS stylesheet to get some values. The issue is that the Top node has a colon ":" in its name "doc-master:DOCMASTER1". Searching I've seen that this is named namespaces, where the prefix is doc-master and the local name is DOCMASTER1. To begin practice with something simple I'm trying to get values for BicCode and URMs that are children …

Member Avatar
Member Avatar
+0 forum 14

Hello to all, When I open a thread and somebody answers me, I don't receive email notification. So, I need to constantly check the thread to know if somebody has answered me. Is there a way to set in my profile instantaneous email notification to know when somebody answers a thread for which I'm subscribe to? Thanks in advance

Member Avatar
Member Avatar
+0 forum 4

Hello to all, I'm new to C++, but I have a program in C++ that runs from DOS console. I'd like to execute the same program adding a simple GUI with a button to select a file and inserting a value in a text box. How can I do this? The C++ code would be the same in Visual C++ and would be needed only to add the GUI or how? Thanks in advance for any suggestion.

Member Avatar
Member Avatar
+0 forum 14

Hello to all, Maybe you can help me with this, I would like to know if it is possible with Perl read from binary and get a string pattern given by a regex? If possible, may you show me an example please. Thanks for any help.

Member Avatar
Member Avatar
+0 forum 2

Hello everybody, I have a CSS menu in a wordpress based site that I've got to work correctly after help received in this great forum. Thanks for that. I only have one issue pending for this menu, I only would like help with the padding that it seems exists in "#navigation" div when hover using firebug as shown in image1 in this link [URL="http://socceroid.com/blog/wp-content/uploads/2012/01/image1.jpg"]sub-menu with padding[/URL]. The link to the real sample menu is [URL="http://socceroid.com/blog/"]http://SampleMenu[/URL] I would like to remove that "padding" in order the blue area (the link area "a") fills the "#navigation" div as [URL="http://socceroid.com/blog/wp-content/uploads/2012/01/image2.jpg"]this image[/URL] I've tried …

Member Avatar
Member Avatar
+0 forum 2

Hello everyone, I hope someone could help me with this problem. I have a problem with a vertical menu that I'm trying to insert in a sidebar in a wordpress based site. The problem is that when hover the sub menus only are visible in the sidebar area, the other part is hidden or behind the central div. How can I fix this problem? The problem can be seen in [URL="http://socceroid.com/blog/?page_id=2"]this sample[/URL] and the correct behavior and the HTML and CSS code are [URL="http://socceroid.com/blog/menu_HTMLl_and_CSS_code.html"]here[/URL] I insert the code below for easy access. [CODE]<style type="text/css"> #navigation {font-size:0.75em; width:210px;} #navigation ul {margin:0px; …

Member Avatar
Member Avatar
+0 forum 15

Hello everyone, Somebody could suggest me some good script that you have used (jquery or something) to embed within a div structure a multi album photo slideshow/gallery or some other way to do it. I've seen some but they aren't multi album and one of them has that feature but is not free script. Many thanks in advance

Member Avatar
Member Avatar
+0 forum 4

Hi everyone, My first post here, I'm newbie in web developement and I hope somebody could help me answering my doubts below. As my thread title, 1-) What does it mean keep it a website from jumping and how to do it (in general)? 2-) Is something like search all broken links that redirect to error pages? If so, 3-) May you suggest me in general what I have to do to search all "bad" links in order to fix or delete them? (Is there some tool to do that?) 4-) "Clen up" a website is related to the same, …

Member Avatar
Member Avatar
+0 forum 4

The End.