Search Results

Search found 6524 results on 261 pages for 'the ever kid'.

Page 131/261 | < Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >

  • Incorporating libs into module pattern

    - by webnesto
    I have recently started using require.js (along with Backbone.js, jQuery, and a handful of other JavaScript libs) and I love the module pattern (here's a nice synopsis if you're unfamiliar: http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth). Something I'm running up against is best practices on incorporating libs that don't (out of the box) support the module pattern. For example, jQuery without modification is going to load into a global jQuery variable and that's that. Require.js recognizes this and provides an example project for download with a (slightly) modified version of jQuery to incorporate with a require.js project. This goes against everything I've ever learned about using external libs - never modify the source. I can list a ton of reasons. Regardless, this is not an approach I'm comfortable with. I have been using a mixed approach - wherein I build/load the "traditional" JS libraries in a "traditional" way (available in the global namespace) and then using the module pattern for all of my application code. This seems okay to me, but it bugs me because one of the real beauties of the module pattern (no globals) is getting perverted. Anyone else got a better solution to this problem?

    Read the article

  • What is the point of dynamic allocation in C++?

    - by Aerovistae
    I really have never understood it at all. I can do it, but I just don't get why I would want to. For instance, I was programming a game yesterday, and I set up an array of pointers to dynamically allocated little enemies in the game, then passed it to a function which updates their positions. When I ran the game, I got one of those nondescript assertion errors, something about a memory block not existing, I don't know. It was a run-time error, so it didn't say where the problem was. So I just said screw it and rewrote it with static instantiation, i.e.: while(n<4) { Enemy tempEnemy = Enemy(3, 4); enemyVector.push_back(tempEnemy); n++; } updatePositions(&enemyVector); And it immediately worked perfectly. Now sure, some of you may be thinking something to the effect of "Maybe if you knew what you were doing," or perhaps "n00b can't use pointers L0L," but frankly, you really can't deny that they make things way overcomplicated, hence most modern languages have done away with them entirely. But please-- someone -- What IS the point of dynamic allocation? What advantage does it afford? Why would I ever not do what I just did in the above example?

    Read the article

  • Learning OO for a C Programmer

    - by Holysmoke
    I've been programming professionally in C, and only C, for around 10 years in a variety of roles. As would be normal to expect, I understand the idioms of the language fairly well and beyond that also some of the design nuances - which APIs to make public, who calls what, who does what, what is supposed to reentrant and so on. I grew up reading 'Writing Solid Code', it's early C edition, not the one based on C++. However, I've never ever programmed in an OO language. Now, I want to migrate to writing applications for iPhone (maybe android), so want to learn to use Objective-C and use it with a degree of competence fitting a professional programmer. How do I wrap my head around the OO stuff? What would be your smallest reading list suggestion to me. Is there a book that carries some sort of relatively real world example OO design Objective-C? Besides, the reading what source code would you recommend me to go through. How to learn OO paradigm using Objective-C?

    Read the article

  • CLR and C# Learning Materials

    - by Gerry O'Brien
    Have you ever found that one book or resource that just brings it all home?  Seriously.  These are rare finds when you read the content and all the stars seem to align, you have those "Ah ha!" moments. Well, I have found that book and it is CLR via C#, Third Edition by Jeffrey Richter.  If you're not familiar with Wintellect, look them up.  This book is published by Microsoft Press and is the third edition of this title.  I'm in chapter 5 at the moment and already I have a better understanding of the CLR and how things work.  I'm a former Visual Basic MVP and C# is a language I learned as a result of projects I worked on at a software development company a few years ago.  Like a lot of VB programmers, I never went deep into the workings of the "behind the scenes" aspects and just focused on the applications. My next possible career move involves a deeper knowledge of the CLR and a .NET language.  This book is one that I will have my bookshelf for reference long after I have read that last page. Gerry

    Read the article

  • Choppy USB mice on just one of USB ports

    - by user20532
    I've got Lenovo b560 laptop with latest, properly updated Kubuntu on it (11.04 natty, kernel 2.6.38-8-generic). It has three USB2.0 ports onboard. I usually plug a mouse into one of them (I've got 3 different mice - in office, at home and for when on the go). Sometimes, usually after laptop awakening from sleep, the mouse still works but cursor movements are choppy, as if the processor was extremely loaded (it's usually not). I found that if I re-plug the mouse cord into the other USB port, it works just fine. If I plug it back to problematic port, it is still choppy and remains choppy until next boot. Of course I want my mice to always work fine. Problem is: I cannot reproduce this behavior for sure, it happens sporadically but regularly. I use different USB ports (problem has ever happened on each of them since), I use different mice (each has failed me this way at least once), I cannot generally find what exactly is going wrong and why plugging to different port fixes the mouse instantly. So I'd like to hear at least clues where to look at, what to try to identify my problem. A bit of update: while beginning this post, I had the issue once again. I have just replugged the mouse back to problematic port and it is not recognized at all. On the other port it works smoothly.

    Read the article

  • Font corruption: lines through characters

    - by Aibara Iduas
    I have an odd problem where a one-pixel high white line is displayed through certain letters of text. Almost always only a single character type is affected at once, and only in one font size (though that size can change over time). Most of the time things are fine, but this happens several times a day. It's been happening ever since I upgraded to 10.10. I have noticed few patterns: It might be a problem with Firefox (I'm currently using the nightly ppa, but it occurred in 3.6 also) - but this could just be because I spend most of my time on my computer either at a browser or text editors. I seem to remember it happening with the buttons on various Gnome dialogs. It never occurs in text I've typed, be it an email, url bar, etc. In Firefox it happens across tabs, and the problem remains even if they are closed or reloaded; only restarting the program can fix it. Two examples (in the first, only the larger "r" is corrupted): Any help would be appreciated, thanks.

    Read the article

  • Attributes of an Ethical Programmer?

    - by ahmed
    Software that we write has ramifications in the real world. If not, it wouldn't be very useful. Thus, it has the potential to sweep across the world faster than a deadly manmade virus or to affect society every bit as much as genetic manipulation. Maybe we can't see how right now, but in the future our code will have ever-greater potential for harm or good. Of course, there's the issue of hacking. That's clearly a crime. Or is it that clear? Isn't hacking acceptable for our government in the event of national security? What about for other governments? Cases of life-and-death emergency? Tracking down deadbeat parents? Screening the genetic profile of job candidates? Where is the line drawn? Who decides? Do programmers have responsibility for how their code is used? What if a programmer writes code to pry into confidential information or copy-protected material? Does he bear responsibility along with the person who used the program? What about a programmer who knowingly or unknowingly writes code to "fix the books?" Should he be liable?

    Read the article

  • Is learning how to use C (or C++) a requirement in order to be a good (excellent) programmer?

    - by blueberryfields
    When I first started to learn how to program, real programmers could write assembly in their sleep. Any serious schooling in computer science would include a hefty bit of training and practice in programming using assembly. That has since changed, to the point where I see Computer Science degrees with assembly, if included at all, is relegated to one assignment, and one chapter, for a total of two weeks' work out of 4 years' schooling. C/C++ programming seems to have followed a similar path. I'm no longer surprised to interview university graduates who have not spent more than two weeks programming in C++, and have only read of C in a book somewhere. While the most serious CS degrees still seem to include significant time learning and using one or both of the languages, the trend is clearly towards less enforced C/C++ in school. It's clearly possible to make a career producing good work without ever reading or writing a single line of C or C++ code. Given all of that, is learning the two languages worth the effort? Are they at all required to excel? (beyond the obvious, non-language specific advice, such as "a good selection of languages is probably important for a comprehensive education", and "it's probably a good idea to keep trying out and learning new languages throughout a programmers' career, just to stretch the gray cells")

    Read the article

  • How can I making Twitter, Facebook and Reddit share buttons load last?

    - by Daniel Bingham
    I have a website with a number of pages that sport twitter, facebook and reddit share buttons. They take forever to load and until they do the rest of the page doesn't load. So how I can make them load last? Currently, they are loaded something like this: <div class="item"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="FridgeToFood" data-related="danielBingham:Recipe and update tweets from Fridge to Food.">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div> <div class="item"><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like layout="box_count" width="40"></fb:like></div> <div class="item"> <script type="text/javascript">reddit_target='recipes';</script> <script type="text/javascript" src="http://reddit.com/static/button/button2.js"></script> </div> They are in a div called "shareWrapper" and are loading to one side of the page. The buttons load where ever the script code is placed. As far as I know, I can't place the script code at the bottom of the page and move the resulting buttons after the fact. I want them to appear near the top, which right now means they are stopping everything below them from loading for several seconds. I tried loading them using javascript, but using JQuery's $(document).ready(), but that failed. It seems to leave the page in some sort of loading loop from which it never emerges. Are there other ways to get these to load last?

    Read the article

  • Comb Over

    - by Tim Dexter
    Being some what follicly challenged, and to my wife's utter relief, the comb over is not something I have ever considered. The title is a tenuous reference to a formatting feature that Adobe offers in their PDF documents. The comb provides the ability to equally space a string of characters on a pre-defined form layout so that it fits neatly in the area. See the numbers above are being spaced correctly. Its not a function of the font but a property of the form field. For the first time, in a long time I had the chance to build a PDF template today to help out a colleague. I spotted the property and thought, hey, lets give it a whirl and see in Publisher supports it? Low and behold, Publisher handles the comb spacing in its PDF outputs. Exciting eh? OK, maybe not that exciting but I was very pleasantly surprise to see it working. I am reliably informed, by Leslie, BIP Evangelist and Tech Writer that, this feature was introduced from version 10.1.3.4.2 onwards. Official docs and no mention of comb overs here. Happy Combing!

    Read the article

  • Fresh install on SSD with Ubuntu and Windows Vista, using whole disk encryption for Ubuntu

    - by nategator
    I would like to do a fresh install on a OCZ Vertex Plus R2 SSD 60GB drive I purchased on the cheap. Since the AES-encryption looks like it may not work optimally for this drive, I would like to set up a dual-boot to Windows Vista (the only Windows copy I have for clean install purposes) and Ubuntu 12.04 with the best encryption scheme possible. My plan is to have Windows around just in case I need to use a program that won't work with Wine and Ubuntu as my daily OS with all of my information secured in case the laptop is ever stolen or sold. Although this setup will not provide a lot of space, I think I can squeeze both OSes and have enough for second-computer office tasks. So, my questions are: Which OS should I install first, Ubuntu or Vista? Any special considerations when partitioning the drive? How should I install Ubuntu to ensure full disk encryption for the Linux partition(s) and or my daily computing? Is there a significant performance upgrade with doing a solo install of Ubuntu instead of a dual boot setup? Will TRIM, for example, work correctly? Are there any significant security concerns with going the route of a dual-boot, other than the fact that any activity on Windows may be fully recoverable if the drive is stolen or sold? Thanks in advance!

    Read the article

  • Who is a CMS really for?

    - by Eirc man
    I have started lately discovering Content Management Systems, and I was wondering, who is really CMS for? What I mean by that: is it only for companies, small businesses or individuals, that pays a contractor to make a website that it's users can just upload content through a easy interface. Or is it used also by programmers, to build their own websites, projects? Would a Facebook, Tweeter, StackExhange ever started by using a CMS, a very powerful one for example. Would you as a programmer build your own "fancy" website on top of a CMS, for example like Typo3, or you would build it from scratch? P.S To be more clear is a summary: What I mean to begin with is, would I as a developer choose a CMS to develop a website that can be scaled with a big base of users, be stuck if I choose to start with a CMS system. What if I build a website using CMS, and the website explodes in popularity, and then I wanted to add much more functionality that I have planed, is it possible that the CMS will limit the growth, because it might have not been build for that kind of scale?

    Read the article

  • Welcome to the Red Gate BI Tools Team blog!

    - by BI Tools Team
    Welcome to the first ever post on the brand new Red Gate Business Intelligence Tools Team blog! About the team Nick Sutherland (product manager): After many years as a software developer and project manager, Nick took an MBA and turned to product marketing. SSAS Compare is his second lean startup product (the first being SQL Connect). Follow him on Twitter. David Pond (developer): Before he joined Red Gate in 2011, David made monitoring systems for Goodyear. Follow him on Twitter. Jonathan Watts (tester): Jonathan became a tester after finishing his media degree and joining Xerox. He joined Red Gate in 2004. Follow him on Twitter. James Duffy (technical author): After a spell as a writer in the video game industry, James lived briefly in Tokyo before returning to the UK to start at Red Gate. What we're working on We launched a beta of our first tool, SSAS Compare, last month. It works like SQL Compare but for SSAS cubes, letting you deploy just the changes you want. It's completely free (for now), so check it out. We're still working on it, and we're eager to hear what you think. We hope SSAS Compare will be the first of several tools Red Gate develops for BI professionals, so keep an eye out for more from us in the future. Why we need you This is your chance to help influence the course of SSAS Compare and our future BI tools. If you're a business intelligence specialist, we want to hear about the problems you face so we can build tools that solve them. What do you want to see? Tell us! We'll be posting more about SSAS Compare, business intelligence and our journey into BI in the coming days and weeks. Stay tuned!

    Read the article

  • Failed Project: When to call it?

    - by Dan Ray
    A few months ago my company found itself with its hands around a white-hot emergency of a project, and my entire team of six pulled basically a five week "crunch week". In the 48 hours before go-live, I worked 41 of them, two back to back all-nighters. Deep in the middle of that, I posted what has been my most successful question to date. During all that time there was never any talk of "failure". It was always "get it done, regardless of the pain." Now that the thing is over and we as an organization have had some time to sit back and take stock of what we learned, one question has occurred to me. I can't say I've ever taken part in a project that I'd say had "failed". Plenty that were late or over budget, some disastrously so, but I've always ended up delivering SOMETHING. Yet I hear about "failed IT projects" all the time. I'm wondering about people's experience with that. What were the parameters that defined "failure"? What was the context? In our case, we are a software shop with external clients. Does a project that's internal to a large corporation have more space to "fail"? When do you make that call? What happens when you do? I'm not at all convinced that doing what we did is a smart business move. It wasn't my call (I'm just a code monkey) but I'm wondering if it might have been better to cut our losses, say we're not delivering, and move on. I don't just say that due to the sting of the long hours--the company royally lost its shirt on the project, plus the intangible costs to the company in terms of employee morale and loyalty were large. Factor that against the PR hit of failing to deliver a high profile project like this one was... and I don't know what the right answer is.

    Read the article

  • Can I use a 302 redirect to serve up static content from a url with escaped_fragment?

    - by Starfs
    We would like to serve up seo-friendly ajax-driven content. We are following this documentation. Has anyone ever tried to write a 302 redirect into the htaccess file, that takes the '?_escaped_fragment=' string and send that to a static page? For example /snapshot/yourfilename/ How will Google react to this? I've gone through the documentation and it's not very clear. The below quote is from Google's documentation this is what I find. I'm not sure if they are saying that you can redirect the _escaped_fragment_ url to a different static page, or if this is to redirect the hashtag URL to static content? Thoughts? From Google's site: Question: Can I use redirects to point the crawler at my static content? Redirects are okay to use, as long as they eventually get you to a page that's equivalent to what the user would see on the #! version of the page. This may be more convenient for some webmasters than serving up the content directly. If you choose this approach, please keep the following in mind: Compared to serving the content directly, using redirects will result in extra traffic because the crawler has to follow redirects to get the content. This will result in a somewhat higher number of fetches/second in crawl activity. Note that if you use a permanent (301) redirect, the url shown in our search results will typically be the target of the redirect, whereas if a temporary (302) redirect is used, we'll typically show the #! url in search results. Depending on how your site is set up, showing #! may produce a better user experience, because the user will be taken straight into the AJAX experience from the Google search results page. Clicking on a static page will take them to the static content, and they may experience avoidable extra page load time if the site later wants to switch them to the AJAX experience.

    Read the article

  • Sorting objects before rendering

    - by dreta
    I'm trying to implement a scene graph and in all the articles i've come across there is talk about object sorting. So you'd sort your objects by "material" for example. Now untill i sat down and started implementing it, i kind of took this for granted, because it made sense. But now i'm wondering what does sorting actually change? In my engine, i have a manager for UBOs, i use those to store data that'll be shared between programs, at the moment that only involves time, camera and projection matrices and lights (i'm not worrying about managing which lights affect which objects ATM). Now for each model i have to change the model to world matrix uniform, no sorting is going to change that. So is the jump from changing this matrix to also setting a material for each object that bad? I vaguely remember reading somewhere that each time you change something in the pipeline, it has to get flushed and that can cause performance issues. But for each drawing call i'm setting up a model to world matrix anyway, so what sense does it make to ever be concerned about this? BTW is there any information about whether changing a uniform and calling glBufferSubData is more (or less) expensive.

    Read the article

  • Unwanted Chinese language got set in system settings

    - by Registered User
    I was discussing on the Ubuntu users list how to type in in Hindi (Indic language) in Libre Office and about a package installation problem. I have made some changes in system settings, following suggestions by some users. However, this morning when I did a reboot I am unable to see English as my default language. My system is showing some Chinese characters which I do not understand. All I wanted was to use Libre Office for a particular document in Hindi. What happened is that even Gmail is opening in Chinese. The system settings folder and others are also opening in Chinese. I am unable to use the system now. I have uploaded the snapshots here: please have a look. Upon a reboot, I was asked to rename all folders. Gmail opening in Chinese This is how menu on my system looks: half English and half Chinese Notice that in the third snapshot the calendar and menu are appearing in Chinese. I want the original US English menus and folder names back. I just wanted to type a document with Lohit Hindi font in Libre Office. I use Ubuntu 11.10. I do not use Unity, only Gnome desktop. I installed gnome-session-fallback a long time back and have been using that ever since. How do I get back to all English submenus and English folder names? I have a US English Keyboard and I use only US English. This thing which is now somehow set is unwanted.

    Read the article

  • Everything has an Interface [closed]

    - by Shane
    Possible Duplicate: Do I need to use an interface when only one class will ever implement it? I am taking over a project where every single real class is implementing an Interface. The vast majority of these interfaces are implemented by a single class that share a similar name and the exact same methods (ex: MyCar and MyCarImpl). Almost no 2 classes in the project implement more than the interface that shares its name. I know the general recommendation is to code to an interface rather than an implementation, but isn't this taking it a bit too far? The system might be more flexible in that it is easier to add a new class that behaves very much like an existing class. However, it is significantly harder to parse through the code and method changes now require 2 edits instead of 1. Personally, I normally only create interfaces when there is a need for multiple classes to have the same behavior. I subscribe to YAGNI, so I don't create something unless I see a real need for it. Am I doing it all wrong or is this project going way overboard?

    Read the article

  • How to forward AIM to Gmail

    - by iamjames
    Still have an old AIM email address lying around and would like to forward it to Gmail?  Here's how: 1.  Login to your AIM and click on Settings on the far right 2.  In the left menu click IMAP and POP  3.  This shows you your IMAP and POP setup information for AIM.  We're going to put this into your Gmail account so your Gmail account will check your AIM account and download all AIM emails. 4.  Login to your Gmail, click Settings and click Accounts and Import 5.  Click "Import mail and contacts".  A new window will pop up asking what account you want to import.  Enter your AIM Email Address and click Continue 6.  The next page asks for your password.  Enter your password and click Continue.  Step 2 asks your Import options.  I'd put a checkmark in "Leave a copy of retrieved message on server".  That way all your mail is still stored on AIM if you ever need it. 7.  Click Start import and you're done.  Next screen says it make take several hours up to 2 days before you start seeing imported messages and can check the status at Settings > Accounts and Import

    Read the article

  • December 2012 OTN Member Offers

    - by Cassandra Clark - OTN
    Our partners have answered the special offer call just in time for you to either shop for the tech professional in your life or share the list below with someone who keeps asking you what you want for the holidays.  Go right to the Oracle Technology Network Member Discount Page or read on for more details. Oracle  Store has extended their 10% Savings through December 31st 2012.Oracle Press - Oracle Technology Network members get 40% off the latest Oracle Press book by Oracle ACE Directors Ben Prusinski and Gustavo Gonzalez, Oracle E-Business Suite Financials Handbook, Third Edition in print and ebook format. CRC Press - Has added 3 NEW titles!  Get 20% off the below title at checkout. Secure Java: For Web Application Development Open Source Data Warehousing and Business Intelligence Developing Essbase Applications: Advanced Techniques for Finance and IT Professional Oracle Embedded Programming and Application Development Packt Publishing - Get 25% off the print books and get 35% off the eBooks listed below. You will need to be logged in for the discounts to apply at checkout and codes expire December 31st 2012. Getting Started with Oracle Data Integrator 11g: A Hands-On Tutorial Oracle Business Intelligence Enterprise Edition 11g: A Hands-On Tutorial Oracle Certified Associate, Java SE 7 Programmer Study Guide Safari Online-  Give the Gift of Knowledge This Holiday SeasonGive your friends and colleagues the gift of Safari Books Online! With an ever-expanding library of books and videos from more than 100 publishers (including Oracle Press), a subscription to Safari Books Online is the gift that always fits, helping your friends learn new skills and stay current. Starting at $42.99, gift subscriptions are available for 1, 3, 6 and 12 months. Get all of this and more at the Oracle Technology Network Member Discount Page!

    Read the article

  • NoSQL

    - by NoReasoning
    Last night, (Tuesday, June 28), at the KC .NET User group meeting, George Westwater gave a terrific presentation on NoSQL. The best way to define it (the best way is to see George explain it, and he says he will record his presentation and make it available through his blog – link above)  is databases  that does not use relational technology. And his point, and this is true – I have been around awhile – is that non-relational databases have been used for over 50 years in the business. He points out that Wall Street firms have been using non-relational technology ever since they started using computers. IBM still fully supports IMS, now in version 11 (12 is in beta), because these firms are still using this product and will continue to do so for a long time. Of course, like a lot of computer business technology, there are a lot of new NoSQL products available these days, simply as a reaction to the problems of scaling relational databases for internet use. As a result, it almost looks as though NoSQL is something new. And there are a lot, I mean a LOT, I mean a L-O-T , of new products out there for this technology. The best resource to cover all of these products is http://nosql-database.org/, which has a huge listing of what is available. My interest in the subject is primarily due to my interest in Windows Azure and the fact that Windows Azure storage is all non-relational, even the table storage. It is very fascinating and most of all, far cheaper than using SQL Azure for storage in the “cloud."

    Read the article

  • Is this an acceptable approach to undo/redo in Python?

    - by Codemonkey
    I'm making an application (wxPython) to process some data from Excel documents. I want the user to be able to undo and redo actions, even gigantic actions like processing the contents of 10 000 cells simultaneously. I Googled the topic, and all the solutions I could find involves a lot of black magic or is overly complicated. Here is how I imagine my simple undo/redo scheme. I write two classes - one called ActionStack and an abstract one called Action. Every "undoable" operation must be a subclass of Action and define the methods do and undo. The Action subclass is passed the instance of the "document", or data model, and is responsible for committing the operation and remembering how to undo the change. Now, every document is associated with an instance of the ActionStack. The ActionStack maintains a stack of actions (surprise!). Every time actions are undone and new actions are performed, all undone actions are removed for ever. The ActionStack will also automatically remove the oldest Action when the stack reaches the configurable maximum amount. I imagine the workflow would produce code looking something like this: class TableDocument(object): def __init__(self, table): self.table = table self.action_stack = ActionStack(history_limit=50) # ... def delete_cells(self, cells): self.action_stack.push( DeleteAction(self, cells) ) def add_column(self, index, name=''): self.action_stack.push( AddColumnAction(self, index, name) ) # ... def undo(self, count=1): self.action_stack.undo(count) def redo(self, count=1): self.action_stack.redo(count) Given that none of the methods I've found are this simple, I thought I'd get the experts' opinion before I go ahead with this plan. More specifically, what I'm wondering about is - are there any glaring holes in this plan that I'm not seeing?

    Read the article

  • Using runtime generic type reflection to build a smarter DAO

    - by kerry
    Have you ever wished you could get the runtime type of your generic class? I wonder why they didn’t put this in the language. It is possible, however, with reflection: Consider a data access object (DAO) (note: I had to use brackets b/c the arrows were messing with wordpress): public interface Identifiable { public Long getId(); } public interface Dao { public T findById(Long id); public void save(T obj); public void delete(T obj); } Using reflection, we can create a DAO implementation base class, HibernateDao, that will work for any object: import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; public class HibernateDao implements Dao { private final Class clazz; public HibernateDao(Session session) { // the magic ParameterizedType parameterizedType = (ParameterizedType) clazz.getGenericSuperclass(); return (Class) parameterizedType.getActualTypeArguments()[0]; } public T findById(Long id) { return session.get(clazz, id); } public void save(T obj) { session.saveOrUpdate(obj); } public void delete(T obj) { session.delete(obj); } } Then, all we have to do is extend from the class: public class BookDaoHibernateImpl extends HibernateDao { }

    Read the article

  • Software licensing template that gives room for restricting usage to certain industries/uses of software/source

    - by BSara
    *Why this question is not a duplicate of the questions specified as such: I did not ask if there was a license that restricted specific uses and I did not ask if I could rewrite every line of any open source project. I asked very specifically: "Does there exist X? If not, can I Y with Z?". As far as I can tell, the two questions that were specified as duplicates do not answer my specific question. Please remove the duplicate status placed on the question. I'm developing some software that I would like to be "semi" open source. I would like to allow for anyone to use my software/source unless they are using the software/source for certain purposes. For example, I don't want to allow usage of the software/source if it is being used to create, distribute, view or otherwise support pornography, illegal purposes, etc. I'm no lawyer and couldn't ever hope to write a license myself nor do I have to time to figure how to best do this. My question is this: Does there exist a freely available license or a template for a license that I can use to license my software under they conditions explained above just like one can use the Creative Commons licenses? If not, am I allowed to just alter one of Creative Commons licenses to meet my needs?

    Read the article

  • Trouble WIth Immediate Shutdown in Ubuntu 13.10 with Cinnamon

    - by Sneha429
    Just installed Ubuntu on my family's computer. I thought the Cinnamon desktop environment would be better for my parents who have only ever used Windows. Everything works great until I try to shut down. Shutting down while in Cinnamon desktop brings up a prompt window that says it will shutdown in 60 seconds and gives the option to either suspend or cancel. The suspend button does not suspend the computer. Allowing the timer to countdown merely logs the current user out. Under power management, I have selected Shutdown Immediately for Power button action. I still get the same prompt. I have tried toggling between the other options, but regardless of what option is selected, the shutdown button always brings up the suspend or cancel prompt with no way to shutdown immediately. I would prefer not to use the power button for this as it is partially concealed with the computer desk. The fastest way to shutdown is to log out (which says it will log out in 60 seconds but also has log out and cancel buttons, so I can immediately log out) and then shutdown. I would prefer to have it automatically shut down. Any and all suggestions are appreciated. Thank you!

    Read the article

< Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >