Search Results

Search found 573 results on 23 pages for 'pete nelson'.

Page 12/23 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Visual Studio 2008 Automatic line breaks in comments

    - by Pete Michaud
    When I write a comment, it's often a paragraph or a few lines that explains clearly what a bit of code is doing and why it's doing that. What I'd like is if I could start a comment, and have the editor automatically insert a line break and continue the comment to the nest line when I reach, say, 80 characters long. So I'd type: // Lorem ipsum dolor sit amet, consectetur adipiscing elit. < here the editor breaks automatically and continues onto the next line: // Etiam congue quam eget leo dignissim tincidunt.

    Read the article

  • Handling learning curve for new developers

    - by pete the pagan-gerbil
    Our company likes to hire new developers, with no experience. We have a core set of skills that we try to get them up to speed with, like ASP.NET and WinForms - to teach basic programming, the .NET languages, and the things they'll need to maintain and write. We also try and mentor them through early projects, so they can learn from someone more experienced. Recently, we've been seeing the benefits of new frameworks like MVC and ideas like Unit Testing and TDD (by extension, dependancy injection and IoC), and we'd like to start using these in the team. However, this increases the time that a junior would have before they can get started on a new project - because doing something like unit tests wrong could cause major headaches months or years later in maintenance, especially if we believe unit tests to be comprehensive. How do you handle the huge amount of things that a junior will need to take on, acknowledging that the business wants them working independantly as soon as possible? Is it acceptable to tell them not to unit test till a while after they are independant (and give them small, simpler projects in the meantime) before taking them to 'level 2' of the core skills?

    Read the article

  • Best strategy for moving data between physical tiers in ASP.net

    - by Pete Lunenfeld
    Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI tier into separate physical layers. What is the best/easiest strategy to move serialized objects between the service tier and the UI tier? I was considering serializing POCOs into JSON using simple ASP.net pages to serve the middle tier. Meaning that the UI/Web tier will request data from a (hidden to the outside user) web server that will return a JSON string. This kind of JSON 'emitter' seems easily testable. It also seems easily compressible for efficiently moving data over the WAN between tiers. I know that some folks use .asmx webservices for this kind of task, but this seems like there is excess overhead with SOAP, and the package is not as human readable (testable) as POCOs serialized as JSON. Others are using more complex technology like WCF which we have never used. Does anyone have advice for choosing a method for moving data/objects between the data (db) tier and the web (UI) tier over the WAN using .net technologies? Thanks!!!

    Read the article

  • Is it possible to implement any kind of file upload recovery / resumption in a browser?

    - by Pete
    The project is a servlet to which people can upload files via, at present, HTTP POST. This is accompanied by Web page(s) providing a front-end to trigger the upload. We have more or less complete control over the servlet, and the Web pages, but don't want to impose any restrictions on the client beyond being a reasonably modern browser with Javascript. No Java applets etc. Files may potentially be large, and a possible use case is mobile devices on less reliable networks. Some people on the project are demanding the ability to resume an upload if the network connection goes down. I don't think this is possible with plain HTTP and Javascript in a browser, but I'd love to be proved wrong. Any suggestions?

    Read the article

  • CMYK + CMYK = ? CMYK / 2 = ?

    - by Pete
    Suppose there are two colors defined in CMYK: color1 = 30, 40, 50, 60 color2 = 50, 60, 70, 80 If they were to be printed what values would the resulting color have? color_new = min(cyan1 + cyan2, 100), min(magenta1 + magenta2, 100), min(yellow1 + yellow2, 100), min(black1 + black2, 100)? Suppose there is a color defined in CMYK: color = 40, 30, 30, 100 It is possible to print a color at partial intensity, i.e. as a tint. What values would have a 50% tint of that color? color_new = cyan / 2, magenta / 2, yellow / 2, black / 2? I'm asking this to better understand the "tintTransform" function in PDF Reference 1.7, 4.5.5 Special Color Spaces, DeviceN Color Spaces Update: To better clarify: I'm not entirely concerned with human perception or how the CMYK dyies react to the paper. If someone specifies 90% tint which, when printed, looks like full intensity colorant, that's ok. In other words, if I asking how to compute 50% of cmyk(40, 30, 30, 100) I'm asking how to compute the new values, regardless of whether the result looks half-dark or not. Update 2: I'm confused now. I checked this in InDesign and Acrobat. For example Pantone 3005 has CMYK 100, 34, 0, 2, and its 25% tint has CMYK 25, 8.5, 0, 0.5. Does it mean I can "monkey around in a linear way"?

    Read the article

  • How to structure an index for type ahead for extremely large dataset using Lucene or similar?

    - by Pete
    I have a dataset of 200million+ records and am looking to build a dedicated backend to power a type ahead solution. Lucene is of interest given its popularity and license type, but I'm open to other open source suggestions as well. I am looking for advice, tales from the trenches, or even better direct instruction on what I will need as far as amount of hardware and structure of software. Requirements: Must have: The ability to do starts with substring matching (I type in 'st' and it should match 'Stephen') The ability to return results very quickly, I'd say 500ms is an upper bound. Nice to have: The ability to feed relevance information into the indexing process, so that, for example, more popular terms would be returned ahead of others and not just alphabetical, aka Google style. In-word substring matching, so for example ('st' would match 'bestseller') Note: This index will purely be used for type ahead, and does not need to serve standard search queries. I am not worried about getting advice on how to set up the front end or AJAX, as long as the index can be queried as a service or directly via Java code. Up votes for any useful information that allows me to get closer to an enterprise level type ahead solution

    Read the article

  • How to make a legacy webapp spring aware at the container level for bean autowire into Servlets?

    - by Pete
    We have a legacy web application (not Spring based) and are looking for best practices to autowire some newer Spring configured (thread safe) service beans into instance variables in several of the legacy servlets. Rewriting every servlet to Spring MVC is out of scope. For testability, we do not want any Spring specific bean lookup code in the Servlets to look up beans by name or similar. Note that we are not concerned about web specific bean scopes such as session or request; all services are singleton scope. Below shows relevant code snippet MyServlet extends LegacyServletSuperclass { private MyThreadSafeServiceBean wantThisToBeAutowiredBySpring; .... }

    Read the article

  • HTML5: Can't drag on-the-fly created <div> tag even though draggable='true' Do I need to "BLESS"

    - by Pete Alvin
    After creating a div on the fly with this markup: $('.circuit').prepend("<div class='component' draggable='true'>TRANSISTOR</div>"); It is NOT draggable itself :( Is jQuery prepend() the correct way to create "live" tags in the DOM? Do I need to somehow bless it a different way to make draggable=true really work? How to I wire it up so that on-the-fly divs can be draggable? AFTER NOTE: I added a static div and that is draggable. INTERESTING: I view both the static and dynamic using FireFox F12 Firebug and they are identical. But one is draggable and one is not!!!

    Read the article

  • "Unable to find a version of the runtime to run this application" running .NET app in virtual XP mac

    - by Pete
    I've written a few winform apps in .net 2.0 which won't run in a virtual XP (running from VirtualBox). I get the error "unable to find a version of the runtime to run this application" (.NET Framework Initialization Error). I've tried fixing the installation of .net and also installing v3.5. I think it's probably a security issue rather than a framework problem, but i'm running under an administrator account. Other .net apps (2.0) run ok, so it might be a strong name/signing problem. I've tried compiling them completely unsigned and also delay signing them with a key and turning on verification skipping with the sn tool. help greatly appreciated!

    Read the article

  • Combine query results from one table with the defaults from another

    - by pulegium
    This is a dumbed down version of the real table data, so may look bit silly. Table 1 (users): id INT username TEXT favourite_food TEXT food_pref_id INT Table 2 (food_preferences): id INT food_type TEXT The logic is as follows: Let's say I have this in my food preference table: 1, 'VEGETARIAN' and this in the users table: 1, 'John', NULL, 1 2, 'Pete', 'Curry', 1 In which case John defaults to be a vegetarian, but Pete should show up as a person who enjoys curry. Question, is there any way to combine the query into one select statement, so that it would get the default from the preferences table if the favourite_food column is NULL? I can obviously do this in application logic, but would be nice just to offload this to SQL, if possible. DB is SQLite3...

    Read the article

  • How do you scroll one area of a page using Android's web browser?

    - by Pete
    On the iPhone, safari strips out scrollbars on divs that have overflow set to auto or scroll, but still lets the user scroll with the two-finger swipe gesture. Using an HTC Incredible, we see the scrollbars are again missing, but we cannot figure out any gesture that allows the user to scroll. Is there a special directive we need to add to our HTML? This should affect zillions of websites, any time someone is trying to scroll an area of the page rather than the whole page. Does anyone know how to enable scrolling a div using the web browser on Android phones?

    Read the article

  • Javascript when to show results

    - by Pete
    This is my Javascript below I want to show records on load and also show new records when added to the database showrecords(); displays the records in the database where abouts can I put this in my code where it will work correctly. `$(document).ready(function() { //showrecords() function showrecords() { $.ajax({ type: "POST", url: "demo_show.php", cache: false, success: function(html){ $("#display").after(html); document.getElementById('content').value=''; $("#flash").hide(); } }); } $(".comment_button").click(function() { var element = $(this); var test = $("#content").val(); var dataString = 'content='+ test; if(test=='') { alert("Please Enter Some Text"); } else { $("#flash").show(); $("#flash").fadeIn(400).html('<img src="http://tiggin.com/ajax-loader.gif" align="absmiddle">&nbsp;<span class="loading">Loading Comment...</span>'); $.ajax({ type: "POST", url: "demo_insert.php", data: dataString, cache: false, success: function(html){ // $("#display").after(html); document.getElementById('content').value=''; $("#flash").hide(); //Function for showing records //showrecords(); } }); } return false; }); }); `

    Read the article

  • Python: list and string matching

    - by pete
    Hi All, I have following: temp = "aaaab123xyz@+" lists = ["abc", "123.35", "xyz", "AND+"] for list in lists if re.match(list, temp, re.I): print "The %s is within %s." % (list,temp) The re.match is only match the beginning of the string, How to I match substring in between too.

    Read the article

  • JQuery/JavaScript div tag "containment" approach/algorithm?

    - by Pete Alvin
    Background: I've created an online circuit design application where div tags are containers that contain smaller div containers and so forth. Question: For any particular div tag I need to quickly identify if it contains other div tags (that may in turn contain other div tags). I've searched JQuery and I don't see any built-in routine for this. Does anyone know of an algorithm that's quicker than O(n^2)? Seems like I have to walk the list of div tags in an outer loop (n) and have an inner loop (another n) to compare against all other div tags and do a "containment test" (position, width, height), building a list of contained div tags. That's n-squared. Then I have to build a list of all nested div tags by concatenating contained lists. So the total would be O(n^2)+n. There must be a better way?

    Read the article

  • Why Is my json-object from AJAX not understood by javascript, even with 'json' dataType?

    - by pete
    My js code simply gets a json object from my server, but I think it should be automatically parsed and turned into an object with properties, yet it's not allowing access properly. $.ajax({ type: 'POST', url: '/misc/json-sample.js', data: {href: path}, // THIS IS THE POST DATA THAT IS PASSED IN TO THE DRUPAL MENU CALL TO GET THE MENU... dataType: 'json', success: function (datax) { if (datax.debug) { alert('Debug data: ' + datax.debug); } else { alert('No debug data: ' + datax.toSource() ) ; } The /misc/json-sample.js file is: [ { "path": "examplemodule/parent1/child1/grandchild1", "title": "First grandchild option", "children": false } ] (I have also been trying to return that object from drupal as follows, and the same results.) Drupal version of misc/json-sample.js: $items[] = array( 'path' = 'examplemodule/parent1/child1/grandchild1', 'title' = t('First grandchild option'), 'debug' = t('debug me!'), 'children' = FALSE ); print drupal_to_js($items); What happens (in FF, which has the toSource() capability) is the alert with 'No debug data: [ { "path": "examplemodule/parent1/child1/grandchild1", "title": "First grandchild option", "children": false } ] Thanks

    Read the article

  • Overwhelmed by design patterns... where to begin?

    - by Pete
    I am writing a simple prototype code to demonstrate & profile I/O schemes (HDF4, HDF5, HDF5 using parallel IO, NetCDF, etc.) for a physics code. Since focus is on IO, the rest of the program is very simple: class Grid { public: floatArray x,y,z; }; class MyModel { public: MyModel(const int &nip1, const int &njp1, const int &nkp1, const int &numProcs); Grid grid; map<string, floatArray> plasmaVariables; }; Where floatArray is a simple class that lets me define arbitrary dimensioned arrays and do mathematical operations on them (i.e. x+y is point-wise addition). Of course, I could use better encapsulation (write accessors/setters, etc.), but that's not the concept I'm struggling with. For the I/O routines, I am envisioning applying simple inheritance: Abstract I/O class defines read & write functions to fill in the "myModel" object HDF4 derived class HDF5 HDF5 using parallel IO NetCDF etc... The code should read data in any of these formats, then write out to any of these formats. In the past, I would add an AbstractIO member to myModel and create/destroy this object depending on which I/O scheme I want. In this way, I could do something like: myModelObj.ioObj->read('input.hdf') myModelObj.ioObj->write('output.hdf') I have a bit of OOP experience but very little on the Design Patterns front, so I recently acquired the Gang of Four book "Design Patterns: Elements of Reusable Object-Oriented Software". OOP designers: Which pattern(s) would you recommend I use to integrate I/O with the myModel object? I am interested in answering this for two reasons: To learn more about design patterns in general Apply what I learn to help refactor an large old crufty/legacy physics code to be more human-readable & extensible. I am leaning towards applying the Decerator pattern to myModel, so I can attach the I/O responsibilities dynamically to myModel (i.e. whether to use HDF4, HDF5, etc.). However, I don't feel very confident that this is the best pattern to apply. Reading the Gang of Four book cover-to-cover before I start coding feels like a good way to develop an unhealthy caffeine addiction. What patterns do you recommend?

    Read the article

  • HTML5: dragover(), drop(): how get current x,y coordinates?

    - by Pete Alvin
    How does one determine the (x,y) coordinates while dragging "dragover" and after the drop ("drop") in HTML5 DnD? I found a webpage that describes x,y for dragover (look at e.offsetX and e.layerX to see if set for various browsers but for the life of me they ARE NOT set). What do you use for the drop(e) function to find out WHERE in the current drop target it was actually dropped? I'm writing an online circuit design app and my drop target is large. Do I need to drop down to mouse-level to find out x,y or does HTML5 provided a higher level abstraction?

    Read the article

  • Jquery: Extracting the hrefs from multiple links on a page.

    - by Pete B
    Hi, I discovered that .attr() only applies to the first matched element on the page! So, I've been trying to get the hrefs from all the matched elements on a page, but to no avail. Here's what I tentatively wrote: var thelinks = $("td a").each(function(){ $(this).attr("href"); document.write(thelinks); }); I used document.write just to see what was going on, and I got a long list of "undefinedundefinedundefined" What I'm trying to do is extract the hrefs from each td a and then use ajax to visit those pages and do other stuff. I can get it work fine when it's dealing with just one link, but this multiple elements thing I can't figure out. Any help rendered is appreciated, I'm a novice to the world of Javascript and Jquery.

    Read the article

  • Load an Assembly from Bin in ASP.NET

    - by Pete Michaud
    I have a file name, like "Foo.dll," for a library that I know is in the bin directory. I want to create an Assembly object for it. I'm trying to instantiate this object from a class that's not a page, so I don't have the Request object to get the path. How do I get the path I need to use Assembly.Load()?

    Read the article

  • Sequential numbering from recursive function? e.g. 2, 2.1, 2.1.1, 2.2, 2.2.1

    - by Pete
    I have a recursive function reading a "table of contents" of documents from a database. I would like to print numbering with the document that reflects where the item is in the tree, e.g. First item, 1.1 Child of first item, 1.1.1 Child of child of first item, 1.2 Child of first item, Second item, 2.1 Child of second item, etc. Rather stumped about this at the moment - help please?

    Read the article

  • Does anyone have a backup strategy for SQL Azure databases?

    - by Pete
    I'm using SQL Azure on a project and it works great. The problem is that the usual backup features do not exist. I have exported the database a couple of times using SQLAzureMW ( http://sqlazuremw.codeplex.com/ ) but this tool is now choking trying to download the database data with bcp. In any case, it's not as nice a solution as SQL Server backups. Is anyone aware of a commercial or open source tool, or other technique, for making reliable backups of SQL Azure databases? This is really a showstopper.

    Read the article

  • Help with an RSS Feed

    - by Pete Herbert Penito
    Hi Everyone! I've spent ages on this, all I'm trying to do is extract the "title" contents from an rss feed, everything else can be ignored. I've looked into simplepie, magpie and all that stuff, but I feel its kind of overkill for what I need to do. I realise there are google gadgets that are made that can do this, but I didn't want all the google logo stuff, and I wanted to personally make this. theres a whole bunch of unneeded tags thats coming in from the rss feed all I need is the title tag, it looks like this <title> My Title 3.0 </title> My server has PHP 5+ so I know I can use some of these simple xml functions which look promising. so far I've got <?php $blogfeed = file_get_contents("http://myblog.blogspot.com/feeds/posts/default?alt=rss"); echo $blogfeed; ?> And it gives me all the data, I was thinking of running through it with strpos and searching for <title> but is there any easier way to do this?? Thanks alot!

    Read the article

  • Code in Global.asax prevents webpage from loading

    - by pete the pagan-gerbil
    I've made a static class to hold a number of configuration values (and also swap these values out in unit tests). If I initialise it in the Global.asax, the code runs correctly but the page doesn't load at all, and trying to navigate to a specific page fails. I can't initialise the values in a constructor or inline on the field declarations, because I need to be able to swap the values out in unit tests before the web.config is interrogated. Basically, putting the one line "ConfigClass.SetValues()" in the Global.asax prevents the app from loading correctly (although, as I say, it runs the code fine) and removing it again makes the app load properly - but without the class values initialised. As an aside, I'm sure I had this working correctly and being initialised in the Global.asax yesterday. I'm positive I didn't take any action to change or break it... Does anyone have advice on how I might track down what's going on here? Was I mistaken that it worked before (always possible) and that I need to go back and redesign something?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >