Search Results

Search found 197 results on 8 pages for 'annoyance'.

Page 7/8 | < Previous Page | 3 4 5 6 7 8  | Next Page >

  • Apache reports a 200 status for non-existent WordPress URLs

    - by Jonah Bishop
    The WordPress .htaccess generally has the following rewrite rules: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> When I access a non-existent URL at my website, this rewrite rule gets hit, redirects to index.php, and serves up my custom 404.php template file. The status code that gets sent back to the client is the correct 404, as shown in this HTTP Live Headers output example: http://www.borngeek.com/nothere/ GET /nothere/ HTTP/1.1 Host: www.borngeek.com {...} HTTP/1.1 404 Not Found However, Apache reports the entire exchange with a 200 status code in my server log, as shown here in a log snippet (trimmed for simplicity): {...} "GET /nothere/ HTTP/1.1" 200 2155 "-" {...} This makes some sense to me, seeing as the original request was redirected to page that exists (index.php). Is there a way to force Apache to report the exchange as a 404? My problem is that bogus requests coming from Bad Guys show up as "successful requests" in the various server statistics software I use (AWStats, Analog, etc). I'd love to have them show up on the Apache side as 404s so that they get filtered out from the stat reports that get generated. I tried adding the following line to my .htaccess, but it had no effect (I'm guessing for the same reason as the previous redirect rules): ErrorDocument 404 /index.php?error=404 Does anyone have a clever way to fix this annoyance? Additional Info: OS is Debian 6.0.4, and Apache version looks to be 2.2.22-3 (hosted on DreamHost) The 404 being sent back to the client is being set by WordPress (i.e. I'm not manually calling header() anywhere)

    Read the article

  • Openfire: Granular alerts

    - by R.S.
    Our organization has had an Openfire server up and running for about a year now. So far we have used it for messaging in the I.T. Dept and Alerts to all users. We hit a snag this week when one system went down and several notifications were sent out to inform users of progress. Some of the users were Radiologists that do not use the particular system in question and these users found it more of an annoyance than informative. Since that I have been tasked with finding a more granular system for alerts. I am confident that Openfire can handle this and I have just about settled on a way of getting this to work. My idea is to create a half dozen or so users. For example: Staff, Doctor, Assitant and Supervisor. Using spark as our messenger has worked great so far so I would like to stick with that if possible. With that in mind, under advanced login features the resource name can be changed to something unique and non-unique users can log in under the same account, however, when a message is sent to one of these users, the message delivery is inconsistent. Currently I have 4 users under the Assistant user and it seems only 1 of the users receives the messages. Is this scenario even possible? I am avoiding working with the groups in Openfire because the function is atrocious. I could possibly integrate the system into our Active directory but I don’t think that will get us to a workable solution any quicker or more efficiently.

    Read the article

  • Disable touch pad for mouse button region on new HP pavillion models?

    - by John
    i bought a new hp pavillion dv6 series laptop. the laptop itself is fine but it has the new hp touchpad mouse which i absolutely hate. its such a stupid problem to have with a computer. the left and right mouse buttons are, themselves, part of of the touchpad, meaning that if i tap the buttons without actually pressing them down, it registers the same way as the mouse pad (the cursor moves, tap to click activates, etc.) this is a major annoyance because it prevents you from operating the mouse pad with anything more than a single finger; if for example i use my right hand index finger to move the cursor using the touch pad and rest my left hand index finger on the left mouse button for more efficient mouse-ing, the mouse will react as if im trying to use 2 fingers to move it and it will either just sit there or will spaz out. the only way this works is if i keep the finger that is resting on the mouse button absolutely still, which is very difficult and, therefore, very annoying. also, even if i do abide by the arbitrary new decree of single-finger mousepad operation, i still have a problem because when i press down on the left or right click buttons, the mouse moves slightly, what with the buttons also being part of the touch pad and all. this would not be that hard to avoid except that they decided to also make the buttons much harder to press down. now whenever i go to click something, i press hard on the mouse button, causing my finger to slightly move or roll or flatten out a bit, causing the cursor to move slightly, and causing me to click on something different. what i would like to know is if there is anyway that i can disable the touch pad on the buttons. i have gone through all of the settings under the synaptics menus but i cannot find anything about this. did i miss something in one of the menus? if not, then are there any updated drivers that allow for toggling of this function?

    Read the article

  • Why just splitting an Ethernet cable does not work?

    - by Sin Jeong-hun
    I thought the Ethernet is logically one-line communication bus (for argument's sake, I am excluding hubs). All machines attached in the bus hears the same signals and the machines themselves try to avoid collisions by randomly backing off. http://computer.howstuffworks.com/ethernet6.htm If so, why splitting one Ethernet line from my home router into two and connecting two computers would not work? Why do I have to add a switch to it? *What the Internet said would not work. [4 port home router] ------[one Ethernet cable]-----[simple splitter]======[two computers] *What the Internet said I should do [4 port home router] ------[one Ethernet cable]-----[switch]======[two computers] Is this because of the signal degradation (reduced electric current)? Thank you for all the answers! The reason why I did not just use the two ports of my home router is... The 4-port gigabit router is in my room and I had put a computer in another room (also my room, though). Since wired network is far more reliable and secure, I had bought a long Ethernet cable and and connected the computer to the router. Now I was thinking about adding another computer to that room. I could buy another long Ethernet cable, but then there will be two cables between the rooms. The one line already is a minor annoyance, so I thought if I could share the one line between the two computers in that room. A switch would work, but it requires power and is a little bit pricey. That is why I wondered why it would not work to simply split the physical Ethernet cable. Apparently I do not completely understand how Ethernet and a switch work. I just have some bit of knowledge I heard in my college class.

    Read the article

  • Windows 7 mouse multi selection on windows explorer with CTRL and point to select / single click to open

    - by bortao
    This is something that have annoyed me since i changed to Windows 7. I don't do double click for a long time now since windows introduced 1 click selection (Folder Options Click items as follows Single click to open an item). The problem is, when i click Control and hover over the items, they select/deselect automatically every small amount of mouse movement i make. What i want is to select/deselect the items only when i enter/exit them. So to deselect an item im hovering, i have to move the mouse out of it, and then back in. I'm using Intellimouse Explorer official drivers. (edit) Here's another related annoyance: When you are hovering something and move the mouse inside other item (Holding Ctrl) The new item may or may not be selected. If you continue moving the mouse it gets selected/deselected as you move. (more edit) I have found that the parameter HKCU\Control Panel\Mouse\MouseHoverHeight / MouseHoverWidth have some influence here. If it's set to 2, the item select/deselect really quickly as you move the mouse. When set to larger numbers, its slower. But setting to 20 or 200 don't seem to be much different.

    Read the article

  • Silverlight Cream for March 06, 2011 -- #1054

    - by Dave Campbell
    In this Back from the Summit Issue, I am overloaded with posts to choose from. Submittals go first, but I'll eventually catch up... hopefully by MIX :) : Ollie Riches(-2-), Colin Eberhardt, John Papa, Jeremy Likness, Martin Krüger, Joost van Schaik, Karl Shifflett, Michael Crump, Georgi Stoyanov, Yochay Kiriaty, Page Brooks, and Deborah Kurata. Above the Fold: Silverlight: "ClassifiedCabinet: A Quick Start" Georgi Stoyanov WP7: "Easy access to WMAppManifest.xml App properties like version and title" Joost van Schaik Multiple: "Flashcards.Show Version 2 for the Desktop, Browser, and Windows Phone" Yochay Kiriaty Shoutouts: Mohamed Mosallem delivered an online session at the Second Riyadh Online Community Summit: Silverlight 4.0 with SharePoint 2010 John-Daniel Trask posted about a release of a new set of tools released for WP7 development... there's a free trial, so definitely worth a look: Mindscape Phone Elements released! From SilverlightCream.com: WP7Contrib: Trickling data to a bound collection Ollie Riches submitted a couple links... first up is this on a way they found to decrease the load on a data template in WP7 to get under the 90 mb limit and then added their solution to the WP7Contrib lib. WP7Contrib: Why we use SilverlightSerializer instead of DataContractSerializer Ollie Riches' next submittal compares the performance of the SilverlightSerializer & DataContractSerializer on the WP7 platform. MVVM Charting – Binding Multiple Series to a Visiblox Chart Colin Eberhardt sent me this post where he describes binding multiple series to a chart with no code-behind... great long multi-phase tutorial all with source. Silverlight TV 64: Dive into 64bit Support, App Model and Security John Papa has Nick Kramer of the Silverlight team up for his latest Silverlight TV episode, discussing some cool new Silverlight stuff: 64-bit support, multiple windows, etc. Building a Windows Phone 7 Application with UltraLight.mvvm Jeremy Likness has a pre-summit tutorial up on his UltraLight.mvvm project, and how he would use it to build a WP7 app... great to meet you, Jeremy! How to: Storyboard only start with the conspicuousness of the application in the browser window Martin Krüger continues his Storyboard startup solutions with this one about what to do if the Silverlight app is small or simply an island on an html page. Easy access to WMAppManifest.xml App properties like version and title Joost van Schaik posted about the WP7 manifest file and how you can get access to that information at runtime... why you ask? How about version number or title? Be sure to read the helpful hints in the last paragraph too! Mole 2010 Released Karl Shifflett, Josh Smith, and others have released the latest version of Mole... well worth the money in my opinion, if only it worked for Silverlight! (not their fault) Changing the Default Windows Phone 7 Deployment Target In Visual Studio 2010 Michael Crump points out an annoyance with the 2011 WP7 tools update... VS2010 defaults to the device rather than the emulator... and he shows us how to get it pointed back to the emulator! ClassifiedCabinet: A Quick Start Georgi Stoyanov posted a QuickStart to a 'ClassifiedCabinet' control posted on CodePlex... check out the demo first, you'll want to read the article after that. He builds a simple project from scratch using the control. Flashcards.Show Version 2 for the Desktop, Browser, and Windows Phone Yochay Kiriaty has a post up about FlashCards.Show version 2 that he worked on with Arik Poznanski and has it now running on the desktop, browser, and WP7, plus you get the source... I've been wanting to write just such an app for WP7, so hey... this saves me some time! A Simple Focus Manager for Jounce Applications Page Brooks has a post up about Jeremy Likness' Jounce... how to set focus to a particular control when a view loads. Silverlight Charting: Formatting the Axis Deborah Kurata is continuing her charting series with this one on setting axis font color and putting the text at an angle... really dresses up the chart! Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • 24 Hours of PASS: Whine, Whine, Whine

    - by Most Valuable Yak (Rob Volk)
    24 Hours of Pass (or 24HOP) is a great program offered by PASS to provide free, online training for anyone who wants to learn more about SQL Server.  They routinely have the best SQL Server presenters available for these sessions, and attract hundreds, perhaps even a thousand attendees from around the world.  This is definitely one of the best things they've started doing in the past few years, and every session I've attended has been excellent. So why am I so grumpy about it? I'm not really, pretty much everything here is a minor annoyance that I can deal with.  However since they're so minor they seem to be things that can be easily corrected and would make the process much better. First off, this is my biggest gripe, the registration page: https://www323.livemeeting.com/lrs/8000181573/Registration.aspx?pageName=lj6378f4fhf5hpdm What grinds my gears about this?  I have to scroll alllllllllllllllllllllllllllll the way to bottom to actually register for the sessions.  This wouldn't be so bad except all the details of the session, including the presenter, is in a separate list at the top.  Both lists contain info the other does not, and scrolling between them to determine "Should I make time to listen to this?  Who is speaking at this time anyway?" is really unnecessary. My preference would be to keep the top list and add the checkboxes and schedule info in separate columns.  This is a full-width design, so there's plenty of space for this data, which is pretty small anyway.  The other huge benefit is halving the size of the page, which improves performance and lowers bandwidth usage considerably.  And if you know HTML/ASP.Net, and you view the page source, you can find PLENTY of other things that can be reduced even further.  (not just viewstate) One nice thing that PASS does is send iCal reminders to your email address so you can accept them to your calendar.  Again, they leave off the presenter in the appointment details, while still duplicating the meeting title in the body.  Sometimes I make decisions based on speaker rather than content (Natalie Portman is reading the Yellow Pages??? I'M THERE!) and having the speaker in the iCal is helpful. Next minor annoyances are the necessity for providing a company name, and the survey questions.  I know PASS needs to market themselves effectively, and they need information to do that, and since this is a free event it's really not worth complaining about, but why ask the survey question twice? (once at registration, once again when joining the LiveMeeting)  Same thing for the company name.  All of this should be tied to email address, so that's all I should need to enter when joining the LiveMeeting. The last one is also minor, but it irks me in this day and age of multiple browsers and the decline of Internet Explorer as a dominant platform.  The registration page was originally created in Visual Studio 2003, and has a lot of IE-specific crud representative of the browser situation of 2003. (IE5 references? really? and is the aforementioned viewstate big enough?)  This causes some grief with other browsers like Firefox, Chrome, and sometimes IE8 or 9.  And don't get me started on using the page on a Mac or in Safari. My main point is that PASS is an international organization, welcoming everyone from all levels of SQL Server proficiency, and in that spirit I think it would help to accommodate a wider range of browser software, especially since the registration page is extremely simple.  I recognize that this page is not hosted on the PASS website and may be maintained by some division of Microsoft, but to me that's even worse if MS can't update their own pages.  They've deprecated IE6, so they don't need to maintain support on their own websites anymore. OK, I'll shut up now. #sqlpass #24HOP

    Read the article

  • DataContractSerializer: type is not serializable because it is not public?

    - by Michael B. McLaughlin
    I recently ran into an odd and annoying error when working with the DataContractSerializer class for a WP7 project. I thought I’d share it to save others who might encounter it the same annoyance I had. So I had an instance of  ObservableCollection<T> that I was trying to serialize (with T being a class I wrote for the project) and whenever it would hit the code to save it, it would give me: The data contract type 'ProjectName.MyMagicItemsClass' is not serializable because it is not public. Making the type public will fix this error. Alternatively, you can make it internal, and use the InternalsVisibleToAttribute attribute on your assembly in order to enable serialization of internal members - see documentation for more details. Be aware that doing so has certain security implications. This, of course, was malarkey. I was trying to write an instance of MyAwesomeClass that looked like this: [DataContract] public class MyAwesomeClass { [DataMember] public ObservableCollection<MyMagicItemsClass> GreatItems { get; set; }   [DataMember] public ObservableCollection<MyMagicItemsClass> SuperbItems { get; set; }     public MyAwesomeClass { GreatItems = new ObservableCollection<MyMagicItemsClass>(); SuperbItems = new ObservableCollection<MyMagicItemsClass>(); } }   That’s all well and fine. And MyMagicItemsClass was also public with a parameterless public constructor. It too had DataContractAttribute applied to it and it had DataMemberAttribute applied to all the properties and fields I wanted to serialize. Everything should be cool, but it’s not because I keep getting that “not public” exception. I could tell you about all the things I tried (generating a List<T> on the fly to make sure it wasn’t ObservableCollection<T>, trying to serialize the the Collections directly, moving it all to a separate library project, etc.), but I want to keep this short. In the end, I remembered my the “Debug->Exceptions…” VS menu option that brings up the list of exception-related circumstances under which the Visual Studio debugger will break. I checked the “Thrown” checkbox for “Common Language Runtime Exceptions”, started the project under the debugger, and voilà: the true problem revealed itself. Some of my properties had fairly elaborate setters whose logic I wanted to ignore. So for some of them, I applied an IgnoreDataMember attribute to them and applied the DataMember attribute to the underlying fields instead. All of which, in line with good programming practices, were private. Well, it just so happens that WP7 apps run in a “partial trust” environment and outside of “full trust”-land, DataContractSerializer refuses to serialize or deserialize non-public members. Of course that exception was swallowed up internally by .NET so all I ever saw was that bizarre message about things that I knew for certain were public being “not public”. I changed all the private fields I was serializing to public and everything worked just fine. In hindsight it all makes perfect sense. The serializer uses reflection to build up its graph of the object in order to write it out. In partial trust, you don’t want people using reflection to get at non-public members of an object since there are potential security problems with allowing that (you could break out of the sandbox pretty quickly by reflecting and calling the appropriate methods and cause some havoc by reflecting and setting the appropriate fields in certain circumstances. The fact that you cannot reflect your own assembly seems a bit heavy-handed, but then again I’m not a compiler writer or a framework designer and I have no idea what sorts of difficulties would go into allowing that from a compilation standpoint or what sorts of security problems allowing that could present (if any). So, lesson learned. If you get an incomprehensible exception message, turn on break on all thrown exceptions and try running it again (it might take a couple of tries, depending) and see what pops out. Chances are you’ll find the buried exception that actually explains what was going on. And if you’re getting a weird exception when trying to use DataContractSerializer complaining about public types not being public, chances are you’re trying to serialize a private or protected field/property.

    Read the article

  • ICollectionView.SortDescriptions sort does not work if underlying DataTable has zero rows

    - by BigBlondeViking
    We have a WPF app that has a DataGrid inside a ListView. private DataTable table_; We do a bunch or dynamic column generation ( depending on the report we are showing ) We then do the a query and fill the DataTable row by row, this query may or may not have data.( not the problem, an empty grid is expected ) We set the ListView's ItemsSource to the DefaultView of the DataTable. lv.ItemsSource = table_.DefaultView; We then (looking at the user's pass usage of the app, set the sort on the column) Sort Method below: private void Sort(string sortBy, ListSortDirection direction) { ICollectionView dataView = CollectionViewSource.GetDefaultView(lv.ItemsSource); dataView.SortDescriptions.Clear(); var sd = new SortDescription(sortBy, direction); dataView.SortDescriptions.Add(sd); dataView.Refresh(); } In the Zero DataTable rows scenario, the sort does not "hold"? and if we dynamically add rows they will not be in sorted order. If the DataTable has at-least 1 row when the sort is applied, and we dynamically add rows to the DataTable, the rows com in sorted correctly. I have built a standalone app that replicate this... It is an annoyance and I can add a check to see if the DataTable was empty, and re-apply the sort... Anyone know whats going on here, and am I doing something wrong? FYI: What we based this off if comes from the MSDN as well: http://msdn.microsoft.com/en-us/library/ms745786.aspx

    Read the article

  • Sysdeo Tomcat DevLoader - Hot deploy of java class causes whole application to restart

    - by Gala101
    Hi, I am using sysdeo tomcat plugin 3.2.1 with eclipse 3.5.1 (Galileo) and tomcat 5.5.23 on windows XP. I can get tomcat plugin working in eclipse, and have extracted devloader.zip into [tomcat]\server\classes. I have also updated the context and now it has this entry: <Context path="/myapp1" reloadable="true" docBase="F:\Work\eclipse_workspace\myapp1" workDir="F:\Work\eclipse_workspace\myapp1\work" > <Logger className="org.apache.catalina.logger.SystemOutLogger" verbosity="4" timestamp="true"/> <Loader className="org.apache.catalina.loader.DevLoader" reloadable="true" debug="1" useSystemClassLoaderAsParent="false" /> </Context> I have activated devloader (in Project Properties Tomcat Devloader Classpath) and have 'checked' all my classes and jars, I haven't 'checked' commons-loggin.jar jsp-api.jar, servlet-api.jar. So on launching tomcat via the plugin, I can get it running with devloader as shown in eclipse console view [DevLoader] Starting DevLoader [DevLoader] projectdir=F:\Work\eclipse_workspace\myapp1 [DevLoader] added file:/F:/Work/eclipse_workspace/myapp1/WEB-INF/classes/ [DevLoader] added file:/F:/Work/eclipse_workspace/myapp1/WEB-INF/lib/activation.jar However, if I even add a single System.out.println into any java file and save it, the whole application gets reloaded (takes ~80 sec) which is as good as stopping/starting tomcat itself. I've tried adding -Xdebug in JAVA_OPTS in the catalina.bat but no luck :( Can you please guide where I may be doing it wrong.. Please note that I can 'redeploy' the whole application on tomcat but that's not what I need, I am looking to be able to make small changes in java classes 'on-the-fly' while coding/debugging without having to wait for complete app restart. Another annoyance is that restarting tomcat/application causes the session/debug progress to be lost.. Can you please guide me how to go about it. PS: I am not using any ant/maven scripts explicitly, just relying on eclipse to do the build for me (which it does).

    Read the article

  • SQL Server 2008 - Editing Tables: Bit columns require 'True' or 'False'

    - by CJM
    Not so much a question as an observation... I'm just upgrading to SQL Server 2008 on my development machine in anticipation of upgrading my live applications. I didn't anticipate any problems since [I think] I generally use standard T-SQL, and probably not too far from ANSI standard SQL. So far so good, but I was really thrown by a very simple change: I was creating a simple, small look-up table to store a list of codes and including a bit column to indicate the current default code. But when I used the new/modified 'Edit Top 200 Rows' option, and entered my 0s and 1s in the the bit column I got an error: 'Invalid value for cell - String was not recognised as a valid boolean' After a bit of head-scratching, I tried True and False - and they worked. So it seems this new Edit feature requires 4 or 5 characters to be typed, rather than the previous 1. Checking further, we can still use '...where bitval = 1' but can now also use '...where bitval = 'true''. But any results returned render these bit columns as 0 or 1 still. It all sounds like half a step backwards. Not the end of the world, but and unnecessary annoyance. Does anybody have any insight on this issue? Or there any other new Gotchas with SQL Server 2008?

    Read the article

  • Connecting to a network drive programmatically and caching credentials

    - by Chris Doggett
    I'm finally set up to be able to work from home via VPN (using Shrew as a client), and I only have one annoyance. We use some batch files to upload config files to a network drive. Works fine from work, and from my team lead's laptop, but both of those machines are on the domain. My home system is not, and won't be, so when I run the batch file, I get a ton of "invalid drive" errors because I'm not a domain user. The solution I've found so far is to make a batch file with the following: explorer \\MACHINE1 explorer \\MACHINE2 explorer \\MACHINE3 Then manually login to each machine using my domain credentials as they pop up. Unfortunately, there are around 10 machines I may need to use, and it's a pain to keep entering the password if I missed one that a batch file requires. I'm looking into using the answer to this question to make a little C# app that'll take the login info once and login programmatically. Will the authentication be shared automatically with Explorer, or is there anything special I need to do? If it does work, how long are the credentials cached? Is there an app that does something like this automatically? Unfortunately, domain authentication via the VPN isn't an option, according to our admin. EDIT: If there's a way to pass login info to Explorer via the command line, that would be even easier using Ruby and highline.

    Read the article

  • Properly changing Ajax MultiHandle Slider parameters on postbacks

    - by Matthew PK
    Hi all, In VS2010 I have VB.NET codebehind aspx pages and I'm using Ajax multihandleslider extensions to filter search results on numerical values. Fistly, the multihandle sliders don't display in the designer... I have to remove the slider targets tag: In order to make it display in the designer... this isn't so much a big issue but an annoyance. I am displaying items in a given category. So I get the max and min prices for all items in that category and assign the sliderextension max/min values appropriately. This works fine until... I change the item category and go get a new max/min value for the slider control. I set the max/min values, then I set the target textbox values each to the corresponding max/min values. The slider handles don't repaint (or init?) properly Like say for example my initial min/max is 1/100 if I do a full postback and change the max value to 1000 then the slider bar (correctly) stays the same size but the handle appears WAYYYY to the right off the page and I have to scroll to it. When I click it, it shoots back onto the slider bar. I'm pulling my hair out... why do the slider handles only appear properly when I first set the min/max values?

    Read the article

  • Django: Named URLs / Same Template, Different Named URL

    - by TheLizardKing
    I have a webapp that lists all of my artists, albums and songs when the appropriate link is clicked. I make extensive use of generic views (object_list/detail) and named urls but I am coming across an annoyance. I have three templates that pretty much output the exact same html that look just like this: {% extends "base.html" %} {% block content %} <div id="content"> <ul id="starts-with"> {% for starts_with in starts_with_list %} <li><a href="{% url song_list_x starts_with %}">{{ starts_with|upper }}</a></li> {% endfor %} </ul> <ul> {% for song in songs_list %} <li>{{ song.title }}</li> {% endfor %} </ul> </div> {% endblock content %} My artist and album template look pretty much the same and I'd like to combine the three template's into one. The fact that my variables start with song can easily be changed to the default obj. It's my <ul id="starts-with"> named url I don't know how to correct. Obviously I want it to link to a specific album/artist/song using the named urls in my urls.py but I don't know how to make it context aware. Any suggestions? urlpatterns = patterns('tlkmusic.apps.tlkmusic_base.views', # (r'^$', index), url(r'^artists/$', artist_list, name='artist_list'), url(r'^artists/(?P<starts_with>\w)/$', artist_list, name='artist_list_x'), url(r'^artist/(?P<artist_id>\d+)/$', artist_detail, name='artist_detail'), url(r'^albums/$', album_list, name='album_list'), url(r'^albums/(?P<starts_with>\w)/$', album_list, name='album_list_x'), url(r'^songs/$', song_list, name='song_list'), url(r'^songs/(?P<starts_with>\w)/$', song_list, name='song_list_x'), )

    Read the article

  • Sort on DataView does not work if DataTable has zero rows

    - by BigBlondeViking
    We have a WPF app that has a DataGrid insode a ListView. private DataTable table_; We do a bunch or dynamic column generation ( depending on the report we are showing ) We then do the a query and fill the DataTable row by row, this query may or may not have data.( not the problem, an empty grid is expected ) We set the ListView's ItemsSource to the DefaultView of the DataTable. lv.ItemsSource = table_.DefaultView; We then (looking at the user's pass usage of the app, set the sort on the column) Sort Method below: private void Sort(string sortBy, ListSortDirection direction) { var dataView = CollectionViewSource.GetDefaultView(lv.ItemsSource); dataView.SortDescriptions.Clear(); var sd = new SortDescription(sortBy, direction); dataView.SortDescriptions.Add(sd); dataView.Refresh(); } In the Zero DataTable rows scenario, the sort does not "hold"? and if we dynamically add rows they will not be in sorted order. If the DataTable has at-least 1 row when the sort is applied, and we dynamically add rows to the DataTable, the rows com in sorted correctly. I have built a standalone app that replicate this... It is an annoyance and I can add a check to see if the DataTable was empty, and re-sort... Anyone know whats going on here, and am I doing something wrong? FYI: What we based this off if comes from the MSDN as well: http://msdn.microsoft.com/en-us/library/ms745786.aspx

    Read the article

  • How to save highlighting to a database

    - by vman
    Hi I am trying to highlight a part of the text on my website. This highlighted text will be saved for the specific user in a database and when the document is opened again it will show the previously highlighted text. I assumed I would be using javascript to highlight the text but I cannot seem to find a way to pinpoint where the word is that I am highlighting. function getSelText() { var txt = ''; if (window.getSelection) { txt = window.getSelection(); } else if (document.getSelection) { txt = document.getSelection(); } else if (document.selection) { txt = document.selection.createRange().text; } else return ""; return txt; } I am using that to get the selection but I cannot figure out where the selection is in the text. The biggest annoyance is when I have duplicates within the line or text so if I were to use search then I would find the first instance and not the one I was looking for. So the question is : How do you pinpoint a word or a selection in the entire document?

    Read the article

  • Selecting data in clustered index order without ORDER BY

    - by kcrumley
    I know there is no guarantee without an ORDER BY clause, but are there any techniques to tune SQL Server tables so they're more likely to return rows in clustered index order, without having to specify ORDER BY every single time I want to run a super-quick ad hoc query? For example, would rebuilding my clustered index or updating statistics help? I'm aware that I can't count on a query like: select * from AuditLog where UserId = 992 to return records in the order of the clustered index, so I would never build code into an application based on this assumption. But for simple ad hoc queries, on almost all of my tables, the data consistently comes out in clustered index order, and I've gotten used to being able to expect the most recent results to be at the bottom. Out of all the many tables we use, I've only noticed two ever giving me results in an unpredicted order. This is really just an annoyance, but it would be nice to be able to minimize it. In case this is relevant because of page boundary issues or something like that, I should mention that one of the tables that has inconsistent ordering, the AuditLog table, is the longest table we have that has a clustered index on an identity column. Also, this database has recently been moved from SQL 2005 to SQL 2008, and we've seen no noticeable change in this behavior.

    Read the article

  • How can I prevent the "... has stopped working" window on my Server 2008 R2 dev box?

    - by serialhobbyist
    I'm using a Windows Server 2008 x64 R2 machine as a development box. Amongst many other things I've got Visual Studio 2008 SP1 installed on it. When I'm working on a project, I sometimes need to use Debug Start without Debugging (Ctrl + F5). If the program throws an exception, I get a new R2-style window appear. I'm pretty sure I didn't see this on my XP box - this is the first time I've developed directly on a server. Is there any way to avoid this - it's really beginning to bug me? E.g. my current project is accessing a WCF service - I'm using Ctrl+F5 to start a console program client. I run it and get the window. The title is the name of the project I've just started and it contains: [insert-project-name-here] has stopped working Windows can check online for a solution to the problem. --> Check online for a solution and close the program --> Close the program --> Debug the program V View problem details. Clicking on "Close the program" will actually close the window and the exception message appears in the console, which is what I want (but without the extra window-faffing). How can I avoid this annoyance?

    Read the article

  • .NET MVC: How to fix Visual Studio's lack of awareness of CSS classes in partial views?

    - by Mega Matt
    Hi all, This has been sort of an annoyance for me for a while. I make pretty heavy use of partial views in MVC, and am using Visual Studio 2008 to develop. The problem is that when I give html elements a class in a partial view (<div class="someClass">), it will underline them in green like it doesn't know what they are. I realize this is because I'm in a partial view, and haven't put link tags anywhere in that file for it to know where the CSS is (the link tags are in the main view that renders the partial view). The CSS still works fine on my site because the browser will render all views as one long html page anyway, but it's really annoying to look through my partial views and see all of my classes underlined in green. Is there a way that I can still tell Visual Studio that those classes exist somewhere, from the partial view? I figured there has to be a way to let it know, but am not sure what it is. Maybe a way to import the stylesheets from the parent view? Thanks for your help.

    Read the article

  • iOS Switching an embedded view in storyboard

    - by Coyote6
    I have been trying to figure this out all day and I know it should be able to be done, but being new to iOS development using Objective-C and not Appcelerator I'm having newbie issues. What I am trying to accomplish is to have an embedded view in one of my other views, but to be able to switch which view is embedded through programming. I am using storyboards. When I tried to use the view container it displays the attached view, but I cannot attach multiple views to the container in the storyboard. I drew up an image, but to my annoyance I cannot post an image on here because I don't have enough "rep" points, so I posted it on my site: http://static.c6gx.com/images/iphone-embedded-views-diagram.jpg Later on I would like what appears to be a push segue, within that view container, but first I just want to be able to switch between embedded view 1, 2, 3, etc. Am I supposed to be using a view container to accomplish this, or some other type of controller? Then how would I call the transition to change the view? Thank you for any help you can provide.

    Read the article

  • Stop Visual Studio from appending numbers to the end of new controls

    - by techturtle
    I am wondering if there is any way to stop Visual Studio 2010 from appending a number to the end of the ID on new controls I create. For example, when I add a new TextBox, I would prefer that it do this: <asp:TextBox ID="TextBox" runat="server"> <asp:TextBox ID="TextBox" runat="server"> <asp:TextBox ID="TextBox" runat="server"> Instead of this: <asp:TextBox ID="TextBox1" runat="server"> <asp:TextBox ID="TextBox2" runat="server"> <asp:TextBox ID="TextBox3" runat="server"> It would make it easier to rename them appropriately, so I don't have to arrow/mouse over and delete the number each time. As I was writing this, the "Questions that may already have your answer" suggested this: How do I prevent Visual Studio from renaming my controls? which admittedly was the biggest part of my annoyance, but that appears to turn off putting in an ID="" field altogether, not just for pasted controls. It would still be helpful to turn off the numbering for new, non-pasted controls and have it not rename pasted ones as well. At the moment I'm working with ASP.NET, but it would be nice if it there was a way to do it for WinForms as well. Before anyone suggests it, I do know that allowing it to append the numbers prevents name conflicts should I not rename them appropriately. However, I would much rather have it fail to compile so I know to fix the issue now (if I forget to name something properly) rather than find random "TextBox1" items lying around in the code later on.

    Read the article

  • Using jQuery with form to eliminate spam

    - by Thierry-Dimitri Roy
    I have put a form on a web page where the user can send us data. Unfortunately, the webmaster does get a lot of spam through this form and the valid submissions gets buried. I have used captcha to bypass this problem. But I think that everyone would agree that captcha is a big annoyance to users. I switched to another solution: now the URL of the submit form points to null: <form id="sendDataForm" action="/null" method="post"> ... </form> And I bypass the form submission using jQuery excellent form plugin: $('#sendDataForm').ajaxForm({ url: '/ajax-data/' }); Since then, no spam has reached the webmaster, and valid comments gets through. The only drawbacks is that users without javascript cannot send us the form. But since this is on top of a javascript web application, we can safely assume that these are not valid users. My question is: in a world where 99% of users has javascript enabled (and a mechanism for those user could be build that uses captcha), why is this solution not more used? What drawback am I not seeing?

    Read the article

  • Python lists/arrays: disable negative indexing wrap-around

    - by wim
    While I find the negative number wraparound (i.e. A[-2] indexing the second-to-last element) extremely useful in many cases, there are often use cases I come across where it is more of an annoyance than helpful, and I find myself wishing for an alternate syntax to use when I would rather disable that particular behaviour. Here is a canned 2D example below, but I have had the same peeve a few times with other data structures and in other numbers of dimensions. import numpy as np A = np.random.randint(0, 2, (5, 10)) def foo(i, j, r=2): '''sum of neighbours within r steps of A[i,j]''' return A[i-r:i+r+1, j-r:j+r+1].sum() In the slice above I would rather that any negative number to the slice would be treated the same as None is, rather than wrapping to the other end of the array. Because of the wrapping, the otherwise nice implementation above gives incorrect results at boundary conditions and requires some sort of patch like: def ugly_foo(i, j, r=2): def thing(n): return None if n < 0 else n return A[thing(i-r):i+r+1, thing(j-r):j+r+1].sum() I have also tried zero-padding the array or list, but it is still inelegant (requires adjusting the lookup locations indices accordingly) and inefficient (requires copying the array). Am I missing some standard trick or elegant solution for slicing like this? I noticed that python and numpy already handle the case where you specify too large a number nicely - that is, if the index is greater than the shape of the array it behaves the same as if it were None.

    Read the article

  • Problem deleting .svn directories on Windows XP

    - by John L
    I don't seem to have this problem on my home laptop with Windows XP, but then I don't do much work there. On my work laptop, with Windows XP, I have a problem deleting directories when it has directories that contain .svn directories. When it does eventually work, I have the same issue emptying the Recycle bin. The pop-up window says "Cannot remove folder text-base: The directory is not empty" or prop-base or other folder under .svn This continued to happen after I changed config of TortoiseSVN to stop the TSVN cache process from running and after a reboot of the system. Multiple tries will eventually get it done. But it is a huge annoyance because there are other issues I'm trying to fix, so I'm hoping it is related. 'Connected Backup PC' also runs on the laptop and the real problem is that cygwin commands don't always work. So I keep thinking the dot files and dot directories have something to do with both problems and/or the backup or other process scanning the directories is doing it. But I've run out of ideas of what to try or how to identify the problem further.

    Read the article

  • Looking for out-of-place directories in an SVN working copy?

    - by jthg
    An annoyance that I sometimes come across with SVN is the working copy getting corrupted by one of the .svn folders getting moved from its original location. It doesn't happen often if you're careful and use the proper tools for all moves and renames, but it still somehow happens from time to time. First, does anyone know if there's a good way to catch the problem before a commit is even done? Cruise control usually catches the problem, but there are plenty of cases it wouldn't catch. Second, is there a quick and easy way to check for out-of-place .svn folder if I suspect that there is one? I can definitely do it manually by deducing what directory is out of place based on the compiler errors or by diffing the working copy with another clean checkout. But, this seems like a problem that SVN can diagnose in a second by giving me a list of all directories whose parent directory in the working copy doesn't match its parent directory in the repository. There there some way to have SVN give me a list like that? Thanks.

    Read the article

< Previous Page | 3 4 5 6 7 8  | Next Page >