topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday April 27, 2024, 3:44 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - worstje [ switch to compact view ]

Pages: prev1 ... 4 5 6 7 8 [9] 10 11 12 13 14 ... 23next
201
I can't say I'm cheering for the new developer platforms MS is pooping out this time around. I've got experience with WPF, and it is a horribly over-engineered piece of bloat. It can do some nice things, but even .NET v4 on Windows 7 has so many basic issues that doing what you want with it is never an actual option. I cannot count the amount of bugs I have worked around so far, assuming I was able to do so. My other grudges is that it, and every new OS version, just mess up accepted interface guidelines so designers can invent their own wonderous new thingy majiggies on top of existing controls. Even when I do my best to have the controls mimic the Windows ones, it looks fake and behaves subtly different. What is the point of having visual styles and themes anymore?

Win32 is not at all a pretty API, and yes, it shows its age and can use some improvements. However, it is FULL of fixed bugs, stability and is the most efficient thing there will ever be for application development. They need to stop trying to throw it away, since they've already shown that the .NET framework, and WPF in particular, have more holes, bugs and regressions compared to Win32 in it than they can fix in the next 10 years.

I don't like HTML5 and JavaScript either, but that is more-so due to the browsers than the theoretical technology itself. :)

[/the-old-days-were-so-much-better-modus]

202
Living Room / Re: Anyone Using Bitcoins Yet?
« on: June 26, 2011, 02:41 PM »
Deozaan, I know that. :) Stop focusing on the badly worded part of my post!111 :tellme:

More seriously: there's plenty of CO and spraycan gasses and other nasties like nano-particles that are quite on their way to messing stuff up beyond words. Just 1% more oxygen would make a world of difference the way I understand it, even if the greenhouse theory ends up being a total balloon of hot air (pardon the pun)..

Also....  :-* Porn porn porn!



Very relevant, or so I thought when I was getting the link, but I'm confusing it with another video. All those WoW videos are alike. I am sad to say, no chinese goldfarmers in this one... just porn. :D

203
Living Room / Re: Anyone Using Bitcoins Yet?
« on: June 26, 2011, 11:26 AM »
I've got a simpletons solution to everything.

...

Let's base it inversely on the amount of CO2 and other crappy stuff in our air. It will finally give the beancounters a reason to favor nature and the generations we are currently ignoring with our own selfishness. :D

In case it isn't obvious yet: I can't really bother with analyzing economy like that. :) I understand it is important for tons of people, most of whom are beancounters, but in the long term I only see it mess stuff up given the inherent Do-Take-Dont-Give mentality it embodies.

But just to add my $0.02... my naive view is that relying on gold as our base commodity is pretty decent if only for the fact that way back countries weren't in as major debt as they are now. Money is an abstract number nowadays. Going deeper into debt doesn't seem to matter once you are already into debt for billions, and fixing it isn't something anyone wants - they just want to spend. If it was based on gold, we'd need so many shitty amounts of gold that countries/companies would finally stop biting into the apple-of-infinite-debt-money. Realistic people don't give their time or hard work away willy-nilly with a promise of being paid, but around all the big money that little fact seems forgotten. Greece is only the first of many running into a wall they created for themselves.

204
Announce Your Software/Service/Product / Re: Bvckup 2
« on: June 26, 2011, 01:28 AM »
I stopped using Bvckup v1 quite some time back; I remember it was in beta back then and I posted a bunch of findings and such on your forum. You replied to half of it I think, the other half never came (but I don't fault you for that; I know how easy it is to get busy and simply forget.)

The website feels way too Apple-ish to me, and to be honest I find it offputting. Bvckup (and I assume Bvckup2) are Windows Applications, and just looking at the website and its usage alone, I get a very strong iPhone or iTunes feel. And the latter has a very bad reputation on the Windows platform.

Another thing I noticed (geez, I'm full of criticism today) is that you seem to be calling it Bvckup2 now? Is this a permanent name or just a codename, and did the application itself not change versions? To quote your blog, and hopefully demonstrate a small fear regarding this naming:

I can call it a dinner spoon or I can call it a “soup delivering apparatus №2”. Which one sets a better tone for introducing a one-of-a-kind designer product?

Final question - my old Bvckup license, can I upgrade and still use it? Or are there still free licenses for testers? I'm happy to give it another try and report my findings if needed. The new features really do look quite appealing.

205
DC Gamer Club / Re: Terraria
« on: June 07, 2011, 08:11 PM »
We are interrupting this broadcast thread for an important news bulletin:

ALL HAIL THE WHOOPIE CUSHION!

Carry on.

206
With data centers, it isn't about how many problems there are over a period. It is about the effect a single problem can have. Good management keeps up on all their expireable UPSes, keeps matters segmented and so forth. That way, if a problem happens, it only hits some customers, or throughput is lowered, and not the entire location. I stick with my opinion that they should have done more disaster tests and drills. :)

207
Living Room / Re: Suggestions for removing nVidia drivers?
« on: June 05, 2011, 09:55 AM »
Are you sure the issue relates to nVidia drivers? There's plenty more reasons a BSOD can happen.

208
I don't know about hosts, but I surely hear a lot of complaints about the place DC is hosted. Professionalism is hard to find, I think, since if they had set it up properly, then they would have had enough juice to last till generators kicked in - or at the very least have had enough juice to power the most important pieces of electronics. Everything going down just means that they messed up big time. :(

209
What should there be more of on DonationCoder?  You may only select up to 10 options.

Followed by... exactly 10 options. What's the point of writing that anyway? A better one would be 'You must select at least one item.' or something along those lines. :)

Either way, I have voted.

210
Not very relevant but definitely worth sharing: a decade old story involving printers, ink, running out of ink, and the users of said commodities. It got a laugh out of me. :)

211
DC Gamer Club / Re: Terraria
« on: May 16, 2011, 02:48 PM »
Consider me to be #4.

212
General Software Discussion / Re: PC Lock software for "Free"
« on: May 16, 2011, 09:26 AM »
I can't say I approve of those tactics. So you run out of subscription, or hell maybe they go bankrupt, and your files are forever held hostage. Corporations only want money, and spending resources on people who aren't customers anymore is a way to lose money, so obviously you cannot expect them to help you out.

The way I see it, it should always be able to uninstall post-subscription period assuming you enter your password. This software is totally a no-no for me: I don't like hostage-subscription-ware no matter how small or crazy the situation has to be for it to actually turn into that.

213
Living Room / Re: Sound problems
« on: May 15, 2011, 12:22 PM »
I'd say, look into your drivers, your motherboard drivers in particular. In the meanwhile, does it help if you turn down/off hardware acceleration for various devices? Sound most prominently, but also video and the likes. You can generally turn that stuff down somewhere in case of problems. Technically, it means you get less performance, but both software and hardware aren't as demanding/cut-throat in their implementation, meaning it tends to be more dependable.

I occasionally get weird hiccups like that, and it usually happens when something hardware-related struggles a bit. Sticking in or removing USB drives, or my mouse fussing, stuff like that throws it off its rocker for a brief moment sometimes.

214
Here, code plus example-ish. You'll want to gut the stuff further.

XmlHelper.cs, gutted a fair amount and an excellent example of ugly code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Net;
using System.Xml;
using System.IO;

using System.Reflection;
using System.ComponentModel;
using System.Threading;

namespace JottiQ
{
    public enum HttpMethod
    {
        Get,
        Post,
    }

    public class UserCanceledException : Exception
    {
        public UserCanceledException()
            : base()
        {
        }

        public UserCanceledException(string message)
            : base(message)
        {
        }

        public UserCanceledException(string message, Exception inner)
            : base(message, inner)
        {
        }
    }

    class XmlHelper
    {
        static private NetworkCredential ApiCredentials = new NetworkCredential("Wouldn't_You", "Like_To_Know");
        static private string userAgent = null;

        public static string UserAgent
        {
            get
            {
                if (userAgent == null)
                {
                    System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
                    System.Reflection.AssemblyName name = assembly.GetName();
                    System.Version version = name.Version;

                    userAgent = name.Name + " v" + version.ToString();
                }

                return userAgent;
            }
        }

        public class FileUploadData : INotifyPropertyChanged, Status.IProgressStatusReporter
        {
            public event PropertyChangedEventHandler PropertyChanged;

            public delegate bool CanContinueDelegate();

            private string filename;
            private Stream stream;
            private JottiItem ji;   /* TODO: Temporary. Please fix! */
            private CanContinueDelegate ccd;

            public string FileName
            {
                get { return this.filename; }
            }

            public Stream Stream
            {
                get { return this.stream; }
            }

            public JottiItem JI
            {
                get { return ji; }
            }

            public CanContinueDelegate CanContinue
            {
                get { return ccd; }
            }

            public FileUploadData(string filename, Stream stream, JottiItem ji, CanContinueDelegate canContinue)
            {
                this.filename = filename;
                this.stream = stream;
                this.ji = ji;
                this.ccd = canContinue;
            }

            protected void OnPropertyChanged(string name)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(name));
                }
            }

            /* IProgressStatusReporter implementation */
            public long Min
            {
                get
                {
                    return 0;
                }
            }

            public long Max
            {
                get
                {
                    return (this.stream != null) ? this.stream.Length : 0;
                }
            }

            public long Progress
            {
                get
                {
                    return (this.stream != null) ? this.stream.Position : 0;//(this.stream.Position*10)/this.stream.Length : 0;
                }
            }

            public void Update()
            {
                OnPropertyChanged("Progress");
            }
        }

        static public XmlDocument getXmlResponse(string inURL, HttpMethod hm, Dictionary<string, object> fields)
        {
            /* HTTPWebRequest, XMLDocument */
            HttpWebRequest myHttpWebRequest;
            HttpWebResponse myHttpWebResponse;
            XmlDocument myXMLDocument;
            XmlTextReader myXMLReader;

            try
            {
                if ((hm == HttpMethod.Get) && (fields != null))
                {
                    StringBuilder sb = new StringBuilder();
                    sb.Append(inURL);
                    sb.Append("?");

                    foreach (KeyValuePair<string, object> pair in fields)
                    {
                        sb.Append(pair.Key);
                        sb.Append("=");
                        sb.Append(pair.Value);
                        sb.Append("&");

                    }

                    inURL = sb.ToString();
                }

                //Create Request
                myHttpWebRequest = (HttpWebRequest)HttpWebRequest.Create(inURL);
                myHttpWebRequest.Credentials = ApiCredentials;
                myHttpWebRequest.PreAuthenticate = true;
                myHttpWebRequest.UserAgent = UserAgent;

                if (hm == HttpMethod.Get)
                {
                    myHttpWebRequest.Method = "GET";
                    myHttpWebRequest.ContentType = "application/x-www-form-urlencoded; encoding='utf-8'"; //"text/xml; encoding='utf-8'";
                }
                else if (fields == null)
                {
                    /* If there's no parameters to send, we don't need to be difficult either. */
                    myHttpWebRequest.Method = "POST";
                }
                else
                {
                    myHttpWebRequest.Method = "POST";
                    // The value "multipart/form-data" should be used in combination with the INPUT element, type="file".

                    /* When we're uploading a good chunk of data, there is a huge chance of a
                     * KeepAlive bug crashing us halfway through. Disable those. */
                    myHttpWebRequest.KeepAlive = false;
                    myHttpWebRequest.Timeout = 6 * 60 * 60 * 1000;   // 6 hours should be enough for everyone.

                    /* Since we are using multipart/form-data, we need to be difficult with boundaries. */
                    string boundary = "----------------------------" + DateTime.Now.Ticks.ToString("x");
                    myHttpWebRequest.ContentType = "multipart/form-data; boundary=" + boundary;

                    // Get the boundary in bytes
                    byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n");

                    // 1. Calculate total length of entire message (by fake-building it)
                    // 2. Send content-length.
                    // 3. Send actual multipart stuff. This avoids having a huge file upload in memory.

                    // --BOUNDARY
                    // Content-Disposition: form-data; name="<NAME>"
                    //
                    // sadfasdfasdf
                    // --BOUNDARY
                    // Content-Disposition: form-data; name="<NAME>"; filename="C:\file1.txt"
                    // Content-Type: application/octet-stream
                    // --BOUNDARY--

                    long contentLength = 0;
                    string fileTemplate = "Content-Disposition: form-data; name=\"{0}\";filename=\"{1}\"\r\nContent-Type: application/octet-stream\r\n\r\n";
                    string miscTemplate = "Content-Disposition: form-data; name=\"{0}\"\r\n\r\n";

                    foreach (KeyValuePair<string, object> pair in fields)
                    {
                        if (pair.Value is FileUploadData)
                        {
                            FileUploadData fud = (FileUploadData)pair.Value;
                            string fileHeader = string.Format(fileTemplate, pair.Key, fud.FileName);

                            //convert the header to a byte array
                            byte[] bytes = System.Text.Encoding.UTF8.GetBytes(fileHeader);

                            contentLength += boundarybytes.Length + bytes.Length + fud.Stream.Length;
                        }
                        else
                        {
                            string miscHeader = string.Format(miscTemplate, pair.Key);
                            byte[] bytes = System.Text.Encoding.UTF8.GetBytes(miscHeader);
                            contentLength += boundarybytes.Length + bytes.Length + pair.Value.ToString().Length;
                        }
                    }

                    contentLength += boundarybytes.Length + 2;   /* extra 2 -- at the end of final boundary */
                    myHttpWebRequest.ContentLength = contentLength;

                    /* Step 3. Send the actual data and stuff. */
                    Stream requestStream = myHttpWebRequest.GetRequestStream();
                    
                    foreach (KeyValuePair<string, object> pair in fields)
                    {
                        requestStream.Write(boundarybytes, 0, boundarybytes.Length);
                        
                        if (pair.Value is FileUploadData)
                        {
                            FileUploadData fud = (FileUploadData)pair.Value;
                            string fileHeader = string.Format(fileTemplate, pair.Key, fud.FileName);
                            byte[] bytes = System.Text.Encoding.UTF8.GetBytes(fileHeader);
                            requestStream.Write(bytes, 0, bytes.Length);

                            // Use 4096*2 for the buffer / make that *4 to streamline IO over UI updates
                            byte[] buffer = new byte[4096*4];

                            int bytesRead = 0;
                            int bytesTotal = 0;
                            // Loop through whole file uploading parts in a stream.
                            while ((bytesRead = fud.Stream.Read(buffer, 0, buffer.Length)) != 0)
                            {
                                requestStream.Write(buffer, 0, bytesRead);
                                requestStream.Flush();

                                /* Temporary solution for live updates. */
                                bytesTotal += bytesRead;
                                fud.JI.StatusMessage = "Upload " + ((bytesTotal * 100) / fud.Stream.Length).ToString() + "% complete.";

                                fud.Update();
                                if (!fud.CanContinue())
                                    throw new UserCanceledException("Upload has been canceled by user.");
                            }
                            fud.JI.StatusMessage = "Upload done.";
                        }
                        else
                        {
                            string miscHeader = string.Format(miscTemplate, pair.Key);
                            byte[] bytes = System.Text.Encoding.UTF8.GetBytes(miscHeader);
                            requestStream.Write(bytes, 0, bytes.Length);

                            bytes = System.Text.Encoding.UTF8.GetBytes(pair.Value.ToString());
                            requestStream.Write(bytes, 0, bytes.Length);
                        }
                    }

                    // Write out the final boundary
                    boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "--\r\n");
                    requestStream.Write(boundarybytes, 0, boundarybytes.Length);

                    // Close our stream.
                    requestStream.Close();
                }

                //Get Response
                myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();

                //Now load the XML Document
                myXMLDocument = new XmlDocument();

                //Load response stream into XMLReader
                myXMLReader = new XmlTextReader(myHttpWebResponse.GetResponseStream());
                myXMLDocument.Load(myXMLReader);
            }
            catch (Exception myException)
            {
                throw new Exception("Error Occurred in getXMLResponse()", myException);
                //return null;
            }
            finally
            {
                myHttpWebRequest = null;
                myHttpWebResponse = null;
                myXMLReader = null;
            }

            return myXMLDocument;
        }

    }
}

It works to the extent I need it to, which admittedly isn't much at all. :) You'll want the getXmlResponse() method, which I originally took from some online example and heavily adjusted to suit my own needs. For JottiQ fileuploads, I call it like this (in a seperate thread):

XmlHelper.FileUploadData fud = new XmlHelper.FileUploadData(
                            System.IO.Path.GetFileName(ji.FilePath),
                            fileStream, ji,
                            delegate() { return !_terminated; });
//getXmlResponseWrapper() wraps various error-handling stuffs.
XmlDocument xml = getXmlResponseWrapper(ji, true, inURL, HttpMethod.Post,
                new Dictionary<string, object>()
                    {
                        {"token", token},
                        {"scanfile", fud}
                    }
                    );

The entire passing of ji to the function or its upload components is a bit of a hack I used for updating the display while uploading; I am actually in the process of taking that out which is why the code is very bi-polar in nature right now. The delegate serves the purpose of making the upload process cancelable.

In the above example, the token is a string. scanfile acts like like one of those file upload controls. I ended up reinventing the wheel of implementing the POST protocol because I couldn't find any builtin libraries that actually did that already. (Also, file upload things only work for POST method since the data is too much to fit in a GET request.) In your example, you can probably suffice with a single call like:

XmlDocument xml = getXmlResponse(inURL, HttpMethod.Post,
                new Dictionary<string, object>()
                    {
                        {"user", getUsernameString()},
                        {"uid", getUniqueID()}
                    }
                    );

...and so forth. The code doesn't do much error-checking, or URL encoding of parameter names (& -> %26 or + -> %2B) and the sort since my needs were simple and very well-defined so that I knew I would not need to worry about those cases. That may not be the case for you however. Hell, you may not even want to implement your script to return XML data, so then you could gut the XML loading bit out too.

Code highlighting removed since the highlighter turns all the indenting into &#160; repetitions. I'll gladly put it back in when mouser fixes the highlighter.

215
Give me a few minutes to edit my JottiQ code to remove some passwords and other stuff you don't need, and you'll have a sample. :)

216
For PHP, you only need Apache to run a webserver.
MySQL is the most popular database which you'll probably need if you want to do more complicated stuff. (Although if you've got other databases available already, you can use those instead and won't need MySQL.)
Filezilla is a ftp server.

Since you only want to use the http protocol, you only need the first for a php development environment.

217
You can install a local webserver to develop on, or you can upload each time. For as far software goes, usually a simple webbrowser will do miracles (with or without a temporary html page that has a form that allows you to create the proper sort of request).

Either way, I am fully in agreement with mouser. You'll want some scripts on the webserver. Nothing more, nothing less. Forget all that crap about uploading files, scanning directories, etc etc. :)

218
Good point. I hereby rescind my offer to share my code. :-[ The internet has far too long a memory for me to want to carry that blemish for the rest of my life. :mad:

Just kidding, I don't give a damn. Just let me know. 8)

Edit: On second thought, I re-read his request, and I think I've got the opposite. I have got client-side C# code that can upload to some http:// script, while I now think he wants a server-side script to receive file uploads and store them with. And with that, I am afraid I cannot help.

219
I have an ugly C# function I cobbled together for JottiQ that supports both GET and POST methods, the latter of which supports filetransfers. The code is butt ugly, but it is functional. It returns a XMLDocument if I recall properly, but could be simplified to just return a stream I believe.

Let me know if it would be good enough for your needs, and I'll supply you after my shopping run has provided me with foodstuffs to last the weekend. It's probably an excellent example of how not to deal with webservices in .NET, but I don't care much. :)

220
I haven't seen it on Opera. Did you try checking out the source for the affected parts of the page, or refreshing the page to see if it goes away? It might be some sort of bug in Firefox.

221
General Software Discussion / Re: DVCS ?
« on: May 09, 2011, 11:21 AM »
I think this topic is awesome. I've got little to offer - except that I barely limp by on my own using git for my personal versioning of my projects. Plain stage, commit -m and tag are all I use - and occasionally Git GUI to rollback a bit. I ought to use branches more, but last time I did so while branching from a public repo, I had a lot of troubles integrating changes made to the public repo into my own branch. Manually needing to merge my months old changes each time pretty much made me drop that hobby activity. :(

I love the pointers towards the software packages you've put up there - I might need to try those at some point as the command-line does get a bit annoying at times (especially when dealing with files in sub-directories). You found yourself another reader who patiently awaits new additions to this topic! :)

222
JottiQ is about as simple as an application for its intended audience can be. We're talking about scanning specific files with an online service there. People want to know the results in detail. So I agree - very much different than your audience.

Yes, it is boring. It is dull. That is because you allow your Windows to look dull. Deviantart and a dozen other places offer perfect ways (also for novice users) to skin their Windows as they want it. My point is still usability.

But regarding your designs, as you seem set on the idea (although I could swear I already feedbacked that too...) I still feel that your white text on those backgrounds is unreadable, and no matter what audience I am or I might be aiming for, there will be people who agree with me on that. Your text layout needs work in those example dialogs. The icon is super gigantic: yes, it gets your attention, but it might just be a tadbit too big. Its size is of the format that the only thing I can think about are those bloody annoying smiley-pack advertisements... Hope you can use that. :)

223
My opinion might not be that of the great masses and it might not be useful to you very much, but any application that tries to 'differ' from the standard Windows UI immediately gets a negative 10 points that almost always makes me move to the never-trying-it-out phase. (Hell, as it is I don't really like most of the UI of the last generation of browsers.) Different UI means users need to train and learn different elements and habits, and no matter how much time you spend on it you will miss things that some users might need.

With JottiQ, I tried really hard to stick to a standard interface, and what did I find? Mousewheel breaks/acts up due to a .NET control bug. Different DPI screwed the pooch and made text unreadable. Different colour settings made stuff unreadable. If it wasn't for cranioscopical, I would never have found half of those issues.

Sure, with a custom interface you solve the problem of not needing to take every possible Windows setting into account, but you forget that the user has configured those things like that for a reason. Maybe they have bad eyesight, maybe they have a big screen and don't want to scroll 3 lines at a time, or maybe they plain hate bright colors.

The world is bad enough with the big vendors reinventing user interfaces every product cycle. Let's not follow their habit with our small applications, please. :) Rather focus on the features you can offer and a simple interface to go along with it.

224
For such a problem, I would pop up a window after around ~2 seconds. On any reasonable internet connection, whatever you are doing should have long happened. If it takes longer the window will pop up right as the user begins to wonder 'what the fuck is the delay about'.

In JottiQ's case, I show a dialog in all instances where I get the maximum supported filesize of the service, explaining exactly what my delay is about. This is for two reasons: 1) it happens at the first time an item is added to the queue, which is not a time internet connectivity would otherwise display and my intended userbase is paranoid enough about security and random connections not to display anything, and 2) it tends to take a second or two. Setting up a SSL connection simply takes a few minutes.

(I was supposed to post this like 30 minutes ago, but I went to eat after clicking submit.. and came back to find someone ninja'd me and that my post never went through. Argh. :-\)

225
Living Room / Re: Charities
« on: May 07, 2011, 06:15 AM »
I'm with Tomos, although my case is an even gray-ier gray. :) For example, my day before christmas this year was spent as one of those annoying begging and nagging collectors that walk around in ones regional city center. There was a parade and all, and the organisation I was collecting for was the official charity of the event. I ended up collecting most of pretty much everyone (only a single person overshot me, and that was by ~5 euros :tellme: heh ).

Come to think of it, I did put some coins into my own box that time, so I actually did donate, so it isn't as extra grayish as I thought. (Still, usually I feel just wasting my time on the street bugging people is more than plenty of a donation to make.)

Pages: prev1 ... 4 5 6 7 8 [9] 10 11 12 13 14 ... 23next