Daily Archives

Articles indexed Monday January 10 2011

Page 1/36 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to remove empty revisions from existing svn dump file?

    - by Palmin
    I have an svn dump file which includes "empty" revisions (these were created by svnsync when synching only a subdirectory of an existing repository). Since I'd like to use the svnsync'd repository as the new master (no need to sync again), I wanted to get rid of all the empty revisions. Unfortunately, running the dump through svndumpfilter does not seem to remove the empty revisions, probably because svndumpfilter only looks at revisions it cleaned up by itself with the --exclude option (see also here) I was also looking into svndumptool, but it does not seem to provide this functionality. Is it possible to filter these revisions in any other way?

    Read the article

  • Can't connect to a machine via Cisco VPN on Mac

    - by Alex
    Hi there, I have a curious problem. I can connect to work's vpn using Cisco VPN Client. I can get internet through that vpn. When I go check the IP online it tells me the IP address of the server I connected. However, when I try to ping one of the machines at work I get nothing. And traceroute says there is no route to the destination. But works for google. Any ideas? Is some traffic not sent through the VPN on mac Alex

    Read the article

  • Can not connect to telnet server

    - by BloodPhilia
    So, I can't use telnet to connect to any server but it works fine from a different computer. It just says it can't connect. I tried the following things: Disable firewall and AV protection. (Basically, there was no security feature left online) Telnet is set to "Trusted" in my AV protection. (Kaspersky Internet Security 2011) Using Putty to telnet, but apparently Putty's connection is also inhibited. (Says it can't connect to host) Disabling the telnet client in Control Panel and then re-enabling it. (Windows 7 Ultimate) hosts file is clean. Checked for nasties using MBAM and KIS 2011 as well as going though my HijackThis logs, nothing found. I can connect to the same machines/servers through the web browser, ping, tracert, etc. Only telnet seems to be blocked. Any other thoughts?

    Read the article

  • DI-524UP will become deadly slow when downloading torrents

    - by abolotnov
    I have a DI-524UP router that shares internet to two notebooks at home via wireless and a desktop via wired collection. It will become barely available/pingable via wireless when I download torrents on a desktop computer. Even when I limit download speed to 20% or less of available bandwidth - it must be something else, not the speed that causes the issue. I've tried limiting number of active connections and stuff but it will still not cure. Is there anything I can do about this?

    Read the article

  • 3 monitors + a TV on a single card with Eyefinity?

    - by Paul Accisano
    Greetings all, Right now I have a fairly standard video card with 2 DVI ports, one powering my single monitor and another powering my HDTV (with a DVI-to-HDMI cable), which are in separate rooms. I never need to have my monitor and TV active at the same time. I'm looking into a possible computer upgrade. I'd like to know if the following situation is possible. I want three monitors on my desk powered by a single card, which I hear these new Eyefinity cards are capable of. But, I also want my TV hooked up. At any given time, I would want either my three monitors active or my TV active, never both at once. So it seems to me it might be possible to do this all a single 3-port card with a splitter of some kind. Is this possible? What hardware would I need? Thanks!

    Read the article

  • Unable to use pbcopy while in tmux session

    - by user62139
    Running tmux 1.4 installed from ports on snow-leopard I am unable to use the built in OSX pbcopy command. Outside of tmux: > echo "abc" | pbcopy > echo pbpaste # or using ^v abc But inside of tmux: > echo "123" | pbcopy > echo pbpaste abc I've scoured the man page but can't find any options that might relate to this behaivor. I also can't understand why tmux would mess with shell redirection. Anybody have any clues?

    Read the article

  • Distributed Development Tools -- (Version control and Project Management)

    - by Macy Abbey
    Hello, I've recently become responsible for choosing which source control and project management software to use for a company that employs me. Currently it uses Jira (project management) and Subversion (version control). I know there are many other options out there -- the ones I know about are all in this article http://mashable.com/2010/07/14/distributed-developer-teams/ . I'm leaning towards recommending they just stay with what they have as it seems workable and any change would have to be worth the cost of switching to say github/basecamp or some other solution. Some details on the team: It's a distributed development shop. Meetings of the whole team in one room are rare. It's currently a very small development team (three developers). The project management software is used by developers and a product manager or two. What are you experiences with version control and project management web applications? Are there any you would recommend and you think are worth the switching cost of time to learn new services / implementing the change? Edit: After educating myself further on the options it appears DVCS offer powerful benefits that may be worth investing in now as opposed to later in the company's lifetime when the switching cost is higher: I'm a Subversion geek, why I should consider or not consider Mercurial or Git or any other DVCS?

    Read the article

  • Common mistakes which lead to corrupted invariants

    - by Dave B.
    My main source of income is web development and through this I have come to enjoy the wonders of programming as my knowledge of different languages has increased over the years through work and personal play. At some point I reached a decision that my college education was not enough and that I wanted to go back to school to get a university degree in either computer science or software engineering. I have tried a number of things in my life and it took me a while before I found something that I feel is a passion and this is it. There is one aspect of this area of study that I find throws me off though. I find the formal methods of proving program correctness a challenge. It is not that I have trouble writing code correctly, I can look at an algorithm and see how it is correct or flawed but I struggle sometimes to translate this into formal definitions. I have gotten perfect or near perfect marks on every programming assignment I have done at the college level but I recently got a swath of textbooks from a guy from univeristy of waterloo and found that I have had trouble when it comes to a few of the formalisms. Well at this point its really just one thing specifically, It would really help me if some of you could provide to me some good examples of common mistakes which lead to corrupted invariants, especially in loops. I have a few software engineering and computer science textbooks but they only show how things should be. I would like to know how things go wrong so that it is easier to recognize when it happens. Its almost embarrassing to broach this subject because formalisms are really basic foundations upon which matters of substance are built. I want to overcome this now so that it does not hinder me later.

    Read the article

  • What is the proper way to Windows 7/Ubuntu 10.10 Dual-Triple Boot Partitioning for Laptop OEM?

    - by Denja
    Hi Linux Community, I find my self struggling with the slowness of windows OS once again. It's Time to change with the Ubuntu 10.10 64bit for I like to use a faster Operating System. My Hard Disk laptop has a RECOVERY and HP_TOOLS partition they are both Primary. I Have the System Recovery DVD for Windows 64bit should anything bad happen. Here's the layout I used with windows before: * (C:) Windows 7 system partition NTFS - 284,89GB (Primary,ad Boot,Pagefile,Dump) * HP_TOOLS system partition FAT32 - 99MB (Primary) * (D:) RECOVERY partition NTFS - 12,90GB (Primary) * SYSTEM partition NTFS 199MB (Primary) Here's the layout I wanted to make: * (C:) Windows 7 system partition NTFS - 60GB (Primary) (sda1) * (D:) Windows DATA partition (user files) NTFS - 120GB(Primary)(sda2);wanna share with Linux * Linux root Ext4 - 10GB (Extended)(sda3) (Ubuntu 10.10 64bit) * Linux home Ext3 - 90GB (Extended)(sda4) (Ubuntu 10.10 64bit) * Linux swap swap- RAM size, 3GB (sda5) * Linux root Ext3- 18GB (Extended) (sda6) (OpenSuse or Puppy or kubuntu) Here is my New Ubuntu 10.10 64bit layout in use now: * SYSTEM partition NTFS 199MB (Primary) (sda1) * (C:) Windows 7 system partition NTFS - 90GB (Primary) (sda2) * (D:) Windows 7 RECOVERY partition NTFS - 12,90GB (Primary) (sda3) * Linux system partition EXTENDED - 195,1GB (Logical) * Linux root Ext4- 10GB (Extended) (sda4) * Linux swap swap- RAMx2 size, 6,1GB (sda5) * Linux home Ext3- 179GB (Extended) (sda6) When I installed Ubuntu,I didn't know if I could wipe all previous partitions,because of the RECOVERY partition. So I just made the space for my extended partition with GParted by deleting the HP_TOOLS (Fat32). By doing this I managed somehow to install Ubuntu 64 with Success. And I also made the partitions for the swap or a third Linux OS as Jordan suggested. But I couldn't actually make the partitions for the shared NTFS.(no option!) Question 1: What is the proper way to Windows 7/Ubuntu 10.10 Dual-Triple Boot Partitioning for Laptop OEM?? Thank you in advance for your advises and suggestions and Happy New Year to All!!

    Read the article

  • How do I copy packages within a PPA from one release to another? (nonsensical "same version already has published binaries" error)

    - by Scott Ritchie
    I keep getting weird errors from launchpad when I try and copy the Maverick packages to Natty for the PPA. I select the wine1.3 package (not in Ubuntu), select "copy to this PPA", and then select "rebuild the resulting binaries". This error emerges: The following source cannot be copied: wine1.3 1.3.11-0ubuntu1 in maverick (same version already has published binaries in the destination archive) I have no idea what this error means but apparently it doesn't mean there are binaries in the destination archive.

    Read the article

  • Xaudio2 XAPO Effects

    - by Jason Champion
    I've been working with XAudio2. After looking at the samples, example code, and sparse documentation available from Microsoft and the MSDN, I've found that there aren't any easy-to-find resources on creating and using XAPO effects, nor any XAPO effects produced by third parties that I can download and/or buy. What it looks like is that if I create an app that uses XAPO effects, I'll have to create them all myself because there's no community of existing applications like there is with technologies like Apple's AU or Steinberg's VST. Is this true, or are there others using XAudio2 and XAPO and I just haven't found them? Is there a place to ask programmer-support-related questions about XAudio2 and related technologies (or is this the best destination)? The best I've found so far are the XNA forums, which are game-specific and sparsely populated in the audio area.

    Read the article

  • How to use the md5 hash?

    - by Ken
    Okay, so I'm learning php, html, and mysql to learn website development (for fun). One thing I still don't get is how to use md5 of sha1 hashes. I know how to hash the plain text, but say I want to make a login page. Since the password is hashed and can't be reversed, how would mysql know that the user-inserted password matches the hashed password in the database? Here is what I mean: $password = md5($_POST['password']); $query = ("INSERT INTO `users`.`data` (`password`) VALUES ('$password')"); I know that this snippet of script hashes the password, but how would I use this piece of code and make a login page? Any working examples would be great.

    Read the article

  • Porting a select loop application to Android with NDK. Design question.

    - by plaisthos
    Hi, I have an network application which uses a select loop like this: bool shutdown=false; while (!shutdown) { [do something] select(...,timeout); } THe main loop cannot work like this in an Android application anymore since the application needs to receive Intents, need to handle GUI, etc. I think I have basically three possibilities: Move the main loop to the java part of the application. Let the loop run in its own thread and somehow communicate from/to java. Screw Android <= 2.3 and use a native activity and use AInputQueue/ALooper instead of select. The first possibility is not easy since java has no select which works on fds. Simply using the select and return after each loop to java is not an elegant possibility either since that requires setting the timeout to something like 20ms to have a good response time in the java part of the program. The second probability sound nicer but I have do some communication between java and the c++/c part of the program. Things that cold work: Using a socket, kind of ugly. using native calls in the "java gui thread" and callback from native in the "c thread". Both threads need to have thread safe implementations but this is managable. I have not explored the third possibility but I think that it is not the way to go. I think I can hack something together which will work but I asking what is the best path to chose.

    Read the article

  • Asp.net text box is only returning the first value

    - by queryne
    C sharp newbie question...I have a simple asp.net form that has a textbox that collects phonenumbers to send SMS messages. If I bypass the form and hardcode the numbers using the following format: "2133211234",#1233211234" the code works fine. However when i try to use this same format using my form, the sms will ONLY send to the first number. I have a feeling i'm missing out on some property on my form that will accept all of the values. also any idea how how i can add some lines of code that will allow users to enter numbers like this: 3123211234,4123212344 and have it converted to the format above when the number is submitted? Any ideas? Thanks in advance.

    Read the article

  • C++0x and the Lack of Polymorphic Lambdas - Why?

    - by Dominar
    I've been reviewing the draft version of the upcoming C++0x standard. Specifically the section on lambdas, and am confused as to the reasoning for not introducing polymorphic lambdas. I had hoped we could use code such as the following: template<typename Container> void foo(Container c) { for_each(c.begin(),c.end(),[](T& t) { ++t; }); } What were the reasons: Was it the committee ran out of time? That polymorphic lambdas are too hard to implement? Or perhaps that they are seen as not being needed by the PTB?

    Read the article

  • Cannot pull correct data from a Javascript array into an HTML form

    - by Isaac
    I am trying to return the description value of the corresponding author name and book title(that are typed in the text boxes). The problem is that the first description displays in the text area no matter what. <h1>Bookland</h1> <div id="bookinfo"> Author name: <input type="text" id="authorname" name="authorname"></input><br /> Book Title: <input type="text" id="booktitle" name="booktitle"></input><br /> <input type="button" value="Find book" id="find"></input> <input type="button" value="Clear Info" id="clear"></input><br /> <textarea rows="15" cols="30" id="destin"></textarea> </div> JavaScript: var bookarray = [{Author: "Thomas Mann", Title: "Death in Venice", Description: "One of the most famous literary works of the twentieth century, this novella embodies" + "themes that preoccupied Thomas Mann in much of his work:" + "the duality of art and life, the presence of death and disintegration in the midst of existence," + "the connection between love and suffering and the conflict between the artist and his inner self." }, {Author: "James Joyce", Title: "A portrait of the artist as a young man", Description: "This work displays an unusually perceptive view of British society in the early 20th century." + "It is a social comedy set in Florence, Italy, and Surrey, England." + "Its heroine, Lucy Honeychurch, struggling against straitlaced Victorian attitudes of arrogance, narroe mindedness and sobbery, falls in love - while on holiday in Italy - with the socially unsuitable George Emerson." }, {Author: "E. M. Forster", Title: "A room with a view", Description: "This book is a fictional re-creation of the Irish writer'sown life and early environment." + "The experiences of the novel's young hero,unfold in astonishingly vivid scenes that seem freshly recalled from life" + "and provide a powerful portrait of the coming of age of a young man ofunusual intelligence, sensitivity and character. " }, {Author: "Isabel Allende", Title: "The house of spirits", Description: "Allende describes the life of three generations of a prominent family in Chile and skillfully combines with this all the main historical events of the time, up until Pinochet's dictatorship." }, {Author: "Isabel Allende", Title: "Of love and shadows", Description: "The whole world of Irene Beltran, a young reporter in Chile at the time of the dictatorship, is destroyed when" + "she discovers a series of killings carried out by government soldiers." + "With the help of a photographer, Francisco Leal, and risking her life, she tries to come up with evidence against the dictatorship." }] function searchbook(){ for(i=0; i &lt; bookarray.length; i++){ if ((document.getElementById("authorname").value &amp; document.getElementById("booktitle").value ) == (bookarray[i].Author &amp; bookarray[i].Title)){ document.getElementById("destin").value =bookarray[i].Description return bookarray[i].Description } else { return "Not Found!" } } } document.getElementById("find").addEventListener("click", searchbook, false)

    Read the article

  • Which HTML and CSS standards reached W3C Recommendation status?

    - by mxn 4000
    Could anyone please tell me which HTML/XHTML and CSS versions reached "Recommendation" (not "Candidate Recommendation") status? I tried to find the documents at http://www.w3.org/TR/tr-status-stds and they appear to be: 1) "XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)" 2) "Cascading Style Sheets (CSS1) Level 1 Specification" Please correct me if I'm wrong. These are kinda neanderthal technologies...

    Read the article

  • awk and cat - How to ignore multiple lines?

    - by Filipe YaBa Polido
    I need to extract Voip log from a D-Link router, so I've setup a little python script that executes a command in this router via telnet. My script does a "cat /var/log/calls.log" and returns the result, however... it also sends non-important stuff, like the BusyBox banner, etc... How can I ignore lines from 1 to 6 and the last 2 ? This is my current output: yaba@foobar:/stuff$ python calls.py BusyBox v1.00 (2009.04.09-11:17+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. DVA-G3170i/PT # cat /var/call.log 1 ,1294620563,2 ,+351xxx080806 ,xxx530802 ,1 ,3 ,1 DVA-G3170i/PT # exit And I just need: 1 ,1294620563,2 ,+351xxx080806 ,xxx530802 ,1 ,3 ,1 (it can have multiple lines) So that I can save it to a CSV and later to a sql db. Thanks, and sorry my bad english.

    Read the article

  • Understanding Javascript's difference between calling a function, and returning the function but executing it later.

    - by Squeegy
    I'm trying to understand the difference between foo.bar() and var fn = foo.bar; fn(); I've put together a little example, but I dont totally understand why the failing ones actually fail. var Dog = function() { this.bark = "Arf"; }; Dog.prototype.woof = function() { $('ul').append('<li>'+ this.bark +'</li>'); }; var dog = new Dog(); // works, obviously dog.woof(); // works (dog.woof)(); // FAILS var fnWoof = dog.woof; fnWoof(); // works setTimeout(function() { dog.woof(); }, 0); // FAILS setTimeout(dog.woof, 0); Which produces: Arf Arf undefined Arf undefined On JSFiddle: http://jsfiddle.net/D6Vdg/1/ So it appears that snapping off a function causes it to remove it's context. Ok. But why then does (dog.woof)(); work? It's all just a bit confusing figuring out whats going on here. There are obviously some core semantics I'm just not getting.

    Read the article

  • Python: Which encoding is used for processing sys.argv?

    - by EOL
    What encoding are the elements of sys.argv in, in Python? are they encoded with the sys.getdefaultencoding() encoding? sys.getdefaultencoding(): Return the name of the current default string encoding used by the Unicode implementation. PS: As pointed out in some of the answers, sys.stdin.encoding would indeed be a better guess. I would love to see a definitive answer to this question, though, with pointers to solid sources! PPS: As Wim pointed out, Python 3 solves this issue by putting str objects in sys.argv (if I understand correctly). The question remains open for Python 2.x, though. Under Unix, the LC_CTYPE environment variable seems to be the correct thing to check, no? What should be done with Windows (so that sys.argv elements are correctly interpreted whatever the console)?

    Read the article

  • Should I use WPF or ASP.NET for my next Web Application development?

    - by gap
    We have a web application that has been built using MySQL / PHP / Javascript+JQuery, with server-side HTML generation. The problem is that of the 10 software developers that work for the company, none are PHP experts (we're all .NET / C# developers). I need to make a recommendation to my management team on which technologies to use as the platform for the next generation of web application products. I want to leverage the .NET / C# expertise which the company has and is otherwise building, and so am inclined to recommend some Microsoft technologies. We don't want a client-side plugin, and we don't need flashy animations/multimedia, so I'm ruling out Silverlight. Is WPF ready for primetime? Is ASP.NET deprecated by WPF? How do I choose between these two technologies? Big Question, I know... I can refine it based on your comments if necessary. Thanks for taking the time.

    Read the article

  • EF4, MVC 3, Azure and Code First or Traditional

    - by RichardAlanA
    I am planning to build a web application using ASP MVC3 that runs on Azure with a SQL Azure back end. I would like to use the Microsoft stack and have no plans to ever change to another stack. I am looking into the use of WCF and WF but that would be in the future. I looked at the traditional and Code First approach to using Entity Framework but I can't see if there is any advantage in using one or the other approach. Sure they each have advantages but for me I don't care if my classes do inherit from EF classes. All I want is to find the most efficient solution. Can anyone out there give me some advice as to which approach might be the best. thanks very much Richard

    Read the article

  • Why does Celery work in Python shell, but not in my Django views? (import problem)

    - by TIMEX
    I installed Celery (latest stable version.) I have a directory called /home/myuser/fable/jobs. Inside this directory, I have a file called tasks.py: from celery.decorators import task from celery.task import Task class Submitter(Task): def run(self, post, **kwargs): return "Yes, it works!!!!!!" Inside this directory, I also have a file called celeryconfig.py: BROKER_HOST = "localhost" BROKER_PORT = 5672 BROKER_USER = "abc" BROKER_PASSWORD = "xyz" BROKER_VHOST = "fablemq" CELERY_RESULT_BACKEND = "amqp" CELERY_IMPORTS = ("tasks", ) In my /etc/profile, I have these set as my PYTHONPATH: PYTHONPATH=/home/myuser/fable:/home/myuser/fable/jobs So I run my Celery worker using the console ($ celeryd --loglevel=INFO), and I try it out. I open the Python console and import the tasks. Then, I run the Submitter. >>> import fable.jobs.tasks as tasks >>> s = tasks.Submitter() >>> s.delay("abc") <AsyncResult: d70d9732-fb07-4cca-82be-d7912124a987> Everything works, as you can see in my console [2011-01-09 17:30:05,766: INFO/MainProcess] Task tasks.Submitter[d70d9732-fb07-4cca-82be-d7912124a987] succeeded in 0.0398268699646s: But when I go into my Django's views.py and run the exact 3 lines of code as above, I get this: [2011-01-09 17:25:20,298: ERROR/MainProcess] Unknown task ignored: "Task of kind 'fable.jobs.tasks.Submitter' is not registered, please make sure it's imported.": {'retries': 0, 'task': 'fable.jobs.tasks.Submitter', 'args': ('abc',), 'expires': None, 'eta': None, 'kwargs': {}, 'id': 'eb5c65b4-f352-45c6-96f1-05d3a5329d53'} Traceback (most recent call last): File "/home/myuser/mysite-env/lib/python2.6/site-packages/celery/worker/listener.py", line 321, in receive_message eventer=self.event_dispatcher) File "/home/myuser/mysite-env/lib/python2.6/site-packages/celery/worker/job.py", line 299, in from_message eta=eta, expires=expires) File "/home/myuser/mysite-env/lib/python2.6/site-packages/celery/worker/job.py", line 243, in __init__ self.task = tasks[self.task_name] File "/home/myuser/mysite-env/lib/python2.6/site-packages/celery/registry.py", line 63, in __getitem__ raise self.NotRegistered(str(exc)) NotRegistered: "Task of kind 'fable.jobs.tasks.Submitter' is not registered, please make sure it's imported." It's weird, because the celeryd client does show that it's registered, when I launch it. [2011-01-09 17:38:27,446: WARNING/MainProcess] Configuration -> . broker -> amqp://GOGOme@localhost:5672/fablemq . queues -> . celery -> exchange:celery (direct) binding:celery . concurrency -> 1 . loader -> celery.loaders.default.Loader . logfile -> [stderr]@INFO . events -> OFF . beat -> OFF . tasks -> . tasks.Decayer . tasks.Submitter Can someone help?

    Read the article

  • Programmatically swap colors from a loaded bitmap to Red, Green, Blue or Gray, pixel by pixel.

    - by eyeClaxton
    Download source code here: http://www.eyeClaxton.com/download/delphi/ColorSwap.zip I would like to take a original bitmap (light blue) and change the colors (Pixel by Pixel) to the red, green, blue and gray equivalence relation. To get an idea of what I mean, I have include the source code and a screen shot. Any help would be greatly appreciated. If more information is needed, please feel free to ask. If you could take a look at the code below, I have three functions that I'm looking for help on. The functions "RGBToRed, RGBToGreen and RGBToRed" I can't seem to come up with the right formulas. unit MainUnit; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TMainFrm = class(TForm) Panel1: TPanel; Label1: TLabel; Panel2: TPanel; Label2: TLabel; Button1: TButton; BeforeImage1: TImage; AfterImage1: TImage; RadioGroup1: TRadioGroup; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var MainFrm: TMainFrm; implementation {$R *.DFM} function RGBToGray(RGBColor: TColor): TColor; var Gray: Byte; begin Gray := Round( (0.90 * GetRValue(RGBColor)) + (0.88 * GetGValue(RGBColor)) + (0.33 * GetBValue(RGBColor))); Result := RGB(Gray, Gray, Gray); end; function RGBToRed(RGBColor: TColor): TColor; var Red: Byte; begin // Not sure of the algorithm for this color Result := RGB(Red, Red, Red); end; function RGBToGreen(RGBColor: TColor): TColor; var Green: Byte; begin // Not sure of the algorithm for this color Result := RGB(Green, Green, Green); end; function RGBToBlue(RGBColor: TColor): TColor; var Blue: Byte; begin // Not sure of the algorithm for this color Result := RGB(Blue, Blue, Blue); end; procedure TMainFrm.FormCreate(Sender: TObject); begin BeforeImage1.Picture.LoadFromFile('Images\RightCenter.bmp'); end; procedure TMainFrm.Button1Click(Sender: TObject); var Bitmap: TBitmap; I, X: Integer; Color: Integer; begin Bitmap := TBitmap.Create; try Bitmap.LoadFromFile('Images\RightCenter.bmp'); for X := 0 to Bitmap.Height do begin for I := 0 to Bitmap.Width do begin Color := ColorToRGB(Bitmap.Canvas.Pixels[I, X]); case Color of $00000000: ; // Skip any Color Here! else case RadioGroup1.ItemIndex of 0: Bitmap.Canvas.Pixels[I, X] := RGBToBlue(Color); 1: Bitmap.Canvas.Pixels[I, X] := RGBToRed(Color); 2: Bitmap.Canvas.Pixels[I, X] := RGBToGreen(Color); 3: Bitmap.Canvas.Pixels[I, X] := RGBToGray(Color); end; end; end; end; AfterImage1.Picture.Graphic := Bitmap; finally Bitmap.Free; end; end; end. Okay, I apologize for not making it clearer. I'm trying to take a bitmap (blue in color) and swap the blue pixels with another color. Like the shots below.

    Read the article

  • How to properly clean up Excel interop objects in C#

    - by HAdes
    I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause: while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers(); Although, this kind of works the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed. Anyone realize what I am doing wrong, or has an alternative to ensure interop objects are properly disposed of. Thanks.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >