Search Results

Search found 44 results on 2 pages for 'webdevhobo'.

Page 2/2 | < Previous Page | 1 2 

  • Installing maven on Ubuntu by manual download

    - by WebDevHobo
    To install Maven, I downloaded the latest version from the website and then followed these steps: http://maven.apache.org/download.html#Installation The last step, the version control, does not work. It says that 'mvn' is currently not installed and that I should type sudo apt-get install maven2 If I go directly to the mvn file itself, it does work: root@ubuntu:~# /usr/local/apache-maven/apache-maven-2.2.1/bin/mvn --version Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700) Java version: 1.6.0_21 Java home: /usr/java/jdk1.6.0_21/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.32-25-generic" arch: "i386" Family: "unix" So, what am I doing wrong here? Or what would and apt-get install do extra that I might have forgotten?

    Read the article

  • Make Thunderbird3 not switch to firefox after clicking a link.

    - by WebDevHobo
    Using ThunderBird 3 on Windows 7. When I get a mail with a link, I usually click it, if I know what it's about. Sadly, Thunderbird switches to Firefox which is opening the new tab. I'm active on several forums and get several of these messages per day. I don't want to click a link, be forced into firefox, go back to thunderbird, click a link, be forced into Firefox, etc... Is there an option to disable this? If not, I can see myself quitting Thunderbird altogheter and simply using web-based email checking instead of using an app.

    Read the article

  • Cast Graphics to Image in C#

    - by WebDevHobo
    I have a pictureBox on a Windows Form. I do the following to load a PNG file into it. Bitmap bm = (Bitmap)Image.FromFile("Image.PNG", true); Bitmap tmp; public Form1() { InitializeComponent(); this.tmp = new Bitmap(bm.Width, bm.Height); } private void pictureBox1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawImage(this.bm, new Rectangle(0, 0, tmp.Width, tmp.Height), 0, 0, tmp.Width, tmp.Height, GraphicsUnit.Pixel); } However, I need to draw things on the image and then have the result displayed again. Drawing rectangles can only be done via the Graphics class. I'd need to draw the needed rectangles on the image, make it an instance of the Image class again and save that to this.bm I can add a button that executes this.pictureBox1.Refresh();, forcing the pictureBox to be painted again, but I can't cast Graphics to Image. Because of that, I can't save the edits to the this.bm bitmap. That's my problem, and I see no way out.

    Read the article

  • Problems debugging virtual host with Netbeans

    - by WebDevHobo
    I'm running Ubuntu 9.10 I installed apache2 and downloaded the php 5.3.2 tar.gz, untarred and compiled. I then installed xdebug via pecl. After that I installed mysql-server and PhpMyAdmin. PhpMyAdmin can change apache2 settings, and now, xdebug is no longer included in my phpinfo(); overview. I've done a search for all possible php.ini files, but the 2 that I've found both link the xdebug.so file correctly. Yet still, Xdebug won't show. I have used and tested /etc/php5/php.ini and that worked, but it seems apache is now using a different php.ini file, and I don't know how to change that setting. Can anyone tell me how to bring it back to what it used to be? Also, installing apache, php and Xdebug was something I did by use of this video: http://vimeo.com/8005503

    Read the article

  • Reading a POP3 server with only TcpClient and StreamWriter/StreamReader[SOLVED]

    - by WebDevHobo
    I'm trying to read mails from my live.com account, via the POP3 protocol. I've found the the server is pop3.live.com and the port if 995. I'm not planning on using a pre-made library, I'm using NetworkStream and StreamReader/StreamWriter for the job. I need to figure this out. So, any of the answers given here: http://stackoverflow.com/questions/44383/reading-email-using-pop3-in-c are not usefull. It's part of a larger program, but I made a small test to see if it works. Eitherway, i'm not getting anything. Here's the code I'm using, which I think should be correct. EDIT: this code is old, please refer to the second block problem solved. public Program() { string temp = ""; using(TcpClient tc = new TcpClient(new IPEndPoint(IPAddress.Parse("127.0.0.1"),8000))) { tc.Connect("pop3.live.com",995); using(NetworkStream nws = tc.GetStream()) { using(StreamReader sr = new StreamReader(nws)) { using(StreamWriter sw = new StreamWriter(nws)) { sw.WriteLine("USER " + user); sw.Flush(); sw.WriteLine("PASS " + pass); sw.Flush(); sw.WriteLine("LIST"); sw.Flush(); while(temp != ".") { temp += sr.ReadLine(); } } } } } Console.WriteLine(temp); } Visual Studio debugger constantly falls over tc.Connect("pop3.live.com",995); Which throws an "A socket operation was attempted to an unreachable network 65.55.172.253:995" error. So, I'm sending from port 8000 on my machine to port 995, the hotmail pop3 port. And I'm getting nothing, and I'm out of ideas. Second block: Problem was apparently that I didn't write the quit command. The Code: public Program() { string str = string.Empty; string strTemp = string.Empty; using(TcpClient tc = new TcpClient()) { tc.Connect("pop3.live.com",995); using(SslStream sl = new SslStream(tc.GetStream())) { sl.AuthenticateAsClient("pop3.live.com"); using(StreamReader sr = new StreamReader(sl)) { using(StreamWriter sw = new StreamWriter(sl)) { sw.WriteLine("USER " + user); sw.Flush(); sw.WriteLine("PASS " + pass); sw.Flush(); sw.WriteLine("LIST"); sw.Flush(); sw.WriteLine("QUIT "); sw.Flush(); while((strTemp = sr.ReadLine()) != null) { if(strTemp == "." || strTemp.IndexOf("-ERR") != -1) { break; } str += strTemp; } } } } } Console.WriteLine(str); }

    Read the article

  • PHP extensions won't load on Apache startup

    - by WebDevHobo
    I've added php as a module for Apache 2.2.11: LoadModule php5_module "c:/php/php5apache2_2.dll" And also added AddType application/x-httpd-php .php And in PHP.ini, my extension dir is set to: extension_dir = "C:\php\ext" And yes, the directories are correct and all files do exist. But when I start apache, I get these errors: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 [Sun May 17 03:46:01 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.9-2 configured -- resuming normal operations [Sun May 17 03:46:01 2009] [notice] Server built: Dec 10 2008 00:10:06 [Sun May 17 03:46:01 2009] [notice] Parent: Created child process 4652 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 [Sun May 17 03:46:01 2009] [notice] Child 4652: Child process is running [Sun May 17 03:46:01 2009] [notice] Child 4652: Acquired the start mutex. [Sun May 17 03:46:01 2009] [notice] Child 4652: Starting 64 worker threads. [Sun May 17 03:46:01 2009] [notice] Child 4652: Starting thread to listen on port 80. So I'm probably forgetting something simple here, can someone tell me what I'm forgetting?

    Read the article

  • Trouble converting an MP3 file to a WAV file using Naudio

    - by WebDevHobo
    Naudio Library: http://naudio.codeplex.com/ I'm trying to convert an MP3 file to a WAV file, but I've run in to a small error. I know what's going wrong, but I don't really know how to go about fixing it. Here's the piece of code I'm running: private void button1_Click(object sender, EventArgs e) { using(Mp3FileReader reader = new Mp3FileReader(@"path\to\MP3")) { using(WaveFileWriter writer = new WaveFileWriter(@"C:\test.wav", new WaveFormat())) { int counter = 0; while(reader.Read(test, counter, test.Length + counter) != 0) { writer.WriteData(test, counter, test.Length + counter); counter += 512; } } } } reader.Read() goes into the Mp3FileReader class, and the method looks like this: public override int Read(byte[] sampleBuffer, int offset, int numBytes) { if (numBytes % waveFormat.BlockAlign != 0) //throw new ApplicationException("Must read complete blocks"); numBytes -= (numBytes % waveFormat.BlockAlign); return mp3Stream.Read(sampleBuffer, offset, numBytes); } mp3Stream is an object of the Stream class. The problem is: I'm getting an ArgumentException. MSDN says that this is because the sum of offset and numBytes is greater than the length of sampleBuffer. Documentation: http://msdn.microsoft.com/en-us/library/system.io.stream.read.aspx This happens because I increase the counter every time, but the size of the byte array test remains the same. What I've been wondering is: do I need to increase the size of the array dynamically, or do I need to find out the needed size at the beginning and set it right away? And also, instead of 512, the method in Mp3FileReader returns 365 the first time. Which is the size of a whole block. But I'm writing the full 512. I'm basically just using the read to check if I'm not at the end of the file yet. Do I need to catch the return value and do something with that, or am I good here?

    Read the article

  • Reading a POP3 server with only TcpClient and StreamWriter/StreamReader

    - by WebDevHobo
    I'm trying to read mails from my live.com account, via the POP3 protocol. I've found the the server is pop3.live.com and the port if 587. I'm not planning on using a pre-made library, I'm using NetworkStream and StreamReader/StreamWriter for the job. I need to figure this out. So, any of the answers given here: http://stackoverflow.com/questions/44383/reading-email-using-pop3-in-c are not usefull. It's part of a larger program, but I made a small test to see if it works. Eitherway, i'm not getting anything. Here's the code I'm using, which I think should be correct. public Program() { string temp = ""; using(TcpClient tc = new TcpClient(new IPEndPoint(IPAddress.Parse("127.0.0.1"),8000))) { tc.Connect("pop3.live.com",587); using(NetworkStream nws = tc.GetStream()) { using(StreamReader sr = new StreamReader(nws)) { using(StreamWriter sw = new StreamWriter(nws)) { sw.WriteLine("USER " + user); sw.Flush(); sw.WriteLine("PASS " + pass); sw.Flush(); sw.WriteLine("LIST"); sw.Flush(); while(temp != ".") { temp += sr.ReadLine(); } } } } } Console.WriteLine(temp); } So, I'm sending from port 8000 on my machine to port 587, the hotmail pop3 port. And I'm getting nothing, and I'm out of ideas.

    Read the article

  • Re-setting CSS code for form buttons

    - by WebDevHobo
    I used a CSS reset to reset some commonly-used items. The code is this: html, body, div, h1, h2, h3, h4, ul, ol, li, form, input, fieldset, textarea { margin: 0; padding: 0; border: 0; font-size: 100%; } ul {list-style: none outside none;} img, fieldset {border: 0;} h1, h2, h3, h4 {font-weight: normal;} em {font-style: italic;} strong {font-weight: bold;} I know there's YUI and Meyer's reset, but I use this one. Now, the problem I'm experiencing is that I can't get the submit buttons to look normally again. I could ofcourse remove the input from the list and be done with it, but I'd like to know how to get it back, since I might need that in the future.

    Read the article

  • Windows Netbeans with PHPunit, not working

    - by WebDevHobo
    I ran into this question: http://stackoverflow.com/questions/1552130 But applying the fix mentioned there does not work. Netbeans keeps saying the version of PHPUnit is too old and that I need at least 3.3.0, while I am using 3.3.9. Screenschots: I haven't editted anything about the files, I just downloaded the tgz, unzipped it all and put up the link.

    Read the article

  • Scrollbar with Sprite and Rectangle won't move text, just the Rectangle it's painted on.

    - by WebDevHobo
    Warning: school assignment. For those of you still with me, I am tasked with making some scrollable content in Flash. Load in a TextFile using LoadURL(), then display it. To get the text, we've written our own class TextFieldExtended, which is basically just there to give the textfile location to the constructor and then have the class do the various steps of getting it and loading it for you. So I needed to get a Scrollbar, which I got here: http://kirupa.com/forum/showthread.php?t=245468 (all files in a zip linked at the end of this text) The thing is, it works with Sprites. After trying to get it to accept TextFieldExtended, I bumped into a block, since the scrollbar relied heavily on a Sprite property that TextFieldExtended didn't have or could have. So I tried adding the TextFieldExtended instance to a Sprite instance using addchild. A problem occurs here that I do not know how to handle. It seems that a Rectangle is drawn and the Text is drawn on that. I say this because the scrollbar moves the Rectangle up and down a bit, but the text doesn't scroll, just the Rectangle it is positioned in and the text then moves along with it. My question: can this be fixed, or is does this implementation of scrollbars need a lot of adaptations before this is possible? If so, any scrollbars you can recommend, because it's too extended for me at this point. All files: http://www.mediafire.com/?q2ium22gmox This was made in Flash CS4 using ActionScript3. The Example class is the final implementation

    Read the article

  • Using the standard Flash AS3 scrollbar class

    - by WebDevHobo
    Flash has a scrollbar class, documented here: http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/controls/ScrollBar.html However, besides listing functions and variables, there's no real explanation of how to hook an instance of this class to a textfield. Everything I've tried either ends up in errors or the scrollbar not showing. The documentation lacks a clear way of how you should bind the textfield and the scrollbar toghether, and CS4 isn't providing any help either. Can someone explain, or link to an example of how scrollbars work with textfield?

    Read the article

  • Learning... anything really

    - by WebDevHobo
    I'm particularly interested in Windows PowerShell, but here's a somewhat more general complaint: When asking for help on learning something new, be it a small subject on PHP or understanding a class in Java, what usually happens is that people direct me towards the documentation pages. What I'm looking for is somewhat of a course. A deep explanation of why something works the way it does. I know my basic programming, like Java and C#. I've never seen C or C++, though I have seen a bit of assembler. I know what the Stack and Heap are, how boxing and unboxing works, why you have to deep-copy an array instead of copying the pointer and some other things. Windows PowerShell on the other hand, I know nothing about. And I notice that when reading the small document or some code, I usually forget what it does or why it works. What I am looking for is preferably, a nice tutorial that explains the beginnings, the concepts, and goes to more difficult things at a steady pace. The only thing documentation can do is explain what a function does. That's no good to me since I don't know what I want to do yet. I could read about a thousand functions, and forget about most of them, because I don't need to implement them right after it. Randomly wandering through the documentation doesn't do me any good. So conclude, what is a good tutorial on Windows Powershell? One which explains in clear language what is happening, one which builds on previous things learned. I don't think googling this is a good idea. Doing a Google search on this would turn up numerous tutorials. And experience tells me that you have to look long and hard to find the gem you're looking for. That's why I'm asking here. Because this is the place where you can find more experienced people. Many of the PowerShell guys among you will know the good ones already, and by asking you, I avoid wasting time that could be spent learning. So to summarize: I will not google this!

    Read the article

  • File.Replace throwing IOException

    - by WebDevHobo
    I have an app that can make modify images. In some cases, this makes the filesize smaller, in some cases bigger. The program doesn't have an option to "not replace the file if result has a bigger filesize". So I wrote a little C# app to try and solve this. Instead of overwriting the files, I make the app write the result to a folder under the current one and name that folder Test. The C# app I wrote compares grabs the contents of both folders and puts the full path to the file(s) in two List objects. I then compare and replace. The replacing isn't working however. I get the following IOException: Unable to remove the file to be replaced The location is on an external hard-drive, on which I have full rights. Now, I know I can just do File.Delete and File.Move in that order, but this exception has gotten me interested in why this particular setup wont work. Here's the source code: http://pastebin.com/4Vq82Umu And yes, the file specified as last argument of the Replace function does exist.

    Read the article

  • How to receive a datastream from a device on your computer, in C#

    - by WebDevHobo
    I plan to build a small audio-recorder app in C#. My laptop has a built in Microphone that's always active, so I want to use that as an early-stage test. I would simply start recording, save the file as a .wav or even use the LAME dll to make it into an MP3. The problem is, I don't know how to contact that microphone. Do I use a library that can detect a device, or do I just catch a stream of bytes from the port that the device is on? I don't have any experience with receiving data from connected devices. I suppose that I'll need to enter all the data into a byte array and then Serialize that into a WAV file, but I'm not sure. Can I get some pointers on this subject?

    Read the article

  • Get html that is generated via AJAX in C# webclient

    - by WebDevHobo
    I often go to a site to look stuff up. I thought to myself: "Hold on. I can program. Why am I going to this site manually when I can write a piece of software that does it for me?". And so I started. I'm using C#, so I found WebClient and Uri. I've managed to get the source code for the site, yet the problem occurred that the specific data I'm looking for is generated via AJAX, after the source code has loaded. So that's my problem. How can I get that code, if it needs to be requested via an AJAX call first?

    Read the article

  • C# sending mails with images inline using SmtpClient

    - by WebDevHobo
    SmtpClient() allows you to add attachments to your mails, but what if you wanna make an image appear when the mail opens, instead of attaching it? As I remember, it can be done with about 4 lines of code, but I don't remember how and I can't find it on the MSDN site. EDIT: I'm not using a website or anything, not even an IP address. The image(s) are located on a harddrive. When sent, they should be part of the mail. So, I guess I might wanna use an tag... but I'm not too sure, since my computer isn't broadcasting.

    Read the article

  • Adding C++ DLL's to a C# project

    - by WebDevHobo
    I'm trying to use the lame_enc.dll file from LAME in a C# project, but adding the thing seems impossible. I keep getting an error that says that a reference could not be added and to please check if the is accessible, a valid assembly or COM component. I have no C++ experience, though I would like to use the functionality. Right now I'm using Process from the .NET framework to call lame.exe and do stuff, but I'd like to know if there's another way.

    Read the article

< Previous Page | 1 2