Daily Archives

Articles indexed Thursday March 3 2011

Page 2/12 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Sensitive Data Storage - Best Practices

    - by Kenneth
    I recently started working on a personal project where I was connecting to a database using Java. This got me thinking. I have to provide the login information for a database account on the DB server in order to access the database. But if I hard code it in then it would be possible for someone to decompile the program and extract that login info. If I store it in an external setup file then the same problem exists only it would be even easier for them to get it. I could encrypt the data before storing it in either place but it seems like that's not really a fail safe either and I'm no encryption expert by any means. So what are some best practices for storing sensitive setup data for a program?

    Read the article

  • Library to fake intermittent failures according to tester-defined policy?

    - by crosstalk
    I'm looking for a library that I can use to help mock a program component that works only intermittently - usually, it works fine, but sometimes it fails. For example, suppose I need to read data from a file, and my program has to avoid crashing or hanging when a read fails due to a disk head crash. I'd like to model that by having a mock data reader function that returns mock data 90% of the time, but hangs or returns garbage otherwise. Or, if I'm stress-testing my full program, I could turn on debugging code in my real data reader module to make it return real data 90% of the time and hang otherwise. Now, obviously, in this particular example I could just code up my mock manually to test against a random() routine. However, I was looking for a system that allows implementing any failure policy I want, including: Fail randomly 10% of the time Succeed 10 times, fail 4 times, repeat Fail semi-randomly, such that one failure tends to be followed by a burst of more failures Any policy the tester wants to define Furthermore, I'd like to be able to change the failure policy at runtime, using either code internal to the program under test, or external knobs or switches (though the latter can be implemented with the former). In pig-Java, I'd envision a FailureFaker interface like so: interface FailureFaker { /** Return true if and only if the mocked operation succeeded. Implementors should override this method with versions consistent with their failure policy. */ public boolean attempt(); } And each failure policy would be a class implementing FailureFaker; for example there would be a PatternFailureFaker that would succeed N times, then fail M times, then repeat, and a AlwaysFailFailureFaker that I'd use temporarily when I need to simulate, say, someone removing the external hard drive my data was on. The policy could then be used (and changed) in my mock object code like so: class MyMockComponent { FailureFaker faker; public void doSomething() { if (faker.attempt()) { // ... } else { throw new RuntimeException(); } } void setFailurePolicy (FailureFaker policy) { this.faker = policy; } } Now, this seems like something that would be part of a mocking library, so I wouldn't be surprised if it's been done before. (In fact, I got the idea from Steve Maguire's Writing Solid Code, where he discusses this exact idea on pages 228-231, saying that such facilities were common in Microsoft code of that early-90's era.) However, I'm only familiar with EasyMock and jMockit for Java, and neither AFAIK have this function, or something similar with different syntax. Hence, the question: Do such libraries as I've described above exist? If they do, where have you found them useful? If you haven't found them useful, why not?

    Read the article

  • I don't really understand "Backend/Serverside" when it comes to web-development?

    - by Mercfh
    In the Web development world, what exactly do backend/server-side programmers do? I guess I don't really understand the whole concept. I've done the HTML/CSS layouts and website design and a little bit of SQL with PHP (still enhancing my skills, it's more of a side project for me). I've also done a small amount of JavaScript/JQuery. But I don't understand the "backend" work, such as the scripting languages (Rails/Python/etc) and such. What exactly do you "do" with them? Are there any books on the subject? I'm not even sure what it means. Is it kinda like what Web Application Frameworks do? Or not so much?

    Read the article

  • Solo vs Team development and the consequences

    - by Mathieu
    Hi, I've been programming for a while on different languages. I never really studied that at school nor worked on a team of more than 2 (me included). Still, I've been a professional developper for over three years. Last year, I took over my first C# project and it ended up being fine. I can't help but think that because I learned and worked alone I must be missing some concepts/hints/edge. For those who've been solo developpers before being part of a team, can you share your experience? Did you realize you were missing something? Did you find it hard? Did you learn faster after? Thank you!

    Read the article

  • Explain Model View Controller

    - by Channel72
    My experience with developing dynamic websites is limited mostly to Java servlets. I've used Tomcat to develop various Java servlets, and I wouldn't hesitate to say that I'm reasonably proficient with this technology, as well as with client-side HTML/CSS/Javascript for the front-end. When I think "dynamic website", I think: user requests a URL with a query string, server receives the query, and then proceeds to output HTML dynamically in order to respond to the query. This often involves communication with a database in order to fetch requested data for display. This is basically the idea behind the doGet method of a Java HttpServlet. But these days, I'm hearing more and more about newer frameworks such as Django and Ruby on Rails, all of which take advantage of the "Model View Controller" architecture. I've read various articles which explain MVC, but I'm having trouble really understanding the benefits. I understand that the general idea is to separate business logic from UI logic, but I fail to see how this is anything really different from normal web programming. Web programming, by it's very nature, forces you to separate business logic (back-end server-side programming) from UI programming (client-side HTML or Javascript), because the two exist in entirely different spheres of programming. Question: What does MVC offer over something like a Java servlet, and more importantly, what exactly is MVC and how is it different from what you would normally do to develop a dynamic website using a more traditional approach such as a Java servlet (or even something older like CGI). If possible, when explaining MVC, please provide an example which illustrates how MVC is applied to the web development process, and how it is beneficial.

    Read the article

  • Coordinating team code review sessions

    - by Wade Tandy
    My question has two parts: 1) In your team or organization, do you ever do in-person code reviews with all or part of a team, as opposed to online reviews using some sort of tool? 2) How do you structure these meetings? Do you choose to focus on one person's code in a given meeting? Do you look at everything? Take a random sample? Ask people on the team what they'd like to have looked at of theirs? I'd love to add this practice to my development team, so I'd like to hear how others are doing it.

    Read the article

  • What advantages switching to ruby might give me as a python programmer ?

    - by Richard Placide
    This is my first question on stackoverflow, so please bear with me. I'm trying to stay away from any form of trolling or flame baiting as i have a tremendous respect for both languages. I'm a python programmer (though not an expert) and i love it. My first language was C++. My line of work (web development) is pushing me towards other languages like php and javascript. Recently, I've been very excited by Ruby's increasing popularity. However I used to be under the impression that Python and Ruby were so close that there was little point in trying to learn and master both. But I get the sense that I was wrong, hence my question : I'd like to hear from python programmers who have either switched entirely to ruby or added ruby to their toolset. What specific benefits did you get from switching (entirely or partially) to Ruby from Python ? Ideally I'd like to hear from real world experiences.

    Read the article

  • C# books for the experienced programmer

    - by Michael Dmitry Azarkevich
    So I've been programming in C# for 3 years now (been programming in various languages for 3 years before that as well) and most of the stuff I learned I pieced together on the internet. The thing is, I want to understand C# more formally and in depth and so would like to get some books on the subjects. Any books you'd recommend? Also, I've heard good things about "C# 4.0 in a Nutshell", "Pro C# 2010 and the .NET 4 Platform" and "CLR via C#". What do you think of these? (The people at stackoverflow told me to take it here. Please, Please tell me I'm in the right place this time)

    Read the article

  • sed problem ....

    - by moata_u
    hello there ... am facing problem in sed command , i was trying write a bash script that do the following : 1. search for the line that contain :@ , 2.then save the line that contained :@ and replace it with new line ....as following : ! /bin/bash echo "Please enter the ip address of you file" read ipnumber find=grep ':@' application.properties # find the line input="connection.url=jdbc\racle\:thin\:@$ipnumber\:1521\:billz" # preparing new line echo sed "s/'${find}'/'${input}'/g" application.properties # replace old with new line **Problem is nothing happen !!!! * I already tried to use "${find}" instead of '${find}'

    Read the article

  • confusion about installing/using git; how to undo

    - by dan
    I'm very new to ubuntu so I'm sure this is a dumb question. I wanted to install some source code that was on git. Don't really know what that means, I've never used git before, but I figured it was time to learn so I first installed git. Next I tried to clone the git directory of the software I want to install. I got a message saying "the authenticity of IP:IP:IP:IP can't be established". I went ahead and ended up with another message saying warning such and such will be added to known hosts. I went ahead and it said something about hanging up on the connection. After searching the internet for awhile I realized I didn't need git to install the software but now I have it installed and have added some host to some file or another. I'm concerned I've created some security issues I need to fix. I know this is stupid but can anyone help me undo what I've done, or better understand what I've done. Did adding a git project open up my system? Beyond that can anyone tell me how git works. Everything I've found assumes I know stuff that I don't yet. Thanks. Dan

    Read the article

  • How can I disable Hibernate completely?

    - by Lekensteyn
    I have seen the answer on How to disable hibernating?, but I have no such file. Possibly because that suggestion was written for Ubuntu, not Kubuntu (KDE, not Gnome). I do not have a swap on my encrypted SSD, my system freezes (cannot even change Caps Lock) if I accidentally press the "Hibernate" button at "Energy management". My keyboard has a Hibernate button (Fn + F4) next to the volume control buttons and every time I press the wrong key, the system will freeze after. So, what is the correct way to disable it? If there is no solution, a work-around is welcome too.

    Read the article

  • Unable to use TL-WN821N

    - by udiw
    Hi, I got a TP-LINK USB wireless module - TL-WN821N, using Ubuntu 10.4 (same problems were also seen in 10.10). From everything I've read online, the usb should work just fine, since the Atheros ar9170 is built into the kernel. However, when I plug it in, it is detected as a USB device, but there is no wlan associated with it, and basically - nothing happens. Am I doing something wrong? what should I do so that the Atheros driver is associated with this device? btw, on Windows it works fine (with the drivers). Some logs: $ uname -mr 2.6.32-28-generic i686 $ lsb_release -d Description: Ubuntu 10.04.2 LTS $ lsusb ... (trimmed) Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 017: ID 0cf3:7015 Atheros Communications, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub $ lsmod |grep ar9 ar9170usb 51296 0 ath 7611 1 ar9170usb mac80211 205402 3 ar9170usb,iwl3945,iwlcore cfg80211 126528 5 ar9170usb,ath,iwl3945,iwlcore,mac80211 led_class 2864 4 ar9170usb,iwl3945,iwlcore,sdhci

    Read the article

  • How to detect webcam?

    - by Vishwas
    I installed Cheese but it is not yet possible for me to work with my webcam. After running lsusb I get this: Bus 007 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 005: ID 044e:3012 Alps Electric Co., Ltd Bus 003 Device 004: ID 044e:3013 Alps Electric Co., Ltd Bus 003 Device 003: ID 044e:3010 Alps Electric Co., Ltd Bluetooth Adapter Bus 003 Device 002: ID 044e:3011 Alps Electric Co., Ltd Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 05ca:1839 Ricoh Co., Ltd Visual Communication Camera VGP-VCC6 [R5U870] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Tell me what should I do now?

    Read the article

  • Can't remove Ubuntu Desktop from dropdown menu on logon screen

    - by Bryan
    Hello All, I'm running Ubuntu on an Eee PC with the Netbook interface. I installed Ubuntu Desktop via Aptitude to see how well it works on the Eee PC, and after a while I wanted to rid myself of it. So, I purged it using Aptitude, but it still shows up as an option in the dropdown menu on the login screen. Is there any way I can remove the Ubuntu Desktop option from the dropdown menu? It's not a big deal I guess... I'm just curious now how to do it. :)

    Read the article

  • restore window sizes, drag and drop functionalty in Unity (a simple use case)

    - by Avetik Topchyan
    Once application is maximized (say "Cheese") how can I restore its size back to the original? Is it possible to drag-and-drop from one application to another application in Unity? If so, how can I do that? Suppose I have a Rhythmbox open and I would like to drag a picture from a Desktop location (actually where is it?) to Rhythmbox album art section in the lower left corner? Unity was poorly designed, IMHO.

    Read the article

  • how to access shared external drive connected by usb to Airport Extreme Router

    - by Nathaniel
    I have an external hard drive connected to my Airport Extreme. I keep my photo and music files on it and can access them from both a Mac PowerPC and a Windows XP machine. For some reason I can find, much less connect to, it on my Ubuntu 10.10 machine. I can see my router in the "network" folder but can't seem to find and connect to the shared drive. Any help would greatly appreciated. I am somewhat of a novice with Ubuntu and networking. Thnaks, Nathaniel

    Read the article

  • after login, the desktop remains blank.

    - by MobileDev123
    Hi, I have installed Ubuntu 10 last night and finished all upgrading stuff, in the time when updates are applied I downloaded a torrent file. As soon as download is finished I rebooted my system. As usual at start up it asked my login and I did the same. After a successful login It should show me the desktop, or show an error message in case anything has gone wrong. But what I had is only a cursor and a blank wall paper. Can anybody tell me what is the problem and how to resolve this? Thanks

    Read the article

  • Do you know a good html mailing list management software with admin levels?

    - by SirG
    I'm basically looking for a program/app/script (can be commercial) which I can ideally install on a windows server (we can run asp, asp.net php mssql) we have different groups of people who send newsletters to web members, I want to bring it all into one app which I can monitor and control. Ideally it would be able to create html newsletters, (with some templates) track emails and click throughs. Manage email lists subscribe/unsubscribes. And importantly have different levels of admin, so a newsletter creator could log in and create and send off an email, it goes into a queue where a communications editor can have an overview of all newsletters and approve the sending of the emails or edit them before they are sent off. before I start coding something up myself I thought I'd ask if anyone has any advice! Cheers!

    Read the article

  • Which mobile device is appropriate as a utility tool for a web master?

    - by Kayle
    Basically, I'm looking for a device to use on the road and I would prefer to not have to sit down for the majority of the tasks (which rules out netbooks, in my mind). I'm also hoping to spend less than $500. This is what I'd like to "capably" be able to do on the device: Browse the web in non-mobile format, flash is a plus Email, chat, etc Have access to a decent text editor and ftp OR a browser that supports BESPIN/ACE Some sort of SSH support I'm looking at rooted Android phones and iPhone/iPads... though the phone aspect is only icing (it would be cool to consolidate the two devices and have net access through cell networks, but I'm not married to the idea). Are there cheap linux tablets that are ready for prime-time yet? I suppose that would be ideal. All suggestions welcome!

    Read the article

  • Ars Technica .ars URL suffix -- Vanity or SEO Benefit?

    - by yc01
    The Technology website Ars Technica has adjusted their URL rewrite rules to end with a .ars. Traditionally, sites have taken advantage of this URL rewriting capability to completely eliminate file suffixes like .html, .php, .aspx etc, under the theory that this made for better SEO (since the content of the URL was more relevant to the content) Ars Technicas, though, look like this: http://arstechnica.com/science/news/2011/03/flow-from-the-poles-drive-sunspot-levels.ars So, is Ars Technica adding the .ars file suffix purely a vanity play? Or is it an SEO trick to improve the site's SEO by cleverly inserting their site name into every URL slug? And, if this is indeed an effective SEO trick, should other sites follow suit?

    Read the article

  • How to design a leaderboard?

    - by PeterK
    This sounds like an easy thing but when i considering the following Many players Some have played many games and some just started Different type of statistics ...on what information should the actual ranking be based on. I am planning to display the board in a UITableView so there is limited space available per player. However, I am not bound to the UITableView if there is a better solution. This is a quiz game and the information i am currently capturing per player is: #games played totally #games played per game type (current version have only one game type) #questions answered #correct answers Maybe i should include additional information. I have been thinking about having a leaderboard property page where the player can decide on what basis the leaderboard should display information but would like to avoid the complexity in that. However, if that is needed i will do it. Anyone that can give me some advice on how to design the presentation of this would be highly appreciated?

    Read the article

  • How can I prevent a field from being copied to the client proxy in WCF RIA?

    - by Martin Doms
    Is there a metadata attribute I can use to prevent a field from being accessible on the client in a WCF RIA services? I sure I have seen this before, but I'm drawing a blank and Google isn't helping. It would look something like [MetadataType(typeof(User.UserMetadata))] public partial class User { internal sealed class UserMetadata { private UserMetadata() { } public int Id { get; set; } [HideFromClientProxy] public string PasswordSalt { get; set; } } }

    Read the article

  • Using JS Methods in jQuery

    - by Wasabi
    In the following code snippet, the String.fromCharCode is used, can all JS methods be used within jQuery? Perhaps a noob question, but better to ask and prove a noob, then assume and be a fool. // Invoke setBodyClass when a key is pressed $(document).keyup(function(){ switch (String.fromCharCode(event.keyCode)){ case 'D': setBodyClass('default'); break; case 'N': setBodyClass('narrow'); break; case 'L': setBodyClass('large'); break; } });//end keyup

    Read the article

  • Java vs C# - AddActionListener vs event subscription

    - by S.O.
    Very simple question from one somewhat new to Java: when adding an event handler (or whatever it is called in Java) to a Control, MUST it be an object? I mean, in C# I can do control.event += System.eventHandler(methodThatHandlesEvent) Sure, that's because we have delegate types in C#, but I was wondering if I can choose which method would be called when an event is raised in Java? I mean, in Java I can have something like control.AddActionListener(objectWhichClassImplementsActionListener) And then I have the stupid actionPerformed method in this class, which is the only method that is called. I know, there are more kinds of listeners, but I can't have a "ActionListenerHandler" class in which I implement several actionPerformed methods that can be assigned to different controls?

    Read the article

  • JSP: accessing enum inside JSP EL tags

    - by Arjun
    My java enum looks like this: public enum EmailType { HOME, WORK, MOBILE, CUSTOMER_SERVICE, OTHER } In JSP, I am trying to do sth like below, which is not working. <c:choose> <c:when test="${email.type == EmailType.HOME}">(Home)</c:when> <c:when test="${email.type == EmailType.WORK}">(Work)</c:when> </c:choose> After googling, I found these links: Enum inside a JSP. But, I want to avoid using scriplets in my JSP. How can I access the java enum inside EL tag and do the comparision?? Please help.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >