Search Results

Search found 28 results on 2 pages for 'atomiton'.

Page 1/2 | 1 2  | Next Page >

  • customErrors="RemoteOnly" not working properly in Server 2008

    - by Atomiton
    It would appear that on my brand new Windows Server 2008 with IIS7, customErrors is not working. We have customErrors set to RemoteOnly in the web.config on our Asp.Net sites and applications. However, no matter what we do, it would appear that our sites act like it's set to On and we can't get any detailed messages showing up on our applications when remoted into our servers. I'm not entirely sure how to trace where this is being overrided, or if there is something in the way the server is configured that would make the server think the request is internal? How does this actually resolve correctly, anyway? Any help is appreciated... Our network admin has added domains to our hosts file to direct applications to the IP address.

    Read the article

  • Is Jabber the same thing as XMPP?

    - by Atomiton
    I find conflcting information on this subject. Are they the same thing? I've read that Jabber is "based" on XMPP. For example: The chat client "Pidgin" has a box for XMPP but seemingly not for Jabber. Yet, it seems to support it. What's the difference between XMPP and Jabber?

    Read the article

  • How to Transform a user's search string into a MS SQL Full-Text Search Phrase

    - by Atomiton
    I've search for answers for this and I can't seem to find an answer to what should be somewhat simple. This is related to another question I asked, but it's different. What's the best way to take a user's search phrase and throw it into a CONTAINSTABLE(table, column, @phrase, topN ) phrase? Say, for example the user inputs: Books by "Dr. Seuss" What's the best way to turn that into something that will return results in my ContainsTAble() phrase? I was previously parsing the search phrase and writing something like ISABOUT("Books" WEIGHT(1.0), "by" WEIGHT(0.9), "Dr. Seuss" WEIGHT(0.8)) as my @phrase but ISABOUT seems to be returning odd results... especially when one word searches are entered. Any Ideas?

    Read the article

  • When to use a user defined Exception and some good examples/best Practices?

    - by Atomiton
    I would assume that most User-defined Exceptions are for Business Logic level exceptions, but what are some good reasons to use a User-Defined Exception and what are some good examples? Is a user-defined exception's only advantage that you can define a consistent Error Message? What logic can be written inside exceptions to make them truly more useful? After all, can't you just do this: throw new Exception("Some Error Message");

    Read the article

  • How can I take the first 100 characters of html content ( without stripping the TAGS! )

    - by Atomiton
    There are lots of questions on how to strip html tags, but not many on functions/methods to close them. Here's the situation. I have a 500 character Message summary ( which includes html tags ), but I only want the first 100 characters. Problem is if I truncate the message, it could be in the middle of an html tag... which messes up stuff. Assuming the html is something like this: <div class="bd">"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/> <br/>Some Dates: April 30 - May 2, 2010 <br/> <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <em>Duis aute irure dolor in reprehenderit</em> in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <br/> </p> For more information about Lorem Ipsum doemdloe, visit: <br/> <a href="http://www.somesite.com" title="Some Conference">Some text link</a><br/> </div> How would I take the first ~100 characters or so? ( Although, ideally that would be the first approximately 100 characters of "CONTENT" ( in between the html tags ) I'm assuming the best way to do this would be a recursive algorithm that keeps track of the html tags and appends any tags that would be truncated, but that may not be the best approach. My first thoughts are using recursion to count nested tags, and when we reach 100 characters, look for the next "<" and then use recursion to write the closing html tags needed from there. The reason for doing this is to make a short summary of existing articles without requiring the user to go back and provide summaries for all the articles. I want to keep the html formatting, if possible. NOTE: Please ignore that the html isn't totally semantic. This is what I have to deal with from my WYSIWYG. EDIT: I added a potential solution ( that seems to work ) I figure others will run into this problem as well. I'm not sure it's the best... and it's probably not totally robust ( in fact, I know it isn't ), but I'd appreciate any feedback

    Read the article

  • Post a form from asp to asp.Net

    - by Atomiton
    I have a classic asp application. I want to post a contest form from that page to an Asp.Net form. The reason is that I want to use a lot of logic i have built into an Asp.Net page for validation before entering into the database and I don't know asp very well. Not to mention asp.Net being more secure. What's the best way to accomplish this goal? My thoughts are as follows: My asp Page: <html> <body> <form action="/Contests/entry.aspx" method="post"> Name: <input type="text" name="fname" size="20" /> Last Name: <input type="text" name="lname" size="20" /> <input type="submit" value="Submit" /> </form> </body> </html> aspx page is running in a Virtual Directory and would handle anything posted to it. Is this possible, or does aspx prevent this kind of thing? I ( preferably ) don't want to create the form in aspx as my colleague wants to have control of the page and build the html himself and I don't want the hassle of constantly changing it. Are there caveats I need to consider? What roadblocks will I run into? How do I access the Posted Form Values? Request.Form?

    Read the article

  • What technologies should I focus on to work as a developer in Japan?

    - by Atomiton
    I'm thinking of one day moving to Japan and I was wondering if anyone here has any experience working there. I'm curious as to what languages/technology are popular there for web development and software development. I have heard Ruby is/was strong there due to its founder being Japanese. What would you recommend someone focus on if they wanted to work as a developer in Japan? I have heard Microsoft has a strong base in Japan, but my guess is that whatever platform has supported unicode or Shift-JIS the best would be the strongest.

    Read the article

  • Can I Number a GroupTemplate or ItemTemplate?

    - by Atomiton
    I would like to use a GroupTemplate to separate a list of items into groups. However, I need each Group to be numbered sequentially so I can link to them and implement some JS paging. I'm binding to an IEnumerable Here's some pseudo code. I would like the output to look like this: <a href="#group1">Go to Group 1<a> <a href="#group2">Go to Group 2<a> <a href="#group3">Go to Group 3<a> <ul id="group1"> <li>Item</li> <li>Item</li> <li>Item</li> </ul> <ul id="group2"> <li>Item</li> <li>Item</li> <li>Item</li> </ul> <ul id="group3"> <li>Item</li> <li>Item</li> <li>Item</li> </ul> Is this easy to do in a ListView, using GroupTemplate and ItemTemplate? <asp:ListView ID="lv" runat="server" GroupPlaceholderID="groupPlaceholder"> <LayoutTemplate> <asp:PlaceHolder ID="groupPlaceholder" runat="server"></asp:PlaceHolder> </LayoutTemplate> <GroupTemplate> <ul id="<!-- group-n goes here -->"> <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder> </ul> </GroupTemplate> <ItemTemplate> <li>Item</li> </ItemTemplate> </asp:ListView> I can get the number of groups to do the links at the top from the Datasource and basic math, but how do I get id="groupN" number into the template?

    Read the article

  • Is HTML5 the new buzzword? ( Web 2.0 was the old one )

    - by Atomiton
    Your thoughts on this? I'm hearing more and more people saying things like: "Is it html 5 compatible" "Can I make my website html 5" "Other html 5 question here..." What do you guys think? Is html5 the new buzzword? Obviously, it's more than a fad. It is the way things are going. But it seems like it's catching on in the mainstream. I don't think it will get as big as Web 2.0, mind you. Thought I'd ask a light question this Tuesday

    Read the article

  • Performance for myCollection.Add() vs. myCollection["key"]

    - by Atomiton
    When dealing with a collection of key/value pairs is there any difference between using its Add() method and directly assigning it? For example, a HtmlGenericControl will have an Attributes Collection: var anchor = new HtmlGenericControl("a"); // These both work: anchor.Attributes.Add("class", "xyz"); anchor.Attributes["class"] = "xyz"; Is it purely a matter of preference, or is there a reason for doing one or the other?

    Read the article

  • Unique ways to use the Null Coalescing operator

    - by Atomiton
    I know the standard way of using the Null coalescing operator in C# is to set default values. string nobody = null; string somebody = "Bob Saget"; string anybody = ""; anybody = nobody ?? "Mr. T"; // returns Mr. T anybody = somebody ?? "Mr. T"; // returns "Bob Saget" But what else can ?? be used for? It doesn't seem as useful as the ternary operator, apart from being more concise and easier to read than: nobody = null; anybody = nobody == null ? "Bob Saget" : nobody; // returns Bob Saget So given that fewer even know about null coalescing operator... Have you used ?? for something else? Is ?? necessary, or should you just use the ternary operator (that most are familiar with)

    Read the article

  • Convert a user's search string into a MS SQL `Full-Text Query` Search Phrase

    - by Atomiton
    I've search for answers for this and I can't seem to find an answer to what should be somewhat simple. This is related to another question I asked, but it's different. What's the best way to take a user's search phrase and throw it into a CONTAINSTABLE(table, column, @phrase, topN ) phrase? Say, for example the user inputs: Books by "Dr. Seuss" What's the best way to turn that into something that will return results in my ContainsTAble() phrase? I was previously parsing the search phrase and writing something like ISABOUT("Books" WEIGHT(1.0), "by" WEIGHT(0.9), "Dr. Seuss" WEIGHT(0.8)) as my @phrase but ISABOUT seems to be returning odd results... especially when one word searches are entered. Any Ideas?

    Read the article

  • What should the SQL keyword "ISABOUT" [deprecated?] be replaced with?

    - by Atomiton
    In MS SQL Full-text search, I'm using ISABOUT in my queries. For example, this should return the top 10 ProductIDs (PK) with a RANK Field in the ProductDetails Table SELECT * FROM CONTAINSTABLE( ProductDetails, *, ISABOUT("Nikon" WEIGHT (1.0), "Cameras" Weight(0.9)), 10 ) However, according to the SQL Documentation ISABOUT is deprecated. So, I have two questions: What is ISABOUT being replaced with? DO I even NEED any extra SQL Command there? ( IOW, would just putting the search phrase 'Nikon Cameras' be better? ) What I was originally trying to accomplish here was to weight the first word the highest, then the second word lower, and keep descending to 0.5 where I would just rank the remaining words at 0.5. My logic ( and perhaps it's flawed ) was that people's most relevant search words usually happen near the beginning of a phrase ( in English ). Am I going about this the wrong way? Is there a better way? Am I asking too many questions? (^_^) Thanks all for your time...

    Read the article

  • How can I remove an "ALMOST" Duplicate using LINQ? ( OR SQL? )

    - by Atomiton
    This should be and easy one for the LINQ gurus out there. I'm doing a complex Query using UNIONS and CONTAINSTABLE in my database to return ranked results to my application. I'm getting duplicates in my returned data. This is expected. I'm using CONTAINSTABLE and CONTAINS to get all the results I need. CONTAINSTABLE is ranked by SQL and CONTAINS (which is run only on the Keywords field ) is hard-code-ranked by me. ( Sorry if that doesn't make sense ) Anyway, because the tuples aren't identical ( their rank is different ) a duplicate is returned. I figure the best way to deal with this is use LINQ. I know I'll be using the Distinct() extension method, but do I have to implement the IEqualityComparer interface? I'm a little fuzzy on how to do this. For argument's sake, say my resultset is structured like this class: class Content { ContentID int //KEY Rank int Description String } If I have a List<Content> how would I write the Distinct() method to exclude Rank? Ideally I'd like to keep the Content's highest Rank. SO, if one Content's RAnk is 112 and the other is 76. I'd like to keep the 112 rank. Hopefully I've given enough information.

    Read the article

  • Teach Markup or use a WYSIWYG editor?

    - by Atomiton
    When it comes to WYSIWYG editors WYSI rarely WYG. The problem I always have is when people paste in formatted text from word. Ideally, what I'm looking for is a way for people to input text into the document while at the same time teaching them structure... I just don't know if that's a realistic goal ( compared to cut n' paste ) I'm curious if people have found using something other than WYSIWYG editors ( take SO, for example ) has worked for REAL WORLD USERS. I'm not talking about programmers, developers and experience internet users... I'm talking about your average user. I'd be interested in best practices when it comes to getting users to enter content... and I'd love it if someone could point me to some good editors/examples. there are lots of choices when it comes to WYSIWYG ( ckEditor, FreeTextBox, TinyMCE ) but I don't hear a lot about SO-like techniques. Does adding that small barrier scares users away? Is it too difficult to teach people to mark up their text? Is it easier to teach them html? Is a BBCode implementation a good idea? What are some Pros/Cons to wysiwyg/markup. What approach have others used?

    Read the article

  • Is there any reason to throw a DivideByZeroException?

    - by Atomiton
    Are there any cases when it's a good idea to throw errors that can be avoided? I'm thinking specifically of the DivideByZeroException and NullReferenceException For example: double numerator = 10; double denominator = getDenominatorFromUser(); if( denominator == 0 ){ throw new DivideByZeroException("You can't divide by Zero!"); } Are there any reasons for throwing an error like this? NOTE: I'm not talking about catching these errors, but specifically in knowing if there are ever good reasons for throwing them.

    Read the article

  • Why does ASP.Net rewrite relative paths in runat=server anchor controls?

    - by Atomiton
    I have UserControls in a Controls folder in my solution: /Controls/TheControl.ascx If specify the following: <a runat="server" href="./?pg=1">link text</a> ASP.Net seems to want to rewrite the path to point to the absolute location. For example, If the control is on site.com/products/fish/cans.aspx the link href will be rewritten to read <a href="../../Controls/?pg=1 Why does Asp.Net rewrite these control paths, and is there an elegant way to fix it?

    Read the article

  • Why doesn't a URL with two hyphens ( in one segment ) match a Route in my Route Table?

    - by Atomiton
    I'm trying to resolve this URL Route: Route articlesByCategory = new Route("articles/c{cid}-{category}", new Handler); However, it seems like the following url won't resolve to this route: // doesn't work www.site.com/articles/c24-this-is-the-category-title // This works www.site.com/articles/c24-category I assume it has to do with the dashes in the title, but can anyone tell me why this works this way? Is there a way to allow dashes in the title for a URL route like this?

    Read the article

  • Explaining NULL and Empty to your 6-year old?

    - by Atomiton
    I'm thinking in terms of Objects here. I think it's important to simplify ideas. If you can explain this to a 6-year old, you can teach new programmers the difference. I'm thinking that a cookie object would be apropos: public class Cookie { public string flavor {get; set; } public int numberOfCrumbs { get; set; } }

    Read the article

  • Why doesn't a URL Route with two dashes resolve?

    - by Atomiton
    I'm trying to resolve this URL Route: Route articlesByCategory = new Route("articles/c{cid}-{category}", new Handler); However, it seems like the following url won't resolve to this route: // doesn't work www.site.com/articles/c24-this-is-the-category-title // This works www.site.com/articles/c24-category I assume it has to do with the dashes in the title, but can anyone tell me why this works this way? Is there a way to allow dashes in the title for a URL route like this?

    Read the article

  • What methods are used to visualize a 4-dimensional Array?

    - by Atomiton
    An Array ( a row of elements ): [ ][ ][ ][ ][ ][ ] A 2-D Array ( a table ): [ ][ ][ ][ ][ ][ ] [ ][ ][ ][ ][ ][ ] [ ][ ][ ][ ][ ][ ] [ ][ ][ ][ ][ ][ ] A 3-D Array: //Imagine the above table as a cube ( a table with depth ) How does one visualize a 4-D array? The closest I can come is multiple cubes, so for int[,,,] [5,10,2,7] would be cube 5, row 10, column 2, layer(depth) 7. I'm not sure if this is the best way to visualize a 4-D array, though... and I'm not sure it's the best way to teach it... however it does have the advantage of being extensible ( a row cubes, a table of cubes, a cube of cubes ( 6-d array ) Cubes through time is another way that I can think of it. Am I on the right track here?

    Read the article

  • Why does ASP.Net rewrite relative paths for runat=server anchor controls?

    - by Atomiton
    I have my UserControls in a ~/Controls folder in my solution: /Controls/TheControl.ascx If specify the following: <a runat="server" href="./?pg=1">link text</a> ASP.Net seems to want to rewrite the path to point to the absolute location. For example, If the control is on site.com/products/fish/cans.aspx the link href will be rewritten to read <a href="../../Controls/?pg=1>link text</a> Why does Asp.Net rewrite these control paths, and is there an elegant way to fix it? I just want the anchor control to spit out exactly what I tell it to!!! Is that so hard?

    Read the article

  • Why do I see MS jQuery samples use `$(domReady); `?

    - by Atomiton
    I don't know if anyone ELSE has noticed this, but I noticed the jQuery samples I see on MS tend to use a different format: <script type="text/javascript"> $( domReady ); function domReady() { $('#btn').click( showMessage ); } function showMessage() { $('#message').fadeIn('slow'); } </script> Isn't this the same as: $(document).ready( function() { $('#btn').click( showMessage ); function showMessage() { $('#message').fadeIn('slow'); } }); Is there any advantage of using one syntax over the other? I will admit, the MS way does look cleaner.

    Read the article

  • How can I make keyword order more relevant in my search?

    - by Atomiton
    In my database, I have a keywords field that stores a comma-delimited list of keywords. For example, a Shrek doll might have the following keywords: ogre, green, plush, hero, boys' toys A "Beanie Baby" doll ( that happens to be an ogre ) might have: beanie baby, kids toys, beanbag toys, soft, infant, ogre (That's a completely contrived example.) What I'd like to do is if the consumer searches for "ogre" I'd like the "Shrek" doll to come up higher in the search results. My content administrator feels that if the keyword is earlier in the list, it should get a higher ranking. ( This makes sense to me and it makes it easy for me to let them control the search result relevance ). Here's a simplified query: SELECT p.ProductID AS ContentID , p.ProductName AS Title , p.ProductCode AS Subtitle , 100 AS Rank , p.ProductKeywords AS Keywords FROM Products AS p WHERE FREETEXT( p.ProductKeywords, @SearchPredicate ) I'm thinking something along the lines of replacing the RANK with: , 200 - INDEXOF(@SearchTerm) AS Rank This "should" rank the keyword results by their relevance I know INDEXOF isn't a SQL command... but it's something LIKE that I would like to accomplish. Am I approaching this the right way? Is it possible to do something like this? Does this make sense?

    Read the article

  • How can one convince a team to use a new technology (LinQ, MVC, etc )?

    - by Atomiton
    Obviously, it's easier to do with some developers, but I'm sure many of us are on teams that prefer the status quo. You know the type. You see some benefit in a piece of new technology and they prefer the tried and true methods. Try, for example, DBA/C# programmer the advantages of using LinQ ( not necessarily LinQ to SQL, just LinQ in general ). For example, When a project requirement is to be cross-platform... instead of thinking about how one can run Windows on a Mac through a VM Machine, introducing the idea of using relatively new Silverlight or creating it in Java ( as an option to look into ). I know most people don't like to be out of their comfort level, so it takes a bit of convincing, and not ALL new technology makes business sense... but how have you convinced your team to look at a new technology? What technologies have you successfully introduced to your workplace? What technologies do you think are hardest to introduce? ( I'm thinking paradigm-shifting ones, like MVC from WebForms... or new languages ) What strategies do you employ to make these new technologies appealing?

    Read the article

1 2  | Next Page >