Daily Archives

Articles indexed Thursday March 25 2010

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

  • How can the font size be changed in Notepad++?

    - by Peter Mortensen
    How can the font size be changed in Notepad++? I just downloaded and installed Notepad++ v5.4.5 (I have been using UltraEdit for the last 11.5 years) and can not find a menu command for changing the screen font. I want to change it to Lucida Console 18pt. Other notes: to download Notepad++ go directly to the SourceForce download page for Notepad++.

    Read the article

  • What is a Long Tail Keyword?

    Did you know that a long tail keyword will out convert a root keyword 9 times out of 10. In this article, I will discuss the reasons why the long tail is a better keyword to chase than the more common methods of chasing the root.

    Read the article

  • Sync Vs. Async Sockets Performance in .NET

    - by Michael Covelli
    Everything that I read about sockets in .NET says that the asynchronous pattern gives better performance (especially with the new SocketAsyncEventArgs which saves on the allocation). I think this makes sense if we're talking about a server with many client connections where its not possible to allocate one thread per connection. Then I can see the advantage of using the ThreadPool threads and getting async callbacks on them. But in my app, I'm the client and I just need to listen to one server sending market tick data over one tcp connection. Right now, I create a single thread, set the priority to Highest, and call Socket.Receive() with it. My thread blocks on this call and wakes up once new data arrives. If I were to switch this to an async pattern so that I get a callback when there's new data, I see two issues The threadpool threads will have default priority so it seems they will be strictly worse than my own thread which has Highest priority. I'll still have to send everything through a single thread at some point. Say that I get N callbacks at almost the same time on N different threadpool threads notifying me that there's new data. The N byte arrays that they deliver can't be processed on the threadpool threads because there's no guarantee that they represent N unique market data messages because TCP is stream based. I'll have to lock and put the bytes into an array anyway and signal some other thread that can process what's in the array. So I'm not sure what having N threadpool threads is buying me. Am I thinking about this wrong? Is there a reason to use the Async patter in my specific case of one client connected to one server?

    Read the article

  • How do you set the initial value for a ManyToMany field in django?

    - by mlissner
    I am using a ModelForm to create a form, and I have gotten the initial values set for every field in the form except for the one that is a ManyToMany field. I understand that I need to give it a list, but I can't get it to work. My code right now is roughly: contacts = userProfile.contact.all() initial = {'contacts': contacts} But that doesn't work. Am I missing something here?

    Read the article

  • Why not to use Array of errors instead of Exception Handling !?

    - by Naughty.Coder
    Why not using array of errors instead of throwing errors and check if it's not empty later in the code.... Exception handling is very confusing to me , I can not understand it's purpose ... can anybody enlighten me !? they compare it with die() as better not to stop the execution of the code , why would I stop the execution of code if I don't want to !? ofcourse I do I'm a beginner programmer , it might be confusing to you as well , or because i'm not very experienced in this ugly thing. Please in the context of PHP only.

    Read the article

  • How to change to a grouped table view in xcode without using Interface Builder

    - by Dave
    I have a table that I created within xcode so there is no nib file in this case. I want to make my table into the 'Grouped' style but im not sure how. I think it has somthing to do with the method below, the problem is Im not really sure how to call it, I do understand how methods work I'm just not too sure on where to start with this one: - (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)UITableViewStyleGrouped So could someone tell me how to call it? The problem is that its not a method I wrote its a built in one so I could put that line into my header file but how would I use it in my implementation file? Thanks guys,

    Read the article

  • Geographically distributed file system with preferred locality

    - by dpb
    Hi All -- I'm building a application that needs to distribute a standard file server across a few sites over a WAN. Basically, each site needs to write a lot of misc files of varying size (some in the 100s MB range, but most small), and the application is written such that collisions aren't a problem. I'd like to have a system set up that meets the following qualifications: Each site can store files in a shared "namespace". That is, all the files would show up in the same filesystem. Each site would not send data over the WAN unless necessary. I.e., there would be local storage on each side of the WAN that would be "merged" into the same logical filesystem. Linux & Free ($$$) is a must. Basically, something like a central NFS share would meet most of the requirements, however it would not allow the locally written data to stay local. All data from remote sides of the WAN would be copied locally all the time. I have looked into Lustre, and have run some successful tests with it, however, it appears to distribute files fairly uniformly across the distributed storage. I have dug through the documentation and have not found anything that automatically will "prefer" local storage over remote storage. Even something that went with the lowest latency storage would be fine. It would work most of the time, which would meet this application's requirements. Any ideas?

    Read the article

  • server shrinks html file to 0bytes on upload

    - by user38714
    Hi there, I have come across a very unusual problem. I am working on a website at the moment and whenever I upload a file to the server, it becomes a 0kb file. I have changed ftp software to filezilla to see would this help and it hasn't. I have compared it to other sites I am working on the permissions are the same numbers 0644 but on the site that I am having the trouble with the permissions have the prefix- flcdmpe(0644). Would this be the problem and if so any ideas how to change it?, changing the permissions doesn't work. I have been onto the host company and they cannot figure it out at all. Any help would be appreciated. Cheers Emma

    Read the article

  • FireFox/NoScript: why has the NoScript icon disappeared?

    - by Peter Mortensen
    Why has the appearence of NoScript changed? Using Noscript in FireFox (Microsoft Windows): Until now there has been an icon (the S icon) in the lower right of the screen. But now there is an button instead with the text "Options". Left clicking this button seems to bring up the menu as right clicking the old icon. Can I restore the previous state? Is there an auto-update function in NoScript and if so could it have caused the change? If it exists can the auto-update function be disabled? Platform: FireFox 3.0.6, NoScript 1.9.0.6, Windows XP 64 bit, 8 GB RAM.

    Read the article

  • How to customize the Visual Studio 2010 RC StartPage recent projects

    - by devlife
    I'd like to play around with customizing the visual studio 2010 rc start page recent items. For what I have in mind I'd need to customize the datasource / databinding but I can't find where the information is coming from. <ScrollViewer Grid.Row="1" HorizontalAlignment="Stretch" Style="{DynamicResource StartPage.ScrollViewerStyle}" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto"> <sp:MruListBox DataContext="{Binding Path=RecentProjects}" ItemsSource="{Binding Path=Items}" Background="Transparent" BorderThickness="0" AutomationProperties.AutomationId="MruList"/> </ScrollViewer> Can anyone point me in the right direction? I see that it is binding to RecentProjects but where is that coming from?

    Read the article

  • PropertyGrid PaintValue problem: How to remove (and paint outside) the standard rectangle?

    - by Pedery
    This might be a straightforward question, even though I haven't found an easy solution to it: I've implemented my custom UITypeEditor with the sole purpose of adding a PaintValue to bools. For the sake of the discussion, let's assume that PaintValue will either paint a checked or unchecked radiobutton. Question 1: Now, here's the problem: It seems like PaintValue automatically inserts a 20x13px rectangle after all paint code has completed. Naturally, a radiobutton inside a black rectangle is ugly. Can I easily instruct or override this rectagle not to be painted? Question 2: In this respect, is it possible to paint on top of the propertygrid's native look - meaning could I paint something in order to obscure (part of) the black line separating two grid cells vertically? The purpose of doing this would be to indicate that two values were linked, like constrained width/height to an aspect ratio.

    Read the article

  • Robust and fast checksum algorithm?

    - by bene
    Which checksum algorithm can you recommend in the following use case? I want to generate checksums of small JPEG files (~8 kB each) to check if the content changed. Using the filesystem's date modified is unfortunately not an option. The checksum need not be cryptographically strong but it should robustly indicate changes of any size. The second criterion is speed since it should be possible to process at least hundreds of images per second (on a modern CPU). The calculation will be done on a server with several clients. The clients send the images over Gigabit TCP to the server. So there's no disk I/O as bottleneck.

    Read the article

  • How to I get rid of these double quotes?

    - by Danger Angell
    I'm using ym4r to render a Google Map. Relevant portion of Controller code: @event.checkpoints.each do |checkpoint| unless checkpoint.lat.blank? current_checkpoint = GMarker.new([checkpoint.lat, checkpoint.long], :title => checkpoint.name, :info_window => checkpoint.name, :icon => checkpoint.discipline.icon, :draggable => false ) @map.overlay_init(current_checkpoint) end It's this line that is hanging me up: :icon => checkpoint.discipline.icon, Using this to render the map in the view: <%= @map.to_html %> <%= @map.div(:width => 735, :height => 450, :position => 'relative') %> The javascript that is puking looks like this: icon : "mtn_biking" and I need it looking like this: icon : mtn_biking This is the HTML generated: <script type="text/javascript"> var mtn_bike = addOptionsToIcon(new GIcon(),{image : "/images/map/mtn_bike.png",iconSize : new GSize(32,32),iconAnchor : new GPoint(16,32),infoWindowAnchor : new GPoint(16,0)});var map; window.onload = addCodeToFunction(window.onload,function() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(37.7,-97.3),4);map.addOverlay(addInfoWindowToMarker(new GMarker(new GLatLng(34.9,-82.22),{icon : "mtn_bike",draggable : false,title : "CP1"}),"CP1",{})); map.addOverlay(addInfoWindowToMarker(new GMarker(new GLatLng(35.9,-83.22),{icon : "flat_water",draggable : false,title : "CP2"}),"CP2",{})); map.addOverlay(addInfoWindowToMarker(new GMarker(new GLatLng(36.9,-84.22),{icon : "white_water",draggable : false,title : "CP3"}),"CP3",{}));map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); } }); </script> the issue is the double quotes in: icon : "mtn_bike" icon : "flat_water" icon : "white_water" I need a way to get rid of those double quotes in the generated HTML

    Read the article

  • Why are .NET app.config load rules different for win2k3?

    - by Dan
    ...and are there any other caveat for other platforms? I create an app.config for a win forms project, for example Application.exe. By default I expect that at runtime my application is going to look for a file called Application.exe.config. But there seem to be exceptions to this, for example in a Windows Server 2003 environment an app will look for Application.config. The full path of the config file being searched for is different in Windows Server 2003, why is this? Where is the definition for these cosmic app.config loading rules?

    Read the article

  • How do you indent *every* line of a <span> element?

    - by George Edison
    I have the following HTML chunk: <span class='instruction_text'> Line 1<br> Line 2 </span> And the CSS declaration of instruction_text is: .instruction_text { margin-left: 70px; font-style: italic; color: #555; } The first line has a 70px margin as expected, but the next line starts with no indent. How can I make ALL of the lines indented?

    Read the article

  • I'm trying to run some PHP scripts as CLI instead of over HTTP. How do I make them play nice?

    - by gnfti
    Hi everyone. I'm using some PHP scripts from FeedForAll to join together RSS feeds (RSSmesh) and display them as HTML (RSS2HTML). Because I intend to run these scripts fairly intensively and don't want the resulting HTTP requests and bandwidth to count towards my hosting quota, I am in the process of moving to running them on the web host's server in an umbrella PHP "batch" script, and call this script via cron (this is a Linux server, by the way). Here's a (working) sample request over HTTP: http://www.mydomain.com/a/rss2htmlcore/rss2html2.php?XMLFILE=http://www.mydomain.com/a/myapp/xmlcache/feed.xml&TEMPLATE=template.html This will produce the desired HTML output. An example of how I want this to work on the command line: /srv/customers/mycustomer#/mydomain.com/www/a/rss2htmlcore/rss2html2-cli.php /srv/customers/mycustomer#/mydomain.com/www/a/myapp/xmlcache/feed.xml /srv/customers/mycustomer#/mydomain.com/www/a/template.html This is with the correct shebang line added to "rss2html2-cli.php". I could just as well specify the executable ("/usr/local/bin/php") in the request, I doubt it makes a difference because I am able to run another script (that I wrote myself) either way without problems. Now, RSS2HTML and RSSmesh are different in that, for starters, they include secondary files -- for example, both include an XML parser script -- and I suspect that this is where I am getting a bit in over my head. Right now I'm calling exec() from the "umbrella" batch script, like so: exec("/srv/customers/mycustomer#/mydomain.com/www/a/rss2htmlcore/rss2html2-cli.php /srv/customers/mycustomer#/mydomain.com/www/a/myapp/xmlcache/feed.xml /srv/customers/mycustomer#/mydomain.com/www/a/template.html", $output) But no output is being produced. What's the best way to go about this and what "gotchas" should I keep in mind? Is exec() the right way to approach this? It works fine for the other (simple) script but that writes its own output. For this I want to get the output and write it to a file from within the umbrella script if possible. I've also tried output buffering but to no avail. Do I need to pay attention to anything specific with regard to the includes? Right now they're specified in the scripts as include_once("FeedForAll_XMLParser.inc.php"); and the specified files are indeed in the same folder. Further info: -This is a Linux server. -I have no direct access to the shell, so I can't test things directly on a command line, everything is via crontab. -I will admit that support for the FeedForAll scripts leaves a lot to be desired, but I'd like to keep using their scripts if at all possible, if only because I know them and have been using them for a while. I have looked into Simplepie, but the FFA scripts do some things that I've seen no obvious solutions for with Simplepie, like limiting the number of items per individual feed (RSSmesh) or limiting the description length (RSS2HTML). -Yahoo! Pipes is out, they cache their data for too long for my application. Should you want to take a look at the code, here are the scripts as txt files. RSS2HTML2 and RSSmesh are the FeedForAll scripts, FeedForAll_XMLParser... is the included parser. Note that I have not yet amended these to handle $argv etc. I have however in "scraper-universal-rss-cli", which works fine with CLI. If anyone has any thoughts to share on this it would be very much appreciated. Thank you in advance.

    Read the article

  • What are some funny error pages websites have?

    - by Dean
    This question is along the same lines as What are some funny loading statements to keep my users amused, I want screenshots of all the coolest "error" pages site's throw up when something's broken. I know pandora.com talks about a panda ravaging it's way through the office, twitter's has the little birds floating around or something, sourceforge had one with some funny robots the other day. I'm sure I saw a blog once that had a bunch of them, but it's kinda hard to google "error pages". Community Wiki, of course :)

    Read the article

  • How do I mock a class property with mox?

    - by Harley
    I have a class: class myclass(object): @property def myproperty(self): return 'hello' Using mox and py.test, how do I mock out myproperty? I've tried: mock.StubOutWithMock(myclass, 'myproperty') myclass.myproperty = 'goodbye' and mock.StubOutWithMock(myclass, 'myproperty') myclass.myproperty.AndReturns('goodbye') but both fail with AttributeError: can't set attribute.

    Read the article

  • Find new messages added to an imap mailbox since I last checked with python libimap2?

    - by vy32
    I am trying to write a program that monitors an IMAP mailbox and automatically copies every new incoming message into an "Archive" folder. I'm using imaplib2 which implements the IDLE command. Here's my basic program: M = imaplib2.IMAP4("mail.me.com") M.login(username,password) lst = M.list() assert lst[0]=='OK' for mbx in lst[1]: print "Mailboxes:",mbx def process(m): print "m=",m res = M.recent() print res M.select('INBOX') M.examine(mailbox='INBOX',callback=process) while True: print "Calling idle..." M.idle() print "back from idle" M.close() M.logout() It prints the mailboxes properly and runs process() when the first change happens to the mailbox. But the response from recent() doesn't make sense to me, and after the first message I never get any other notifications. Anyone know how to do this?

    Read the article

  • JavaScript inline events syntax

    - by Mic
    Is there any reason to use one of the following more than the others: <input type="button" value="b1" onclick="manageClick(this)" /> <input type="button" value="b2" onclick="manageClick(this);" /> <input type="button" value="b2" onclick="manageClick(this);return false;" /> <input type="button" value="b3" onclick="return manageClick(this);" /> <input type="button" value="b4" onclick="javascript:return manageClick(this);" /> And please do not spend your valuable time to tell me to use jQuery or attachEvent/addEventListener. It's not really the objective of my question.

    Read the article

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