Search Results

Search found 28877 results on 1156 pages for 'do good'.

Page 59/1156 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • what's a good way to implement something that looks like Dictionary<string, string, Dictionary<strin

    - by jcollum
    I've got a data structure that is Key, Value, OtherValues(key, Value). So the OtherValues are attached to the first Key and aren't always there. I can do this as Dictionary<Key, ValueAndListOfOptionalValues> where ValueAndListOfOptionalValues is a class with a string and a Dictionary<string, string>. I'm wondering if that's really the best way to do it? Sometimes I think that I'm missing some important classes in the Generics namespace, maybe there are better classes out there that I'm not aware of.

    Read the article

  • What are some good resources for WebForms MVP?

    - by Nissan Fan
    I've seen a little buzz on ASP.NET Web Forms MVP, but where can I get resources? http://webformsmvp.com is pretty much stubbed out for now. This appears to be a compelling refresh of the Web Forms paradigm and bring into the fold things that make ASP.NET MVC great. I hear it's going to be put out there at MIX10 this week, but anyone have any useful sites/references?

    Read the article

  • Is this SQL select code following good practice?

    - by acidzombie24
    I am using sqlite and will port to mysql (5) later. I wanted to know if I am doing something I shouldnt be doing. I tried purposely to design so I'll compare to 0 instead of 1 (I changed hasApproved to NotApproved to do this, not a big deal and I haven't written any code). I was told I never need to write a subquery but I do here. My Votes table is just id, ip, postid (I don't think I can write that subquery as a join instead?) and that's pretty much all that is on my mind. Naming conventions I don't really care about since the tables are created via reflection and is all over the place. select id, name, body, upvotes, downvotes, (select 1 from UpVotes where IPAddr=? AND post=Post.id) as myup, (select 1 from DownVotes where IPAddr=@0 AND post=Post.id) as mydown from Post where flag = '0' limit ?, ?"

    Read the article

  • Standalone application in C, a good idea?

    - by chutsu
    The term has several definition according to Wikipedia, however what I'm really interested in is creating a program that has all its needed dependencies included within the source folder, so the end user doesn't need to install additional libraries for the app to install. For example, how Mac apps has all its dependencies all within the program itself already... or is there a function that autotools does this? I'm programming in the Linux environment...

    Read the article

  • What's a good, threadsafe, way to pass error strings back from a C shared library

    - by PerilousApricot
    Hello, all- I'm writing a C shared library for internal use (I'll be dlopen()'ing it to a c++ application, if that matters). The shared library loads (amongst other things) some java code through a JNI module, which means all manners of nightmare error modes can come out of the JVM that I need to handle intelligently in the application. Additionally, this library needs to be re-entrant. Is there in idiom for passing error strings back in this case, or am I stuck mapping errors to integers and using printfs to debug things? Thanks!

    Read the article

  • A good way to look back arbitrary number of items in the Array.Fold in F#

    - by tk
    In the folder function of the Array.Fold operation, i want to look back arbitrary number of items. The only way i can figure out is like this. let aFolder (dataArray, curIdx, result) (dataItem) = let N = numItemsToLookBack(result, dataItem) let recentNitems = dataArray.[curIdx - n .. curIdx - 1] let result = aCalc(result, dataItem, recentNitems ) dataArray, curIdx + 1, result myDataArray | Array.fold aFolder (myDataArray, 0, initResult) As you can see, I passed the whole dataArray and index to the folder function to get the "recentNitems". But this way allows the folder function to access not only preceding data, but also the following data. Is there a better (or more functional) way?

    Read the article

  • What is a good program for storing “chunks” of commonly used source code

    - by Rob Wiley
    I've looked at CodeLocker (poorly styled and relatively unflexible, but free) and Source Code Library (Overzone software - very nicely styled, looks flexible, but very expensive - $80). Ideally, I'm looking for a relatively simple, inexpensive program (not an online website) that I can save text data (source code) with a title and keywords, maybe even a description. It would also have some type of search functionality.

    Read the article

  • What is a good "Error Checking" Pattern (Java)?

    - by Jack
    I'll explain what I mean by input error checking. Say you have a function doSomething(x). If the function completes successfully doSomething does something and returns nothing. However, if there are errors I'd like to be notified. That is what I mean by error checking. I'm looking for, in general, the best way to check for errors. I've thought of the following solutions, each with a potential problem. Flag error checking. If doSomething(x) completes successfully return null. Otherwise, it returns a boolean or an error string. Problem: Side effects. Throwing an exception. Throw an exception if doSomething(x) encounters an error. Problem: If you are performing error checking for parameters only, throwing an IllegalArgumentExceptionseems inappropriate. Validating input prior to function call. If the error checking is only meant for the parameters of the function, then you can call a validator function before calling the doSomething(x) function. Problem: What if a client of the class forgets to call the validator function before calling doSomething(x)? I often encounter this problem and any help or a point in the right direction would be much appreciated.

    Read the article

  • Interface with inner implementation - good or bad

    - by dermoritz
    I am working on a project with many someInterface - someInterfaceImpl-pairs. Some days ago I got the idea (probably inspired by reading some objective c code) to include the default implementations as an inner class. Now some colleagues (all with much more java experience than me) saw this idea - feedback was between shocked and surprised ("this is working?"). I googled around a bit but didn't find much evidence of usefulness of this "pattern" (personal i like it): pdf-paper and a faq about code style What do you think - especially in those cases where an "default" implementation is tightly coupled to an interface. Update i just found this: Java Interface-Implementation Pair (see accepted answer)

    Read the article

  • Good or Bad experiences with CryptoLicensing?

    - by dr. evil
    I'm planning to buy CryptoLicensing but before buying it I'd like to get some feedbacks if anyone tried it before. Also it'd be interesting if anyone cracked it or spotted an easy hack against it. I've seen some other SO questions regarding the choosing a .NET licensing component but if you currently happy with another component it'd be nice to hear your experience. It's just quite hard to nail this without going through a long trial.

    Read the article

  • Naked Objects. Good or Bad

    - by Midhat
    I have recently been exposed to naked objects. It looks like a pretty decent framework. However I do not see it in widespread use like say, Spring. So why is this framework not getting any mainstream application credit. What are its shortcomings as you see?

    Read the article

  • Could you please suggest any good books for Java EE

    - by attal
    Hi people, I am comfortable with Java SE 6 and I wanted to go deeper into Java by learning Java EE 6. However, I am confused and I don't know which book(s) should I read to master Java EE 6 (I have never learned Java EE previously). Could you please suggest any appropriate book(s) to help me master Java EE completely? Thank you for reading

    Read the article

  • A good way to release fixtures

    - by Luke
    Hey, my problem is as follows, I am trying to create code where a set of sporting fixtures are created with dates on. Say I have 8 teams, with 7 rounds of fixtures. I have generated the fixtures, but want to add a date generation on them. So if i had 7 rounds, I would put 28 days and it would make each round 4 days from now, 8 days from now, etc. What would be the best way to go about doing this? Thanks

    Read the article

  • Seeking good practice advice: multisite in Drupal

    - by deanloh
    I'm using multisite to host my client sites. During development stage, I use subdomain to host the staging site, e.g. client1.mydomain.com. And here's how it look under the SITES folder: /sites/client1.mydomain.com When the site is completed and ready to go live, I created another folder for the actual domain, e.g. client1.com. Hence: /sites/client1.com Next, I created symlinks under client1.com for FILES and SETTINGS.PHP that points to the subdomain i.e. /sites/client1.com/settings.php --> /sites/client1.mydomain.com/settings.php /sites/client1.com/files --> /sites/client1.mydomain.com/files Finally, to prevent Google from indexing both the subdomain and actual domain, I created the rule in .htaccess to rewrite client1.mydomain.com to client1.com, therefore, should anyone try to access the subdomain, he will be redirected to the actual domain. This above arrangement works perfectly fine. But I somehow feel there is a better way to achieve the above in much simplified manner. Please feel free to share your views and all advice is much appreciated.

    Read the article

  • How good is the Rails sanitize() method?

    - by Horace Loeb
    Can I use ActionView::Helpers::SanitizeHelper#sanitize on user-entered text that I plan on showing to other users? E.g., will it properly handle all cases described on this site? Also, the documentation mentions: Please note that sanitizing user-provided text does not guarantee that the resulting markup is valid (conforming to a document type) or even well-formed. The output may still contain e.g. unescaped ’<’, ’’, ’&’ characters and confuse browsers. What's the best way to handle this? Pass the sanitized text through Hpricot before displaying?

    Read the article

  • Any good class diagram editors out there for Java (not UML)

    - by user85116
    I'm looking for an editor that can create class diagrams, similar to the typical UML class diagram, but specifically for java (so using java terminology; instead of terms like "generalization, realization etc", we use the java equivalents "interface, abstract class, extends etc"). I've looked into UML several times, but each time I've been turned off by the shear amount of "stuff" that comes with UML. I just want to be able to model my java classes quickly and intuitively, without getting bogged down by all the cruft that comes with UML. Preferably, it would come with a source reader that can keep the diagram up to date, and with a few nice features like "show only public methods in this class" etc. As well, it would automatically "know" about the classes in the standard java library, and possibly even be able to read classes from jars. Performance is also a big thing for me, I don't like having to wait 2 seconds for a popup menu to appear, or watch the diagram jerk crazily while resizing an element in the model. What do you think, am I asking too much?

    Read the article

  • Good book for Flex 4?

    - by John Isaacks
    I read the O'Really Book: Programming Flex 3 and I thought it was awesome. I am now migrating to Flex 4 and wanted to read a great book for Flex 4. There are many Flex 4 books out there and I really just want to read 1 to get me up and running fast. So if anyone can share/recommend some books that would be great!

    Read the article

  • Jquery push data to the good row.

    - by marharépa
    Hi! This is my big problem. This script put the information to a table. function handleAccountFeed(result) { var entries = result.feed.getEntries(); var outputTable = ['<table><tr>', '<th>Account Name</th>', '<th>Profile Name</th>', '<th>Profile ID</th>', '<th>Table Id</th></tr>']; for (var i = 0, entry; entry = entries[i]; ++i) { var row = [ entry.getPropertyValue('ga:AccountName'), entry.getTitle().getText(), entry.getPropertyValue('ga:ProfileId'), entry.getTableId().getValue() ].join('</td><td>'); outputTable.push('<tr><td>', row, '</td></tr>'); } outputTable.push('</table>'); document.getElementById('outputDiv').innerHTML = outputTable.join(''); } I've got an own SMARTY template, which makes a table: <table id="stuffs"> <tbody> {section name=i loop=$ownsites} <tr><td>{$ownsites[i].id}</td><td>{$ownsites[i].domain}</td><td>PLACE</td></tr> {/section} <tbody> </table> I'd like to put the TableId (getTableId().getValue()) to that row's PLACE where {$ownsites[i].domain} is equal to the jquery row's Title (getTitle().getText()) How can i do this within this jQuery script?

    Read the article

  • Is it good to use JQuery's validation plugin?

    - by kwokwai
    Hi all, I am learning JQuery, and I have checked out that JQUery has got a validation plugin. http://docs.jquery.com/Plugins/Validation#Validate_forms_like_you.27ve_never_been_validating_before.21 To use it, users have to include another script file in the Head tag in HTML. I am thinking if this will cause any code collisions to the codes in the validation plugin when more and more javascript files are included. Should I use JQuery to write myself new customed functions for checking data input from users or use the JQuery data validation plugin? Please advise.

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >