Search Results

Search found 11338 results on 454 pages for 'big dave'.

Page 98/454 | < Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >

  • Visual Studio 2008's annoying auto-handling of block comments

    - by Dave
    I read that great post on Visual Studio 2008 annoyances, but didn't see this one. It drives me crazy. Now, I realize that some people use block comments like this for function documentation and the like: /* * * * */ But you know, this is VS2008 and now we can use ///. The only time I ever feel the need to use C-style commenting is when I have some junk or test code that I temporarily want to remove. It absolutely drives me nuts when I do the first /* and then when I add a line after the test code, it automatically puts a space after the * and I end up with this: * / . So then I end up always having to backspace to complete the block comment. I looked through all of the C# editor settings in the VS2008 IDE, and didn't find anything relevant. Does this drive anyone else here crazy, or am I turning into a codemudgeon?

    Read the article

  • Core dump utility for .NET

    - by Dave
    In my past life as a COBOL mainframe developer I made extensive use of a tool called Abendaid which, in the event of an exception, would give me a complete memory dump including a formatted list of every variable in memory as well as a complete stack trace of the program with the offending statement highlighted. This made pinpointing the cause of an error much simpler and saved a lot of step-through debugging and/or trace statements. Now I've made the transition to C# and .NET web development I find that the information provided by ASP.NET only tells half the story, giving me a stack trace, but not any of the variable or class information. This makes debugging more difficult as you then have to run the process again with the debugger to try and reproduce the error, not easy with intermittent errors or with assemblies that run under the likes of SQL Server or CRM. I've looked around quite a lot for something that does this but I can't find anything obvious. Does anyone have any idea if there is one, or if not, what I'd need to start with in order to write one?

    Read the article

  • Optimal two variable linear regression calculation

    - by Dave Jarvis
    Problem Am looking to apply the y = mx + b equation (where m is SLOPE, b is INTERCEPT) to a data set, which is retrieved as shown in the SQL code. The values from the (MySQL) query are: SLOPE = 0.0276653965651912 INTERCEPT = -57.2338357550468 SQL Code SELECT ((sum(t.YEAR) * sum(t.AMOUNT)) - (count(1) * sum(t.YEAR * t.AMOUNT))) / (power(sum(t.YEAR), 2) - count(1) * sum(power(t.YEAR, 2))) as SLOPE, ((sum( t.YEAR ) * sum( t.YEAR * t.AMOUNT )) - (sum( t.AMOUNT ) * sum(power(t.YEAR, 2)))) / (power(sum(t.YEAR), 2) - count(1) * sum(power(t.YEAR, 2))) as INTERCEPT, FROM (SELECT D.AMOUNT, Y.YEAR FROM CITY C, STATION S, YEAR_REF Y, MONTH_REF M, DAILY D WHERE -- For a specific city ... -- C.ID = 8590 AND -- Find all the stations within a 15 unit radius ... -- SQRT( POW( C.LATITUDE - S.LATITUDE, 2 ) + POW( C.LONGITUDE - S.LONGITUDE, 2 ) ) < 15 AND -- Gather all known years for that station ... -- S.STATION_DISTRICT_ID = Y.STATION_DISTRICT_ID AND -- The data before 1900 is shaky; insufficient after 2009. -- Y.YEAR BETWEEN 1900 AND 2009 AND -- Filtered by all known months ... -- M.YEAR_REF_ID = Y.ID AND -- Whittled down by category ... -- M.CATEGORY_ID = '001' AND -- Into the valid daily climate data. -- M.ID = D.MONTH_REF_ID AND D.DAILY_FLAG_ID <> 'M' GROUP BY Y.YEAR ORDER BY Y.YEAR ) t Data The data is visualized here: Question The following results (to calculate the start and end points of the line) appear incorrect. Why are the results off by ~10 degrees (e.g., outliers skewing the data)? (1900 * 0.0276653965651912) + (-57.2338357550468) = -4.66958228 (2009 * 0.0276653965651912) + (-57.2338357550468) = -1.65405406 I would have expected the 1900 result to be around 10 (not -4.67) and the 2009 result to be around 11.50 (not -1.65). Related Sites Least absolute deviations Robust regression Thank you!

    Read the article

  • Entity Framework with File-Based Database

    - by Dave Swersky
    I am in the process of developing a desktop application that needs a database. The application is currently targeted to SQL Express 2005 and works wonderfully. However, I'm not crazy about having this dependency on SQL Express and would prefer to use a small file-based database. My problem is that I am using Entity Framework. I have tried both SQL Compact and SQLite, and they both have bizarre problems with EF v1. I get errors creating the Model, invalid models when it does get created... it's a nightmare. I'm about ready to give up and write a data layer and repository in the good-old-school Connection/Command pattern. Not my favorite plan... Is there a lightweight, file-based database out there that plays well with EF? OR Is there a better ORM tool that I should use instead of EF with my lightweight DB?

    Read the article

  • How active record is automatically setting up the autoincremental value of ID?

    - by piemesons
    Here this is what we are doing:-- an_order = Order.new an_order.name = "Dave Thomas" an_order.email = "[email protected]" an_order.address = "123 Main St" an_order.pay_type = "check" an_order.save Now it will insert a new row in orders table right. I m having a ID column in that table. Now suppose after inserting this record the value of the ID corresponding to this record is 100. Now how this 100 value came to know? Does the previous value of ID ie 99 (Suppose) is stored somewhere in some variable/file in the ORM layer or before inserting this value a query was fired to know about the last inserted value or database is itself doing that or anything else???

    Read the article

  • Optimal two variable linear regression SQL statement

    - by Dave Jarvis
    Problem Am looking to apply the y = mx + b equation (where m is SLOPE, b is INTERCEPT) to a data set, which is retrieved as shown in the SQL code. The values from the (MySQL) query are: SLOPE = 0.0276653965651912 INTERCEPT = -57.2338357550468 SQL Code SELECT ((sum(t.YEAR) * sum(t.AMOUNT)) - (count(1) * sum(t.YEAR * t.AMOUNT))) / (power(sum(t.YEAR), 2) - count(1) * sum(power(t.YEAR, 2))) as SLOPE, ((sum( t.YEAR ) * sum( t.YEAR * t.AMOUNT )) - (sum( t.AMOUNT ) * sum(power(t.YEAR, 2)))) / (power(sum(t.YEAR), 2) - count(1) * sum(power(t.YEAR, 2))) as INTERCEPT FROM (SELECT D.AMOUNT, Y.YEAR FROM CITY C, STATION S, YEAR_REF Y, MONTH_REF M, DAILY D WHERE -- For a specific city ... -- C.ID = 8590 AND -- Find all the stations within a 5 unit radius ... -- SQRT( POW( C.LATITUDE - S.LATITUDE, 2 ) + POW( C.LONGITUDE - S.LONGITUDE, 2 ) ) <15 AND -- Gather all known years for that station ... -- S.STATION_DISTRICT_ID = Y.STATION_DISTRICT_ID AND -- The data before 1900 is shaky; and insufficient after 2009. -- Y.YEAR BETWEEN 1900 AND 2009 AND -- Filtered by all known months ... -- M.YEAR_REF_ID = Y.ID AND -- Whittled down by category ... -- M.CATEGORY_ID = '001' AND -- Into the valid daily climate data. -- M.ID = D.MONTH_REF_ID AND D.DAILY_FLAG_ID <> 'M' GROUP BY Y.YEAR ORDER BY Y.YEAR ) t Data The data is visualized here: Questions How do I return the y value against all rows without repeating the same query to collect and collate the data? That is, how do I "reuse" the list of t values? How would you change the query to eliminate outliers (at an 85% confidence interval)? The following results (to calculate the start and end points of the line) appear incorrect. Why are the results off by ~10 degrees (e.g., outliers skewing the data)? (1900 * 0.0276653965651912) + (-57.2338357550468) = -4.66958228 (2009 * 0.0276653965651912) + (-57.2338357550468) = -1.65405406 I would have expected the 1900 result to be around 10 (not -4.67) and the 2009 result to be around 11.50 (not -1.65). Thank you!

    Read the article

  • Getting MVC default route to go to ~/default.asp

    - by Dave Hanna
    I am adding some MVC features to an existing site (FWIW, most of which is in classic ASP). As a result, I need to keep the default routing going to ~/default.asp (at a minimum - preferably the default document specified in IIS). Is there a way to write the route in RegisterRoutes so that a request for the root of the site (e.g., http://localhost, http://localhost/, or http://localhost/default.asp) will directly get the default page, and not attempt to find a controller/action? Or do I need to write my own HttpModule that will filter it and keep it from getting to the MvcHandler (as in this blog)? BTW, I have googled this, but most of the hits are for MVC version 1 or older, and default routing appears to have changed in version 2 (i.e, there is no more default.aspx that redirects to ~/Home), so they are not directly applicable. Even so, the ones that were there didn't address this problem.

    Read the article

  • Shutting down a windows service that has threads

    - by Dave
    I have a windows service written in .NET 3.5 (c#) with a System.Threading.Timer that spawns several Threads in each callback. These are just normal threads (no Thread Pool) and I've set the IsBackground = true on each thread since I'm only going to be running managed code. When a user stops the service, what happens to all the threads? Do they die gracefully? I don't have any code that manages the threads via calling join or abort. Is it correct to assume the IsBackground = true is enough to assume the threads will be disposed and stopped when a user stops the service? What exactly happens when someone stops a windows service via the Service Manager GUI? Does it kill the process after it fires the OnStop event? This would actually be acceptable for me because I've built a separate mechanism that allows a user know for sure there are no threads before they stop the service. This is done via 2 WCF methods exposed from a ServiceHost that runs inside the Windows Service. There's one method to stop spawning new threads and another method to query how many running threads there are left. I'm just curious what happens if they skip those steps and just stop the service... It seems the IsBackground helps achieve this:

    Read the article

  • Uploading youtube videos through a common account

    - by Dave
    Is it possible to have users of my site upload videos from their home computers onto MY youtube account? What does that involve and can someone point me to some relevant examples. I DONT want to host the videos myself, even temporarily, unless completely unavoidable.These will be short videos though, maybe about a min or two long, not high def, so its not too unimaginable...

    Read the article

  • Get latitude and longitude using map interface

    - by Dave Jarvis
    Problem Allow website users to enter four latitude and longitude coordinates. Proposed Solution Integrate Google Maps API, and add a click event handler, similar to: http://itouchmap.com/latlong.html http://stackoverflow.com/questions/2770421/how-retrieve-latitude-and-longitude-via-google-maps-api http://marcgrabanski.com/article/jquery-google-maps-tutorial-basics The data would populate into a hidden form field. Questions What other ways (besides <input type='text' ... />) outside of Google's API are available to solve the problem? How would you restrict the number of lat/long points the user can choose? Would using those coordinates violate Google's Terms of Service? Thank you!

    Read the article

  • VB - Convert Web Site to Web Application

    - by Dave
    Hi This is my first time doing VB :-) I've inherited a web site, which I've converted into a web application in VS2008. The conversion has worked for everything except a Gallery control. The compile error I'm getting is: Type 'Gallery' is not defined in file: gallery_oct07.aspx.designer.vb Option Strict On Option Explicit On Partial Public Class gallery_oct07 '''<summary> '''Gallery1 control. '''</summary> '''<remarks> '''Auto-generated field. '''To modify move field declaration from designer file to code-behind file. '''</remarks> Protected WithEvents Gallery1 As Global.Gallery End Class with squiggly lines under Global.Gallery. The gallery_oct07.aspx.vb is: Partial Class gallery_oct07 Inherits System.Web.UI.Page End Class Gallery.ascx is: <%@ Control Language="C#" AutoEventWireup="true" Codebehind="Gallery.ascx.cs" Inherits="WebApplication1.Gallery"%> <asp:Repeater runat="server" ID="rptGallery"> <HeaderTemplate> <ul class='<%#CssClass%>'> </HeaderTemplate> <ItemTemplate> <li><a href='<%#ImageFolder + Eval("Name") %>' class="thickbox" rel="gallery"><img src='<%#ImageFolder + "thumb/" + Eval("Name") %>' /></a></li> </ItemTemplate> <FooterTemplate> </ul></FooterTemplate> </asp:Repeater> and the code behind is: using System; using System.IO; namespace WebApplication1 { public partial class Gallery : System.Web.UI.UserControl { public string _ImageFolder; public string ImageFolder { get { return _ImageFolder; } set { _ImageFolder = value; } } private string _cssClass = "gallery"; public string CssClass { get { return _cssClass; } set { _cssClass = value; } } protected void Page_Load(object sender, EventArgs e) { DirectoryInfo dir = new DirectoryInfo(MapPath(ImageFolder)); FileInfo[] images = dir.GetFiles("*.jpg"); rptGallery.DataSource = images; rptGallery.DataBind(); } protected void Page_PreRender(object sender, EventArgs e) { } } } The feels like a namespace issue.. My project namespace is WebApplication1. Cheers!

    Read the article

  • Unchecked call to compareTo

    - by Dave Jarvis
    Background Create a Map that can be sorted by value. Problem The code executes as expected, but does not compile cleanly: http://pastebin.com/bWhbHQmT The syntax for passing Comparable as a generic parameter along to the Map.Entry<K, V> (where V must be Comparable?) -- so that the (Comparable) typecast shown in the warning can be dropped -- eludes me. Warning Compiler's cantankerous complaint: SortableValueMap.java:24: warning: [unchecked] unchecked call to compareTo(T) as a member of the raw type java.lang.Comparable return ((Comparable)entry1.getValue()).compareTo( entry2.getValue() ); Question How can the code be changed to compile without any warnings (without suppressing them while compiling with -Xlint:unchecked)? Related TreeMap sort by value How to sort a Map on the values in Java? http://paaloliver.wordpress.com/2006/01/24/sorting-maps-in-java/ Thank you!

    Read the article

  • Apache 13 permission denied in user's home directory

    - by Dave
    Hi, My friend's website was working fine until he moved the document root from /var/www/xxx to /home/user/xxx Apache give 13 permission denied error messages when we try to access the site via a web browser. The site is configured as a virtual directory. All the Apache configurations were unchanged (except for the directory change). We tried to chmod 777 /home/user/xxx, chown apache /home/user/xxx. But they didn't work. Is there some kind of security feature set on the user's home directories? The server OS is CentOS (Godaddy VPS). Any help is appreciated! Thanks!

    Read the article

  • Web framework with JasperReports integration?

    - by Dave Jarvis
    What web development frameworks natively support JasperReports? Consider the following form as an example: <form name="report" method="post"> <input type="hidden" name="REPORT_PATH" value="reports/Names" /> <input type="hidden" name="REPORT_FILE" value="List" /> <input type="hidden" name="REPORT_FORMAT" value="pdf" /> <input type="hidden" name="REPORT_EMBED" value="false" /> Name: <input type="text" name="report_Name" value="" /><br /> Date: <input type="text" name="report_Date" value="" /><br /> <input type="submit" name="View" value="View" /> </form> The framework would pass the report_ parameters to JasperReports, which in turn runs reports/Names/List.jasper, and then sends a PDF attachment to the browser. In general: Ability to configure report (i.e., the hidden REPORT_ variables) Web FORM for setting report parameters (i.e., the report_ variables) Framework handles configuring database connection, report execution, etc. I don't care about the technical minutia on how the integration works. The example above is just one possibility of many.

    Read the article

  • How can I set Invitee in Google Calendar through Python?

    - by Dhaval dave
    I am Setting Google Calendar via python command like this def _InsertQuickAddEvent(self, content="Tennis with dddddd on 5/19/2010 4am-5:30am"): """Creates an event with the quick_add property set to true so the content is processed as quick add content instead of as an event description.""" event = gdata.calendar.CalendarEventEntry() who = whois("[email protected]") event.content = atom.Content(text=content) event.quick_add = gdata.calendar.QuickAdd(value='true'); new_event = self.cal_client.InsertEvent(event, '/calendar/feeds/default/private/full') return new_event this code is given by Google API Can any one suggest what to do to add invitee in this? Important links for that http://code.google.com/apis/calendar/data/1.0/developers_guide_python.html

    Read the article

  • Declaring a string array in class header file - compiler thinks string is variable name?

    - by Dave
    Hey everybody, I need a bit of a hand with declaring a string array in my class header file in C++. atm it looks like this: //Maze.h #include <string> class Maze { GLfloat mazeSize, mazeX, mazeY, mazeZ; string* mazeLayout; public: Maze ( ); void render(); }; and the constructor looks like this: //Maze.cpp #include <GL/gl.h> #include "Maze.h" #include <iostream> #include <fstream> Maze::Maze( ) { cin >> mazeSize; mazeLayout = new string[mazeSize]; mazeX = 2/mazeSize; mazeY = 0.25; mazeZ = 2/mazeSize; } I'm getting a compiler error that says: In file included from model-view.cpp:11: Maze.h:14: error: ISO C++ forbids declaration of ‘string’ with no type Maze.h:14: error: expected ‘;’ before ‘*’ token and the only sense that makes to me is that for some reason it thinks I want string as a variable name not as a type declaration. If anybody could help me out that would be fantastic, been looking this up for a while and its giving me the shits lol. Cheers guys

    Read the article

  • Creating a variable-speed slideshow based on USB input on OSX.

    - by Dave A
    I have a friend who is trying to put together a geeky little contraption for a wedding, where people can view a slideshow. Neither of us use Macs, nor have programmed for one, but for various reasons it has to run on a Mac. There will be a USB ammeter hooked up to a bike dynamo. What we want is for a slideshow to be run, and advance at a speed relative to how fast someone is pedaling on a stationary bike. After much googling, it seems like we could load an iPhoto slideshow up via applescript. Is it possible to pause the slideshow and advance it with keypress commands? The applescript commands would be run via a bash script or similar that would monitor the value returned by the USB ammeter's command-line app and issue the keypress events accordingly. Is there some other app that could be likewise scripted to display photos?Hoping someone has some hints to get us started in the right direction! Thanks!

    Read the article

  • Endianness manipulation - is there a C library for this?

    - by Malvineous
    Hi all, With the sort of programs I write (working with raw file data) I often need functions to convert between big and little endian. Usually I write these myself (which is covered by many other posts here) but I'm not that keen on doing this for a number of reasons - the main one being lack of testing. I don't really want to spend ages testing my code in a big endian emulator, and often just omit the code for big endian machines altogether. I also would rather make use of faster functions provided by various compilers, while still keeping my programs cross-platform. The only things I can find are socket calls like htons() but they require different #include files on each platform, and some GPL code like this, however that particular file, while comprehensive, seems to miss out on some of the high performance functions provided by some compilers. So, does anyone know of a library (ideally just a .h file) that is well tested and provides a standard set of functions for dealing with endianness across many compilers and platforms?

    Read the article

  • Sort latitude and longitude coordinates into clockwise quadrangle

    - by Dave Jarvis
    Problem Users can provide up to four latitude and longitude coordinates, in any order. They do so with Google Maps. Using Google's Polygon API (v3), the coordinates they select should highlight the selected area between the four coordinates. Solutions and Searches http://stackoverflow.com/questions/242404/sort-four-points-in-clockwise-order Graham's scan seems too complicated for four coordinates Sort the coordinates into two arrays (one by latitude, the other longitude) ... then? Question How do you sort the coordinates in (counter-)clockwise order, using JavaScript? Code Here is what I have so far: // Ensures the markers are sorted: NW, NE, SE, SW function sortMarkers() { var ns = markers.slice( 0 ); var ew = markers.slice( 0 ); ew.sort( function( a, b ) { if( a.lat() < b.lat() ) { return -1; } else if( a.lat() > b.lat() ) { return 1; } return 0; }); ns.sort( function( a, b ) { if( a.lng() < b.lng() ) { return -1; } else if( a.lng() > b.lng() ) { return 1; } return 0; }); } What is a better approach? Thank you.

    Read the article

< Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >