Search Results

Search found 225 results on 9 pages for 'barry carter'.

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

  • Which new C#/VB features require .net Framework 4?

    - by Barry
    I remember reading in passing that some of the new language features in C# and VB that are available in VS2010 are backwards compatible with earlier versions of the framework, but that others are not. I'm pretty sure this was in reference to the new property syntax in VB. Which new features are language features vs which ones are framework specific?

    Read the article

  • Visual Studio 2010 SQL Server Database Project - Ignore Stored Procedures and Functions

    - by Carter
    I really like the new SQL Server Database projects in Visual Studio 2010. I also like using the "Generate DROP statements for objects that are in the target database but that are not in the database project" option in the deployment properties. However, I do not want to manage Stored Procedures and Functions using this interface; I have another tool for that. Every time I do a build and deploy, VS will drop my stored procedures that I have created with my external program. I would like to essentially "ignore" stored procedures and functions. Is there a way to ignore stored procedures and functions when building SQL Server Database projects? I won't be able to use the "Generate DROP statements..." option if I want to use my external tool for stored procedures and functions.

    Read the article

  • What's the easiest way to use OAuth with ActiveResource?

    - by Barry Hess
    I'm working with some old code and using ActiveResource for a very basic Twitter integration. I'd like to touch the app code as little as possible and just bring OAuth in while still using ActiveResource. Unfortunately I'm finding no easy way to do this. I did run into the oauth-active-resource gem, but it's not exactly documented and it appears to be designed for creating full-on API wrapper libraries. As you can imagine, I'd like to avoid creating a whole Twitter ActiveResource API wrapper for this one legacy change. Any success stories out there? In my instance, it might be quicker to just leave ActiveResource rather than get this working. I'm happy to be proven wrong!

    Read the article

  • Dataflow Pipeline holding on to memory

    - by Jesse Carter
    I've created a Dataflow pipeline consisting of 4 blocks (which includes one optional block) which is responsible for receiving a query object from my application across HTTP and retrieving information from a database, doing an optional transform on that data, and then writing the information back in the HTTP response. In some testing I've done I've been pulling down a significant amount of data from the database (570 thousand rows) which are stored in a List object and passed between the different blocks and it seems like even after the final block has been completed the memory isn't being released. Ram usage in Task Manager will spike up to over 2 GB and I can observe several large spikes as the List hits each block. The signatures for my blocks look like this: private TransformBlock<HttpListenerContext, Tuple<HttpListenerContext, QueryObject>> m_ParseHttpRequest; private TransformBlock<Tuple<HttpListenerContext, QueryObject>, Tuple<HttpListenerContext, QueryObject, List<string>>> m_RetrieveDatabaseResults; private TransformBlock<Tuple<HttpListenerContext, QueryObject, List<string>>, Tuple<HttpListenerContext, QueryObject, List<string>>> m_ConvertResults; private ActionBlock<Tuple<HttpListenerContext, QueryObject, List<string>>> m_ReturnHttpResponse; They are linked as follows: m_ParseHttpRequest.LinkTo(m_RetrieveDatabaseResults); m_RetrieveDatabaseResults.LinkTo(m_ConvertResults, tuple => tuple.Item2 is QueryObjectA); m_RetrieveDatabaseResults.LinkTo(m_ReturnHttpResponse, tuple => tuple.Item2 is QueryObjectB); m_ConvertResults.LinkTo(m_ReturnHttpResponse); Is it possible that I can set up the pipeline such that once each block is done with the list they no longer need to hold on to it as well as once the entire pipeline is completed that the memory is released?

    Read the article

  • Parsing Serialized JSON DataSet using Jquery

    - by Zachary Carter
    Hello all, and thanks for reading. I wrote a web service which is called through jsonp, and returns a .Net 3.5 DataSet which I then want to parse using jquery. It appears that the getJson() method is working fine as far as parsing the json goes. The following request - $.getJSON("http://localhost:80/ws.asmx/Example?format=json&callback=?", function(data) { alert(data.d); }); results in - {"Tables": [ { "Rows": [ { "CASE_TYP_CD": "M", "CASE_TYP_DESC": "MOVING VIOLATION", "AUTO_GENERATE": "Y", "CONFIDENTIAL_FLG": "N" }, { "CASE_TYP_CD": "T", "CASE_TYP_DESC": "TRUANCY/FAILURE TO ATTEND SCHOOL", "AUTO_GENERATE": "Y", "CONFIDENTIAL_FLG": "N" }, { "CASE_TYP_CD": "J", "CASE_TYP_DESC": "JUVENILE", "AUTO_GENERATE": "Y", "CONFIDENTIAL_FLG": "N" }... Well I'm kind of new at this whole json thing and I can't figure out how to gain access to the values held in the nodes. I was thinking it would be something like - $.each("CASE_TYP_CD", function() { //code goes here }); But that doesn't seem to be working. Could anyone help me out with this? Thanks in advance!

    Read the article

  • How to achieve table like rows within container using CSS

    - by Barry
    I'm helping an artist maintain her website and have inherited some pretty outdated code. Have moved lots of redundant common code to include files and am now working on moving from inline styles to more CSS-driven styles. For the gallery pages, e.g. http://artistsatlaketahoe.com/abstract.html, a lot of inline styling is used to force the current layout. My preference would be to replace this entirely with CSS that presents the following table-like layout within the "content" div: [image] [image descriptives and purchase button] [image] [image descriptives and purchase button] [image] [image descriptives and purchase button] I'd like to middle-align the image descriptives & purchase button relative to the image if possible. And then apply some padding above and below each row to stop using tags for vertical spacing. Any ideas how to create a div that I can use to get this kind of layout? Thanks!

    Read the article

  • Internet and Intellisense bad for your memory?

    - by Barry Jones
    Having programmed for a while now I have noticed that I am becoming more and more reliant on the internet and intellisense to do my job. But I was wondering how much that has effected my knowledge over the past year or so. But does this matter? For example I am more likely now to remember that when I need to program against objects I have no knowledge about, I will go to the System.Reflection namespace and a quick look down the list will provide me with enough detail to get going again. But if you was to ask me which classes etc are required I would struggle to name them all. This problem of remembering seems to manifest itself more when going for interviews when people seem to focus more on the minute detail of obscure areas of the .NET framework and not on the wide and varied knowledge and experience of the applicant. Anyway I digress. Does anyone else think that maybe its time to turn of the intellisense and try and find better ways to learn, then quick fixes and work arounds of the internet?

    Read the article

  • Dynamically adding radio buttons using JQUERY and then hooking up the jquery change event to the gen

    - by Barry
    i am adding collection of radio buttons to my page using jquery below $(document).ready(function() { $("#Search").click(function() { var keyword = $('#keyWord').val(); var EntityType = $("#lstEntityTypes :selected").text(); var postData = { type: EntityType, keyWord: keyword }; // alert(postData.VehicleType); $.post('/EntityLink/GetJsonEntitySearchResults', postData, function(GRdata) { var grid = '<table><tr><td>ID</td><td>Name</td><td></td>'; for (var i = 0; i < GRdata.length; i++) { grid += '<tr><td>'; grid += GRdata[i].ID; grid += '</td><td>'; grid += GRdata[i].EntityName; grid += '</td><td>'; grid += '<input type="radio" name="EntitiesRadio" value="' + GRdata[i].ID + '" />'; grid += '</td></tr>'; } grid += '</table>'; alert(grid); $("#EntitySearchResults").html(grid); $("EntitiesRadio").change(function() { alert($("EntitiesRadio :checked").val()); $("EntityID").val($("EntitiesRadio :checked").val()); alert($("EntityID").val()); $("EntityName").val($("#lstEntityTypes :selected").text()); }); }); }); // }); so when page loads there is not EntitiesRadio name range, so i tried to register the entitiesRadio change function inside the same search click method but it isnt registering. how do i get the change event to fire to update my hidden inputs

    Read the article

  • Using inheritance and polymorphism to solve a common game problem

    - by Barry Brown
    I have two classes; let's call them Ogre and Wizard. (All fields are public to make the example easier to type in.) public class Ogre { int weight; int height; int axeLength; } public class Wizard { int age; int IQ; int height; } In each class I can create a method called, say, battle() that will determine who will win if an Ogre meets and Ogre or a Wizard meets a Wizard. Here's an example. If an Ogre meets an Ogre, the heavier one wins. But if the weight is the same, the one with the longer axe wins. public Ogre battle(Ogre o) { if (this.height > o.height) return this; else if (this.height < o.height) return o; else if (this.axeLength > o.axeLength) return this; else if (this.axeLength < o.axeLength) return o; else return this; // default case } We can make a similar method for Wizards. But what if a Wizard meets an Ogre? We could of course make a method for that, comparing, say, just the heights. public Wizard battle(Ogre o) { if (this.height > o.height) return this; else if (this.height < o.height) return o; else return this; } And we'd make a similar one for Ogres that meet Wizard. But things get out of hand if we have to add more character types to the program. This is where I get stuck. One obvious solution is to create a Character class with the common traits. Ogre and Wizard inherit from the Character and extend it to include the other traits that define each one. public class Character { int height; public Character battle(Character c) { if (this.height > c.height) return this; else if (this.height < c.height) return c; else return this; } } Is there a better way to organize the classes? I've looked at the strategy pattern and the mediator pattern, but I'm not sure how either of them (if any) could help here. My goal is to reach some kind of common battle method, so that if an Ogre meets an Ogre it uses the Ogre-vs-Ogre battle, but if an Ogre meets a Wizard, it uses a more generic one. Further, what if the characters that meet share no common traits? How can we decide who wins a battle?

    Read the article

  • Using Regex to remove Carriage Returns in a CSV file in Notepad++

    - by Barry
    I have a CSV file I need to clean up. This is a one-time thing so I'd like to do it in Notepad++ if possible. The CSV file has two fields, one of which is wrapped in quotes. I'd like to remove any Carriage Returns from within the quoted field. I was trying to use this pattern but can't get it quite right... (.*)\"(.*)\n(.*)\"(.*) Also correct me if I am wrong, but I presume the "replace with" value would be something along the lines of: \1\2\3\4 Thanks in advance. I'm also open to alternate solutions such as a quick and dirty PERL script.

    Read the article

  • How do I guarante node order for an Xpath 'OR' query

    - by Tom Carter
    I have a snippet of XML that looks like <body> Some text.... <nodeA>....</nodeA> more text <someOtherNode> <nodeA>.......</nodeA> </someOtherNode> <nodeB>.......</nodeB> etc..... </body> I'm selecting all nodeA and NodeB nodes inside <body> using an XPATH query similar to "//nodeA|//nodeB" As I understand it, .NET supports XPATH 1.0 which does not guarantee node order. How can I guarantee selected nodes are returned in document order in my OR query : that's to say : nodeA, nodeA, nodeB

    Read the article

  • What's the recommended implementation for hashing OLE Variants?

    - by Barry Kelly
    OLE Variants, as used by older versions of Visual Basic and pervasively in COM Automation, can store lots of different types: basic types like integers and floats, more complicated types like strings and arrays, and all the way up to IDispatch implementations and pointers in the form of ByRef variants. Variants are also weakly typed: they convert the value to another type without warning depending on which operator you apply and what the current types are of the values passed to the operator. For example, comparing two variants, one containing the integer 1 and another containing the string "1", for equality will return True. So assuming that I'm working with variants at the underlying data level (e.g. VARIANT in C++ or TVarData in Delphi - i.e. the big union of different possible values), how should I hash variants consistently so that they obey the right rules? Rules: Variants that hash unequally should compare as unequal, both in sorting and direct equality Variants that compare as equal for both sorting and direct equality should hash as equal It's OK if I have to use different sorting and direct comparison rules in order to make the hashing fit. The way I'm currently working is I'm normalizing the variants to strings (if they fit), and treating them as strings, otherwise I'm working with the variant data as if it was an opaque blob, and hashing and comparing its raw bytes. That has some limitations, of course: numbers 1..10 sort as [1, 10, 2, ... 9] etc. This is mildly annoying, but it is consistent and it is very little work. However, I do wonder if there is an accepted practice for this problem.

    Read the article

  • (PHP) Converting an array of arrays from one format into another

    - by Richard Carter
    Hi, I currently have an array, created from a database, an example of which looks like the following: Array( [0] => Array ( objectid => 2, name => title, value => apple ), [1] => Array ( objectid => 2, name => colour, value => red ), [2] => Array ( objectid => 3, name => title, value => pear ), [3] => Array ( objectid => 3, name => colour, value => green ) ) What I would like to do is group all the items in the array by their objectid, and convert the 'name' values into keys and 'value' values into values of an associative array....like below: Array ( [0] => Array ( objectid => 2, title => apple, colour => red ), [1] => Array ( objectid => 3, title => pear, colour => green ) ) I've tried a few things but haven't really got anywhere.. Any ideas? Thanks in advance

    Read the article

  • Why can't decimal numbers be represented exactly in binary?

    - by Barry Brown
    There have been several questions posted to SO about floating-point representation. For example, the decimal number 0.1 doesn't have an exact binary representation, so it's dangerous to use the == operator to compare it to another floating-point number. I understand the principles behind floating-point representation. What I don't understand is why, from a mathematical perspective, are the numbers to the right of the decimal point any more "special" that the ones to the left? For example, the number 61.0 has an exact binary representation because the integral portion of any number is always exact. But the number 6.10 is not exact. All I did was move the decimal one place and suddenly I've gone from Exactopia to Inexactville. Mathematically, there should be no intrinsic difference between the two numbers -- they're just numbers. By contrast, if I move the decimal one place in the other direction to produce the number 610, I'm still in Exactopia. I can keep going in that direction (6100, 610000000, 610000000000000) and they're still exact, exact, exact. But as soon as the decimal crosses some threshold, the numbers are no longer exact. What's going on? Edit: to clarify, I want to stay away from discussion about industry-standard representations, such as IEEE, and stick with what I believe is the mathematically "pure" way. In base 10, the positional values are: ... 1000 100 10 1 1/10 1/100 ... In binary, they would be: ... 8 4 2 1 1/2 1/4 1/8 ... There are also no arbitrary limits placed on these numbers. The positions increase indefinitely to the left and to the right.

    Read the article

  • Choosing a W3C valid DOCTYPE and charset combination?

    - by George Carter
    I have a homepage with the following: <DOCTYPE html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> My choice of the DOCTYPE "html" is based on a recommendation for html pages using jQuery. My choice of charset=utf=8 is based on a recommendation to make my pages readable on most browsers. But these choices may be wrong. When I run this page thru the W3C HTML validator, I get messages you see below. Any way I can eliminate the 2 errors? ! Using experimental feature: HTML5 Conformance Checker. The validator checked your document with an experimental feature: HTML5 Conformance Checker. This feature has been made available for your convenience, but be aware that it may be unreliable, or not perfectly up to date with the latest development of some cutting-edge technologies. If you find any issue with this feature, please report them. Thank you. Validation Output: 2 Errors 1. Error Line 18, Column 70: Changing character encoding utf-8 and reparsing. …ntent-Type" content="text/html; charset=utf-8"> 2. Error Line 18, Column 70: Changing encoding at this point would need non-streamable behavior. …ntent-Type" content="text/html; charset=utf-8">

    Read the article

  • Converting C source to C++

    - by Barry Kelly
    How would you go about converting a reasonably large (300K), fairly mature C codebase to C++? The kind of C I have in mind is split into files roughly corresponding to modules (i.e. less granular than a typical OO class-based decomposition), using internal linkage in lieu private functions and data, and external linkage for public functions and data. Global variables are used extensively for communication between the modules. There is a very extensive integration test suite available, but no unit (i.e. module) level tests. I have in mind a general strategy: Compile everything in C++'s C subset and get that working. Convert modules into huge classes, so that all the cross-references are scoped by a class name, but leaving all functions and data as static members, and get that working. Convert huge classes into instances with appropriate constructors and initialized cross-references; replace static member accesses with indirect accesses as appropriate; and get that working. Now, approach the project as an ill-factored OO application, and write unit tests where dependencies are tractable, and decompose into separate classes where they are not; the goal here would be to move from one working program to another at each transformation. Obviously, this would be quite a bit of work. Are there any case studies / war stories out there on this kind of translation? Alternative strategies? Other useful advice? Note 1: the program is a compiler, and probably millions of other programs rely on its behaviour not changing, so wholesale rewriting is pretty much not an option. Note 2: the source is nearly 20 years old, and has perhaps 30% code churn (lines modified + added / previous total lines) per year. It is heavily maintained and extended, in other words. Thus, one of the goals would be to increase mantainability. [For the sake of the question, assume that translation into C++ is mandatory, and that leaving it in C is not an option. The point of adding this condition is to weed out the "leave it in C" answers.]

    Read the article

  • linq to sql string property from non-null column with default

    - by Barry Fandango
    I have a LINQ to SQL class "VoucherRecord" based on a simple table. One property "Note" is a string that represents an nvarchar(255) column, which is non-nullable and has a default value of empty string (''). If I instantiate a VoucherRecord the initial value of the Note property is null. If I add it using a DataContext's InsertOnSubmit method, I get a SQL error message: Cannot insert the value NULL into column 'Note', table 'foo.bar.tblVoucher'; column does not allow nulls. INSERT fails. Why isn't the database default kicking in? What sort of query could bypass the default anyway? How do I view the generated sql for this action? Thanks for your help!

    Read the article

  • How would I strip an '&' symbol out of an ESRI dropdown before any of it's default control logic is

    - by Carter
    I have an ESRI dropdown control inside of an ESRI toolbar. One of the items in the dropdown needs to have an '&' symbol in it. As it turns out ESRI stuff builds it's callback strings as & delimited strings, so when an item is selected the parent toolbar immediately builds and handles the callback string. At one point it splits strings based on the '&' crashing the app. In effect, having an ampersand in an esri dropdown causes nasty stuff to happen when you select the item. What I need to do is find out how I can hop in before the callback stuff starts happening and strip that & out. I was thinking that perhaps I'd have to create a custom esri toolbar control, but I'm not sure and that'd be pretty undesirable. Any ideas?

    Read the article

  • Strange issues with view switcher after object animator animations

    - by Barry Irvine
    I have two LinearLayout views that contain a number of edit texts and checkboxes for entering user information (name, email address etc). When a validation fails on one of these fields a gone textview is displayed showing the validation error. I have enclosed the two layouts within a ViewSwitcher and I animate between the two views using the ObjectAnimator class. (Since the code needs to support older versions of Android I am actually using the nineoldandroids backwards compatibility library for this). The bulk of the work is performed in my switchToChild method. If I flip the views more than twice then I start to run into strange errors. Firstly although the correct child view of the view animator is displayed it seems that the other view has focus and I can click on the views beneath the current one. I resolved this issue by adding a viewSwitcher.bringChildToFront at the end of the first animation. When I do this however and perform a validation on the 2nd view the "gone" view that I have now set to visible is not displayed (as if the linearlayout is never being re-measured). Here is a subset of the XML file: <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/TitleBar" android:scrollbarAlwaysDrawVerticalTrack="true" android:scrollbarStyle="outsideOverlay" android:scrollbars="vertical" > <ViewSwitcher android:id="@+id/switcher" android:layout_width="fill_parent" android:layout_height="wrap_content" > <LinearLayout android:id="@+id/page_1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <!-- Lots of subviews here --> <LinearLayout android:id="@+id/page_2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > And this is the main method for flipping between the views: private void switchToChild(final int child) { final ViewSwitcher viewSwitcher = (ViewSwitcher) findViewById(R.id.switcher); if (viewSwitcher.getDisplayedChild() != child) { final Interpolator accelerator = new AccelerateInterpolator(); final Interpolator decelerator = new DecelerateInterpolator(); final View visibleView; final View invisibleView; switch (child) { case 0: visibleView = findViewById(R.id.page_2); invisibleView = findViewById(R.id.page_1); findViewById(R.id.next).setVisibility(View.VISIBLE); findViewById(R.id.back).setVisibility(View.GONE); break; case 1: default: visibleView = findViewById(R.id.page_1); invisibleView = findViewById(R.id.page_2); findViewById(R.id.back).setVisibility(View.VISIBLE); findViewById(R.id.next).setVisibility(View.GONE); break; } final ObjectAnimator visToInvis = ObjectAnimator.ofFloat(visibleView, "rotationY", 0f, 90f).setDuration(250); visToInvis.setInterpolator(accelerator); final ObjectAnimator invisToVis = ObjectAnimator.ofFloat(invisibleView, "rotationY", -90f, 0f).setDuration(250); invisToVis.setInterpolator(decelerator); visToInvis.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator anim) { viewSwitcher.showNext(); invisToVis.start(); viewSwitcher.bringChildToFront(invisibleView); // If I don't do this the old view can have focus } }); visToInvis.start(); } } Does anyone have any ideas? This is really confusing me!

    Read the article

  • How can I help fellow students struggling in programming classes?

    - by David Barry
    I'm a computer science student finishing up my second semester of programming classes. I've enjoyed them quite a bit, and learned a lot, but it seems other students are struggling with the concepts and assignments more than I am. When an assignment is due, the inevitable group email comes out the day or two before with people needing some help either with a specific part of the problem, or sometimes people just seem to have a hard time knowing where to start. I'd really like to be able to help out, but I have a hard time thinking of the right way to give them help without giving them the answer. When I'm having trouble understanding a concept, a code snippet can go along way to helping me, but at the same time if it makes a lot of sense, it can be difficult to think of another way to go about it. Plus the Academic Integrity section of each assignment is always looming overhead warning against sharing code with others. I've tried using pseudo code to help give others an idea on program flow, leaving them to figure out how to implement certain aspects of it, but I didn't get too much feedback and don't know how much it actually helped them out, or if it just confused them further. So I'm basically looking to see if anyone has experience with this, or good ways that I can help out other students to nudge them in the right direction or help them think about the problem in the right way.

    Read the article

  • Fade in list of images, once all are loaded.

    - by Nathan Barry
    I have a group of images in this format: <ul id="photo-list"> <li><img src="" /></li> <li><img src="" /></li> <li><img src="" /></li> </ul> My goal is that once all the images have finished loading, then #photo-list will fade in. Also I would like to display a loading animation before the images are loaded. Any help is appreciated!

    Read the article

  • Organize array in PHP from mysql

    - by Matthew Carter
    Hi i have a social networking website. what i want it to do is pull out my friends status updates. basically what it does is i have a mysql query that pulls out all of my friends and in that while loop there is another mysql query that pulls out the status's from my friends. i want it to be in order of date but since its one while loop in another what it does is pull out all status's from friend 1 then 2 then 3 and not in order by date. i even tried ORDER BY DATE but that just ordered it by date within the friend.. my thought is that i could putt it all in an array and friends is one thing and the values is the stats. then just sort by values would this work and how could i do it. THANKS SO MUCH

    Read the article

  • How to expose an entity via alternate keys with spring data rest

    - by dan carter
    Spring-data-rest does a great job exposing entities via their primary key for GET, PUT and DELETE etc. operations. /myentityies/123 It also exposes search operations. /myentities/search/byMyOtherKey?myOtherKey=123 In my case the entities have a number of alternate keys. The systems calling us, will know the objects by these IDs, rather than our internal primary key. Is it possible to expose the objects via another URL and have the GET, PUT and DELETE handled by the built-in spring-data-rest controllers? /myentities/myotherkey/456 We'd like to avoid forcing the calling systems to have to make two requests for each update. I've tried playing with @RestResource path value, but there doesn't seem to be a way to add additional paths.

    Read the article

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