Search Results

Search found 3286 results on 132 pages for 'piece'.

Page 25/132 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • creating object parameters in {}?

    - by RealityDysfunction
    I am trying to decode a piece of code from a book: List<Person> people = new List<Person>() { new Person {FirstName="Homer",LastName="Simpson",Age=47}, new Person {FirstName="Marge",LastName="Simpson",Age=45} }; Person is just a simple class they made, with a bunch of fields: Name, Last Name, etc... What I don't understand is, don't we send parameters to a constructor of Person in non-curly brackets? I tried replicating this code, but it doesn't seem to fly, any takers? Thanks for input.

    Read the article

  • Using source code with no license

    - by nathansizemore
    I've recently come across a publicly viewable project on Github that has no license associated with it. In this repo, there is a file with the logic and most of the code needed to work as a piece of a project I am working on. Not verbatim, but about 60% of it I'd like to use with various modifications. Once my code base is a little bit more stable, I plan to release what I've done under the WTFPL License. I've emailed the repo owner, and so far have not gotten a reply. I know I have the rights to fork the repo, but if I release a stripped down and modified version of the other project's file with mine, under the WTFPL, am I infringing on copyrights? Per Github's Terms of Service, by submitted a project on Github and making it viewable to the public, you are allowing other users to see and fork your project. Doesn't say anything about modifying, distributing, or using the fork. And at what point of modification to the original does it become owned by me?

    Read the article

  • disable shutdown/suspend if there is other user logged in via ssh

    - by Denwerko
    I remember that in versions of ubuntu around 9.04 was possible to disable user to shutdown ( and maybe suspend too ) system if there was other user logged in.Something like policykit or similar. Is it possible to do in 11.04 ? Thanks edit: if someone needs ( for own risk ), little change in /usr/lib/pm-utils/bin/pm-action will allow user to suspend machine if he is only user logged in or when user will run sudo pm-suspend. Probably not best piece of code, but for now works. diff -r 805887c5c0f6 pm-action --- a/pm-action Wed Jun 29 23:32:01 2011 +0200 +++ b/pm-action Wed Jun 29 23:37:23 2011 +0200 @@ -47,6 +47,14 @@ exit 1 fi +if [ "$(id -u )" == 0 -o `w -h | cut -f 1 -d " " | sort | uniq | wc -l` -eq 1 ]; then + echo "either youre root or root isnt here and youre only user, continuing" 1&2 + else + echo "Not suspending, root is here or there is more users" 1&2 + exit 2 + fi + + remove_suspend_lock() { release_lock "${STASHNAME}.lock" Question still stands, is it possible to forbid shutdown or suspend when there is more than one user logged in ( without rewriting system file )?

    Read the article

  • Lean/Kanban *Inside* Software (i.e. WIP-Limits, Reducing Queues and Pull as Programming Techniques)

    - by Christoph
    Thinking about Kanban, I realized that the queuing-theory behind the SW-development-methodology obviously also applies to concurrent software. Now I'm looking for whether this kind of thinking is explicitly applied in some area. A simple example: We usually want to limit the number of threads to avoid cache-thrashing (WIP-Limits). In the paper about the disruptor pattern[1], one statement that I found interesting was that producer/consumers are rarely balanced so when using queues, either consumers wait (queues are empty), or producers produce more than is consumed, resulting in either a full capacity-constrained queue or an unconstrained one blowing up and eating away memory. Both, in lean-speak, is waste, and increases lead-time. Does anybody have examples of WIP-Limits, reducing/eliminating queues, pull or single piece flow being applied in programming? http://disruptor.googlecode.com/files/Disruptor-1.0.pdf

    Read the article

  • Is it unwise to blacklist an IP address?

    - by hawbsl
    We have a form on a commercial website which has been abused (but only once or twice) by someone from a particular IP address. A colleague wants to blacklist that IP address from the website. Seems to me that's overkill, and that there's a risk that genuine customers sharing that same IP address would be blacklisted too. I suppose a big part of my question is how many people might be sharing that same IP address and could be affected by our blacklist. I suspect that's a "how long's a piece of string" question but some ballpark answer would be really helpful. We're in the UK if that's significant.

    Read the article

  • How do I make my volume indicator operate in decibels instead of percentage?

    - by ethana2
    When I want to adjust the volume of anything I'm doing, I find that using the volume controls built into Ubuntu is little but confusion. When the volume is around 100%, dropping it several increments has almost no effect on apparent volume, but when it's around 0%, the effect of one click of my mouse wheel is probably a good 3 decibels. I have observed this behavior on tens of different UC's, since I convert about one Ubuntu user a month (NE team contact). This has proven so frustrating to me that I tend to use the volume knob on my guitar amp ( mono audio :| ) instead of the volume indicator. What can I do to make my volume indicator behave properly until this is fixed? I want each volume increment to be one half or one third decibel. Is there a different piece of software I should use for system volume configuration perhaps?

    Read the article

  • Using glReadBuffer returns black image instead of the actual image only on Intel cards

    - by cloudraven
    I have this piece of code glReadBuffer( GL_FRONT ); glReadPixels( 0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer ); Which works just perfectly in all the Nvidia and AMD GPUs I have tried, but it fails in almost every single Intel built-in video that I have tried. It actually works in a very old 945GME, but fails in all the others. Instead of getting a screenshot I am actually getting a black screen. If it helps, I am working with the Doom3 Engine, and that code is derived from the built-in screen capture code. By the way, even with the original game I cannot do screen capture on those intel devices anyway. My guess is that they are not implementing the standard correctly or something. Is there a workaround for this?

    Read the article

  • Azure

    - by Grant Fritchey
    I've been tasked to learn SQL Azure, as well as test all the Red Gate products on it. My one, BIG, fear has been that I'll receive some mongo bill in the mail because I've exceeded the MSDN testing limit. I know people that have had that problem. I've been trying to keep an eye on my usage, but, let's face it, it's not something I think about every day. But now I don't have to. Red Gate has been working with Azure, long before I showed up. They already released a little piece of software that I just found out about, it's called CloudTally. It gathers your usage and sends you a daily email so you can know if you're starting to approach that limit. Check it out, it's free.

    Read the article

  • Intellectual Property cost

    - by Colin Mackay
    If a piece of bespoke software was developed by a company and the Intellectual Property was retained by the company that wrote it, but now the client of the software company wants to get that source code (and its IP) how much should it cost them? How would you calculate a fair cost for the purchase of that source and IP? UPDATE: Just to add, the software in question is of no use to anyone else (for any legitimate purpose) as it ties in directly with the business processes of one company. It is not something that can be subsequently sub-licensed or installed outside the company in question. There are links of to third party services (but these were existing services that the bespoke software had to integrate with in the first place).

    Read the article

  • IOS Variable vs Property

    - by William Smith
    Just started diving into Objective-C and IOS development and was wondering when and the correct location I should be declaring variables/properties. The main piece of code i need explaining is below: Why and when should i be declaring variables inside the interface statement and why do they have the same variable with _ and then the same one as a property. And then in the implementation they do @synthesize tableView = _tableView (I understand what synthesize does) Thanks :-) @interface ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> { UITableView *_tableView; UIActivityIndicatorView *_activityIndicatorView; NSArray *_movies; } @property (nonatomic, retain) UITableView *tableView; @property (nonatomic, retain) UIActivityIndicatorView *activityIndicatorView; @property (nonatomic, retain) NSArray *movies;

    Read the article

  • How will wayland be delivered?

    - by Chris Woollard
    Mark just announched support for wayland in Ubuntu in future. I was just wondering the following (Hopefully Mark can answer). Obviously this is quite a significant piece of work. When will a version be available to test? Will it be available as a package(s) in the repository or will it be delivered as its own distribution e.g. wayBuntu? When do you expect it to take over as the default (e.g. 11.11)? Thanks Chris

    Read the article

  • Using glReadBuffer/glReadPixels returns black image instead of the actual image only on Intel cards

    - by cloudraven
    I have this piece of code glReadBuffer( GL_FRONT ); glReadPixels( 0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer ); Which works just perfectly in all the Nvidia and AMD GPUs I have tried, but it fails in almost every single Intel built-in video that I have tried. It actually works in a very old 945GME, but fails in all the others. Instead of getting a screenshot I am actually getting a black screen. If it helps, I am working with the Doom3 Engine, and that code is derived from the built-in screen capture code. By the way, even with the original game I cannot do screen capture on those intel devices anyway. My guess is that they are not implementing the standard correctly or something. Is there a workaround for this?

    Read the article

  • World Backup Day

    - by red(at)work
    Here at Red Gate Towers, the SQL Backup development team have been hunkered down in their shed for the last few months, with the toolbox, blowtorch and chamois leather out, upgrading SQL Backup. When we started, autumn leaves were falling. Now we're about to finish, spring flowers are budding. If not quite a gleaming new machine, at the very least a familiar, reliable engine with some shiny new bits on it will trundle magnificently out of the workshop. One of the interesting things I've noticed about working on software development teams is that the team is together for so long 'implementing' stuff - designing, coding, testing, fixing bugs and so on - that you occasionally forget why you're doing what you're doing. Doubt creeps in. It feels like a long time since we launched this project in a fanfare of optimism and enthusiasm, and all that clarity of purpose and mission "yee-haw" has dissipated with the daily pressures of development. Every now and again, we look up from our bunker and notice all those thousands of users out there, with their different configurations and working practices and each with their own set of problems and requirements, and we ask ourselves "does anyone care about what we're doing?" Has the world moved on while we've been busy? Could we have been doing something more useful with the time and talent of all these excellent people we've assembled? In truth, you can research and test and validate all you like, but you never really know if you've done the right thing (or at least, something valuable for some users) until you release. All projects suffer this insecurity. If they don't, maybe you're not worrying enough about what you're building. The two enemies of software development are certainty and complacency. Oh, and of course, rival teams with Nerf guns. The goal of SQL Backup 7 is to make it so easy to schedule regular restores of your backups that you have no excuse not to. Why schedule a restore? Because your data is not as good as your last backup. It's only as good as your last successful restore. If you're not checking your backups by restoring them and running an integrity check on the database, you're only doing half the job. It seems that most DBAs know that this is best practice, but it can be tricky and time-consuming to set up, so it's one of those tasks that can get forgotten in the midst all the other demands on their time. Sometimes, they're just too busy firefighting. But if it was simple to do? That was our inspiration for SQL Backup 7. So it was heartening to read Brent Ozar's blog post the other day about World Backup Day. To be honest, I'd never heard of World Backup Day (Talk Like a Pirate Day, yes, but not this one); however, its emphasis on not just backing up your data but checking the validity of those backups was exactly the same message we had in mind when building SQL Backup 7. It's printed on a piece of A3 above our planning board - "Make backup verification so easy to do that no DBA has an excuse for not doing it" It's the missing piece that completes the puzzle. Simple idea, great concept, useful feature, but, as it turned out, far from straightforward to implement. The problem is the future. As Marty McFly discovered over the course of three movies, the future is uncertain and hard to predict - so when you are scheduling a restore to take place an hour, day, week or month after the backup, there are all kinds of questions that you wouldn't normally have to consider. Where will this backup live? Will it even exist at the time? Will it be split into multiple files? What will the file names be? Will it be encrypted? What files should it be restored to? SQL Backup needs to know what to expect at the time the restore job is actually run. Of course, a DBA will know the answer to all these questions, but to deliver the whole point of version 7, we wanted to make it easy for them to input that information into SQL Backup. We think we've done that. When you create your scheduled backup job, there is now an option to create a "reminder" to follow it up with a scheduled restore to verify the resulting backups. Actually, it's much more than a reminder, as it stores all the relevant data so you can click it and pre-populate the wizard with all the right settings to set up your verification restores. Simple. But, what do you think? We'd love you to try it. Post by Brian Harris

    Read the article

  • Best way to slice up a non rectangular image?

    - by Hoff
    I have the image below and need to create a rollover for each "piece" or arrow in the circle. Because the image isn't rectangular, it boggles how me how I'm going to do this without having badly overlapping pieces. As you can see from the image below, the slices will overlap each other (quite a bit), which will not be good for the rollover. Does anybody have any ideas as to how to accomplish this without resorting to Flash or HTML5? The majority of our site's users use dinosaur browsers that don't support HTML5. Here's the link to the image: http://img812.imageshack.us/img812/3166/wheela.png

    Read the article

  • One dimensional cutting algorithm with minimum waste

    - by jm666
    Can anybody point me to some resources about "cutting algorithm"? The problem: have rods with length of L meters, e.g. 6 m need cut smaller pieces of different lengths, e.g. need: 4 x 1.2m 8 x 0,9m etc... (many other lengths and counts) How to determine the optimal cutting, what will produce the minimum wasted material? I'm capable write an perl program, but haven't any idea about the algorithm. (if here is already some CPAN module what can help, would be nice). Alternatively, if someone can point me to some "spreadsheet" solution, or to anything what helps. Ps: in addition, need care about the "cutting line width" too, whats means than from the 6m long rod is impossible to cut 6 x 1m, because the cutting itself takes "3mm" width, so it is possible cut only 5 x 1m and the last piece will be only 98.5 cm (1m minus 5 x 3mm cut-width) ;(.

    Read the article

  • Programming curricula

    - by davidk01
    There are a lot of schools that teach Java and C++ but whenever I see the syllabus for one of these classes it's almost always some cut and dry OO stuff with possibly some boring end of class project. With all the little gadgets and emulators for those gadgets why aren't more schools re-purposing those classes so that the students work their way up to building android or meego applications? That way students get to experience first hand what it takes to engineer/build a piece of software instead of doing finger exercises with syntax. Practically every self-taught programmer that I know started programming because they wanted to make their gadgets do things for them. They didn't learn a programming language with an abstract conception of using it on some far distant project so I don't understand why schools don't emulate this style of teaching.

    Read the article

  • Is "watermarking" code with random trailing whitespace a good way to detect plagiarism?

    - by paperjam
    Consider this: int f(int x) { return 2 * x * x; } and this int squareAndDouble(int y) { return 2*y*y; } If you found these in independent bodies of code, you might give the two programmers the benefit of the doubt and assume they came up with more-or-less the same function independently. But look at the whitespace at the end of each line of code. Same pattern in both. Surely evidence of copying. On a larger piece of code, correlation of random whitespace at line ends would be irrefutable evidence of a shared origin. Now aside from the obvious weaknesses: e.g. visible or obvious in some editors, easily removed, I was wondering if it was worth deploying something like this in my open source project. My industry has a history of companies ripping off open source projects.

    Read the article

  • Instantiate proper class based on some input

    - by Adam Backstrom
    I'm attempting to understand how "switch as a code smell" applies when the proper code path is determined by some observable piece of data. My Webapp object sets an internal "host" object based on the hostname of the current request. Each Host subclass corresponds to one possible hostname and application configuration: WwwHost, ApiHost, etc. What is an OOP way for a host subclass to accept responsibility for a specific hostname, and for Webapp to get an instance of the appropriate subclass? Currently, the hostname check and Host instantiation exists within the Webapp object. I could move the test into a static method within the Host subclasses, but I would still need to explicitly list those subclasses in Webapp unless I restructure further. It seems like any solution will require new subclasses to be added to some centralized list.

    Read the article

  • Unity launcher full - Need more icons

    - by Martin Wildam
    I have already reduced the Unity launcher icons to 32 but still the space is exhausted already with my most-used programs. Basically I have to scroll often in the unity launcher bar with is annoying. So far (Ubuntu 10.04) I had those icons as mini ones in the top panel (smaller icons and wider space) where they could fit all. I was thinking already of sub-launchers or something the like but could not find something like the drawer was in Gnome 2. I am using Ubuntu at home and in the office. I am a consultant and need a lot of stuff on a regular basis. To put links at the desktop does not make sense because of the many windows that I usually have open there is hardly ever a piece of the desktop looking through. How do you - power users get keep most-used programs at reach (and I mean <= 2 clicks away)?

    Read the article

  • Learning the nuances of a language (C++)

    - by prelic
    So I'm a recent college graduate, and I really enjoy working in C++; I worked with it a lot in school, and would like to pursue a career writing in C or C++. The problem I'm having is that I'm trying to learn the nuances of C++. I'm not talking about the basics, or even advanced concepts like templates, namespaces, etc. I'm talking about the real nitty-gritty stuff like undefined behavior and stuff like that. When I'm interviewing, and they put a bizarre piece of C++ code in front of me, and ask me what the output will be, I want to be able to nail those questions. Obviously experience is a great way to learn, but when I write code for practice, I [obviously] know what it does. Reading open-source projects have been good practice, but I find that there tends to be an enormous learning curve just understanding the organization of the code (because the projects tend to be large). So basically what I'm asking is, what should I do now?

    Read the article

  • Why is it so hard to get people to pay for software?

    - by Kugel
    Where I come from software is considered something you can get for free (same goes for movies, etc.) The willingness not to pay for software is quite strong. It is putting me off, that people would rather go through hoops and risk legal issues than to pay a small amount of money for a piece of software. This attitude is somehow embedded in the society. I'm just trying to understand the situation. What do you think is causing this? Why won't some people pay for software even if it's cheap and they use it every day?

    Read the article

  • How to detect a touch on transparent area of an image in a (libgdx) stage?

    - by Usman
    Can some one please help to detect a touch on an image which I am using as an actor in a stage. The image is actually a long diagnol brush which has plenty of transparent area. The problem is when I touche the transparent area of the brush image it is also triggering the clicklistener of the image. I need the click listener should only be called when the finger actually touched the visible image not the area which is empty. I am using libgdx-0.9.4 libraries. Here is my simple piece of code. import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.ClickListener; Image brushImg = new Image(ImageCache.getTexture("brush")); brushImg.width = mStage.width()*0.75f; brushImg.height = mStage.height()*0.75f; brushImg.setClickListener(new ClickListener() { @Override public void click(Actor actor, float x, float y) { SoundFactory.play("brush"); }

    Read the article

  • Google : nouvelles applications Gmail pour Android et iOS et nouveau Youtube pour les iDevices d'Apple

    Gmail : nouvelles applications pour Android et iOS Et nouveau Youtube pour les iDevices d'Apple La fragmentation touche également les applications de Google pour son propre OS mobile. Son nouveau Gmail pour Android - qui vient de sortir - n'est en effet disponible que pour les versions 4.0 et ultérieures (aujourd'hui la 4.1) du système. Parmi les améliorations du client de messagerie mobile, on notera pêle-mêle : un nouvel aperçu des photos dans les mails, la possibilité de mettre une vidéo ou une photo directement en pièce jointe, l'ajustement automatique de la taille de la police à l'écran ou le glisser des messages vers la droite pour les trier ou les supprimer. ...

    Read the article

  • Looking for bug tracking software

    - by Shelton
    I'm looking for a bug/issue tracking system that can: Integrate with lots of other services. Basecamp, Beanstalk, etc. Integrate popular CMSs, such as WordPress, so the client can enter a ticket from the system that is familiar to them and not have one more login to worry about. Generate reports for my own purposes. Bonus if there's an iPhone app. Doesn't require additional development on my end (I have plenty of money and no time). I've already looked into Lighthouse and ZenDesk -- both are solid offerings -- but don't see what I need out of the box. I'd have to build CMS plug-ins. And I've looked through WP plug-ins for bug tracking software, but nothing I've found integrates with these products. Anyone know of something that meets these requirements without additional development, or am I stuck putting my business on hold to get this piece in place myself?

    Read the article

  • How to deal with "software end-of-life" situations?

    - by rwong
    When a vendor declares that they no longer intend to provide any support or services to a piece of software (and stated the intent to exit the business - offering no upgrade paths), and stated that customers must pay a nominal fee in order to have the existing data exported, what kind of recourse do programmers/customers have? Things I can think of: Need to purchase spare hardware and set up a spare environment on which the software can continue to operate. Various data export methods which do not require vendor involvement. (For example, screen scraping, printing to image followed by re-scanning, etc) Parallel systems where staff will duplicate the old data into a new system manually or semi-automatically Legal means, in case the vendor is in financial trouble Any other ideas? Assuming that there is no "circumvention" involved (no DRM, no DMCA), is data recovery or reverse engineering legal/acceptable?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >