Daily Archives

Articles indexed Saturday November 26 2011

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

  • Should you document everything or just most?

    - by TheLQ
    It seems a bit of a controversial subject to document everything, including the "JavaBean" syntax of getters and setters for fields: People say its needlessly long and repetitive breaking DRY (don't repeat yourself), that the naming convention should explain everything, and it clutters code/documentation. Sometimes those arguments work. But other times, you end up with this: Above is common to open source projects that do boldly follow those principles. Your left with entirely useless documentation. That doesn't explain anything about whats going on underneath, the possible effects, or even what the expected value is (could it be null or never null? I don't know, the Javadoc doesn't tell me). So when should I document? Do I document everything even if it occasionally clutters code? Or do I document nothing since in my eyes its "obvious"?

    Read the article

  • What's the maximum filename length in encrypted ext4 partition?

    - by fdlm
    I'm using a two-partition setup with ubuntu (one partition for the system, one for my home directories). Until now I had an ext3 formatted home partition, which I'm currently trying to migrate to an encrypted ext4 partition. However, when copying the files the system is bugging me with errors, complaining that filenames are too long. As far as I could find out using wikipedia filename length is 255 bytes for ext3 and 256 bytes for ext4. So where's the problem, and how can I solve it? Thanks!

    Read the article

  • How to switch language spellingcheck on the fly when changing keyboard with alt-shift?

    - by Kosmas Papagiannis
    i just recently installed ubuntu 11.04, english version that comes with libreoffice. I also installed Greek language. Is there some way to make Writer recognize my input language (English - Greek) and apply spelling check on the fly, according to my input language? For example, i type a sentence in English, then switch keyboard input (Alt-Shift) and type a sentence in Greek. Writer does no recognize the Greek sentence and underlines it red. MS Office and OO under Windows does it... As soon as you change input language (keyboard layout), the real time spelling checker changes also between languages... Thank you in advance...

    Read the article

  • "failed to download package files" in VirtualBox with 11.04 and 11.10

    - by wang.xueqiang
    After I installed Ubuntu 11.04/11.10 in VirtualBox in Windows 7, I cannot update any software with the error message "failed to download package files". After having googled, I have tried: sudo apt-get update sudo apt-get upgrade changed to another sources But I still got the same error message. And there is no problem with internet connection as i can connect to internet using Firefox in Ubuntu. Any ideas?

    Read the article

  • Backlight screen flickering on a Sony Vaio VPCYB15AL

    - by Mario Zavala
    I've just installed Ubuntu 11.10, and everything went just now when the computer got into suspension, when it got back the screen started flickering, specially on the dashboard, it trends to disappear when i turn down the backlight, at first it was fixed by rebooting the system and now, every time that I start Ubuntu as soon as the desktod loads it starts flickering again, please help! I have a Sony VAIO VPCYB15AL AMD Dual Core E350 with an ATI HD 6310.

    Read the article

  • Networking is disabled after installing Maverick

    - by Zifre
    I recently installed Ubuntu 10.10 (Maverick Meerkat). Everything was working fine. Then I just started up the computer again, and the networking doesn't work. The network manager applet says "Networking disabled". The button is disabled, so I can't enable it. This question seems to be basically the same issue I have. managed in was set to false, but changing it to true does not fix the problem. Is there any other way to fix this problem?

    Read the article

  • Has anyone bought Market Samurai and had a good experience?

    - by ZakGottlieb
    It's hard when a piece of marketing software offers an affiliate program to ever find an objective review of it, so I thought I might try on Quora. It just boggles my mind that it can only cost $97 flat, when other SEO or keyword research tools like Wordtracker cost almost the same PER MONTH, and don't seem to offer much, if anything, more... Can anyone explain this, and would anyone recommend Market Samurai WITHOUT posting a link to it in their review? :)

    Read the article

  • 550 “Overwrite permission denied” when editing a file via FTP

    - by nodebunny
    DreamHost recently moved my accounts to a new shared box, and now I can't edit files via UltraEdit's built in FTP client, which messes up my work flow! What did they do that this is not working now? It stopped working after they moved me. Here's the output from the FTP console in UltraEdit 10/26/2011 10:42:36 AM: 220 DreamHost FTP Server 10/26/2011 10:42:36 AM: USER nodebunny 10/26/2011 10:42:36 AM: 331 Password required for ninjawww 10/26/2011 10:42:36 AM: PASS xxxxxxxx 10/26/2011 10:42:36 AM: 230 User nodebunny logged in 10/26/2011 10:42:36 AM: FEAT 10/26/2011 10:42:36 AM: 211-Features: LANG ja-JP.UTF-8;ja-JP;zh-TW;fr-FR;zh-CN;en-US*;bg-BG;ko-KR.UTF-8;ko-KR MDTM MFMT TVFS UTF8 MFF modify;UNIX.group;UNIX.mode; MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*; REST STREAM SIZE 211 End 10/26/2011 10:42:36 AM: OPTS UTF8 ON 10/26/2011 10:42:36 AM: 200 UTF8 set to on 10/26/2011 10:42:36 AM: PWD 10/26/2011 10:42:36 AM: 257 "/" is the current directory 10/26/2011 10:42:36 AM: PWD 10/26/2011 10:42:36 AM: 257 "/" is the current directory 10/26/2011 10:42:36 AM: CWD /dev/proj/nodebunny 10/26/2011 10:42:36 AM: 250 CWD command successful 10/26/2011 10:42:36 AM: PWD 10/26/2011 10:42:36 AM: 257 "/dev/proj/nodebunny/lib/Buffer" is the current directory 10/26/2011 10:42:36 AM: PWD 10/26/2011 10:42:37 AM: 257 "/dev/proj/nodebunny/lib/Buffer" is the current directory 10/26/2011 10:42:37 AM: TYPE I 10/26/2011 10:42:37 AM: 200 Type set to I 10/26/2011 10:42:37 AM: PORT 10,15,55,125,226,16 10/26/2011 10:42:37 AM: 200 PORT command successful 10/26/2011 10:42:37 AM: STOR Buffer.pm 10/26/2011 10:42:37 AM: 550 Buffer.pm: Overwrite permission denied

    Read the article

  • Is there any Google Adsense revenue if a visitor rolls over (hovers) on an ad unit?

    - by torr
    I have noticed an increase in interactive flash animations especilly on 300px wide adsense ads. Many of them ask the visitor to rollover to either reveal what the ad is about, show a clip, etc. So I wonder: the visitor is giving attention to this ad, is viewing its message -- without clicking on it. In essence, the ad agency's objective is accomplished without a click, which would be a significant money saver if PPC is considered. This seems very ingenious on their part, and I wonder how this is handled by Google. Shouldn't there be a fee for a publisher if visitors interact with ads, regardless of clicks? CTR becomes irrelevant in this context. Are you aware of anything being discussed in this respect?

    Read the article

  • Using heavyweight ORM implementation for light based games

    - by Holland
    I'm just about to engulf myself in an MVC-based/Component architecture in C#, using MySQL's connector/Net for the data storage, and probably some NHibernate/FluentNHibernate Object-relational-mapping to map out the data structure. The goal is to build a scalable 2D RPG. Then I think about it...and I can't help but think this seems a little "heavy weight" for a 2D RPG, especially one which, while I plan to incorporate a lot of functionality and entertaining gameplay, may be ported to something like Windows Phone or Android in the future. Yet, on the other hand even a 2-Dimensional RPG can become very complicated, and therefore must incorporate a lot of functionality. While this can be accomplished with text/XML/JSON for data storage, is there a better way? Is something such as Object-Relational-Mapping useful in such an application? So, what do you think? Would you say that there is a place for such technologies? I don't know what to think...

    Read the article

  • Checking validation of entries in a Sudoku game written in Java

    - by Mico0
    I'm building a simple Sudoku game in Java which is based on a matrix (an array[9][9]) and I need to validate my board state according to these rules: all rows have 1-9 digits all columns have 1-9 digits. each 3x3 grid has 1-9 digits. This function should be efficient as possible for example if first case is not valid I believe there's no need to check other cases and so on (correct me if I'm wrong). When I tried doing this I had a conflict. Should I do one large for loop and inside check columns and row (in two other loops) or should I do each test separately and verify every case by it's own? (Please don't suggest too advanced solutions with other class/object helpers.) This is what I thought about: Main validating function (which I want pretty clean): public boolean testBoard() { boolean isBoardValid = false; if (validRows()) { if (validColumns()) { if (validCube()) { isBoardValid = true; } } } return isBoardValid; } Different methods to do the specific test such as: private boolean validRows() { int rowsDigitsCount = 0; for (int num = 1; num <= 9; num++) { boolean foundDigit = false; for (int row = 0; (row < board.length) && (!foundDigit); row++) { for (int col = 0; col < board[row].length; col++) { if (board[row][col] == num) { rowsDigitsCount++; foundDigit = true; break; } } } } return rowsDigitsCount == 9 ? true : false; } I don't know if I should keep doing tests separately because it looks like I'm duplicating my code.

    Read the article

  • Ogre Specific libraries

    - by Molmasepic
    i have a simple question. For people that know and built ogre3D from source as a Static library, What is the order of which the libraries should be linked? The libraries I need to be organized are: Ogre Plugins 'libOgreMain.a' Ogre RenderSystems Boost(version 1.47)link Ogre's Dependencies The reason im asking is because in the Ogre forums, I have asked about this and didnt get a good reply...yet. The other reason is because even though i link to the boost library, i get this error: undefined reference to '_imp___ZN5boost6thread20hardware_concurrencyEv' My compiler is MinGW with CodeBlocks as the IDE And my Main Computer Im building on is Windows Vista 32 bit

    Read the article

  • Can I use one set of images to represent multiple sprites in Java?

    - by mal
    I've got a game that has 3 basic sprites, at the moment I'm loading 8 images into each sprite for animating. Each character class has a sprite object. if I've got 10 characters on screen at once then that's 80 images loaded in to memory. Can I make a central sprite class that only holds 8 images for each of the 3 sprites, then get the character objects to request the relevant images from the central sprite class, thereby massively reducing the memory required for the images?

    Read the article

  • Calculating missile trajectory around orbits before shooting [closed]

    - by Onofrio
    Possible Duplicate: Calculating missile trajectory around orbits before shooting I'm building a game with Unity3D. It's a Gravity Wars clone. Both player and AI turrets shoot missiles at each other (giving an Angle and a Power variables), trying not to crash missiles on planets. But here's my question: how do I make AI calculate power and angle before shooting his missile, considering a planet's gravity too?

    Read the article

  • keytool.exe is not a valid win32 application MD5, access denied

    - by user1015086
    Whenever I use any of those commands, I get "keytool.exe is not a valid win32 application" error, even when I open keytool.exe independently as an exe file. C:\Program Files(x86)\Java\jre6\bin>keytool.exe -list -alias androiddebugkey -keystore "C:\Users\ti7a\.android\debug.keystore" -storepass android -keypass android keytool -list -keystore "C:\Users\ti7a\.android\debug.keystore" C:>cd C:\Program Files\Java\jre6\bin keytool -list -alias androiddebugkey -key store "C:\Users\ti7a\.android\debug.keystore" -storepass andro id -keypass android

    Read the article

  • Change DateTimePicker Calendar Runtime

    - by Smart pro
    I want to view the calendar in another culture, for example let it show in Arabic. I use this code in the Main, but the calendar is still in the same culture: CultureInfo sa = new CultureInfo("ar-SA", false); sa.DateTimeFormat.Calendar = new System.Globalization.HijriCalendar(); // Sets the culture to Arabic (Saudi Arabia) Thread.CurrentThread.CurrentCulture = sa; // Sets the UI culture to Arabic (Saudi Arabia) Thread.CurrentThread.CurrentUICulture = sa; I add the DateTimePicker on a form and expect that it shows the date in Arabic after running, but the DateTimePicker or Calendar is not changed to that culture.

    Read the article

  • javascript: what does this syntax means?

    - by user1067138
    it is like this: (function () { //codes here })(); here is an example: (function () { var D = TED.EditorCore, E = TED.extend, A = TED.EditorInstanceManager, B = TED.augmentObject; window.TED["SimpleEditor"] = C; function C(F) { C.superclass.call(this, F) } C.defaultConfig = { height: "100px", width: "400px", //blablabla... flashNumLimit: 10, didaDelay: 300, imageWidthLimit: 570 }; E(C, D, { getContentLength: function () { return Math.ceil(this.filteHTML(this.editArea.innerHTML, ["img", "br"]).replace(/<img[^>]*>/gi, "mm").replace(/<br[^>]*>/gi, "m").replace(/&nbsp;/gi, "m").replace(/[^\x00-\xff]/g, "mm").length / 2) }, filteEditHTML: function () { return html = this.editArea.innerHTML.replace(/_moz_dirty=""/gi, "").replace(/\[/g, "[[-").replace(/\]/g, "-]]").replace(new RegExp("<\\/?(?:br[^>]*)>", "gi"), "[$1]").replace(new RegExp('<span([^>]*class="?at"?[^>]*)>', "gi"), "[span$1]").replace(new RegExp('<img([^>]*class="?(?:' + this.config.emptyClassName + "|" + this.config.smileyClassName + ')"?[^>]*)>', "gi"), "[img$1]").replace(/<[^>]*>/g, "").replace(/\[\[\-/g, "[").replace(/\-\]\]/g, "]").replace(new RegExp("\\[(/?(?:br|img|span)[^\\]]*)\\]", "gi"), "<$1>") }, filteSubmitHTML: function () { this.reLayout(); var G = this.editArea.innerHTML.replace(/_moz_dirty=""/gi, "").replace(/\[/g, "[[-").replace(/\]/g, "-]]").replace(new RegExp("<(/?(?:" + this.submitValidHTML.join("|") + ")[^>]*)>", "gi"), "[$1]").replace(new RegExp('<img([^>]*class="?(?:' + this.config.imageClassName + "|" + this.config.smileyClassName + "|" + this.config.flashClassName + "|" + this.config.musicClassName + ')"?[^>]*)>', "gi"), "[img$1]").replace(/<[^>]*>/g, "").replace(/\[\[\-/g, "[").replace(/\-\]\]/g, "]").replace(new RegExp("\\[(/?(?:" + this.submitValidHTML.join("|") + "|img)[^\\]]*)\\]", "gi"), "<$1>"); var F = document.createElement("div"); F.innerHTML = G; this.parseURL(F); return F.innerHTML } }); B(C, A) })(); what exactly does (funtion (){})(); do?

    Read the article

  • Getting a drop down box value with javascript?

    - by ritch
    I'm trying to get the value currently selected and I simply want to alert it. I current have this: <script type="text/javascript"> alert(forms.elements('sets').value); </script> HTML: <form> <select name="sets"> <option value="1">1 Set</option> <option value="2">2 Sets</option> <option value="F">3 Sets</option> </select> </form>

    Read the article

  • Layout with divs... can you have too many?

    - by user1066982
    What is the best practice for developing a layout? Is better to limit divs? I was looking through the html/css of some popular sites and they all seem to have divs within divs. For instance, a div for the entire page, a div for the topbar, a div within the top bar for the logo, search bar, etc. Is this a good practice? I suppose it's easier to position all the divs correctly and than place the necessary elements within the divs. It's what I've been doing this far but want to make sure I'm learning the correct approach. Any help on this is appreciated. Thanks!

    Read the article

  • Recursion Problems in Prolog

    - by Humble_Student
    I'm having some difficulties in prolog, I'm trying to write a predicate that will return all paths between two cities, although at the moment it returns the first path it finds on an infinite loop. Not sure where I'm going wrong but I've been trying to figure this out all day and I'm getting nowhere. Any help that could be offered would be appreciated. go:- repeat, f([],0,lon,spa,OP,OD), write(OP), write(OD), fail. city(lon). city(ath). city(spa). city(kol). path(lon,1,ath). path(ath,3,spa). path(spa,2,kol). path(lon,1,kol). joined(X,Y,D):- path(X,D,Y);path(Y,D,X). f(Ci_Vi,Di,De,De,PaO,Di):- append([De],Ci_Vi,PaO), !. f(Cities_Visited,Distance,Start,Destination,Output_Path,Output_Distance):- repeat, city(X), joined(Start,X,D), not_member(X,Cities_Visited), New_Distance is Distance + D, f([Start|Cities_Visited],New_Distance,X,Destination,Output_Path,Output_Distance). not_member(X,List):- member(X,List), !, fail. not_member(X,List). The output I'm expecting here is [spa,ath,lon]4 [spa,kol,lon]3. Once again, any help would be appreciated. Many thanks in advance.

    Read the article

  • Loop colours from variables for graphics.py [Python 3.2]

    - by user1056548
    I am creating a graphics program that draws 100 x 100 squares next to each other depending on the user-specified grid size. The user also inputs 4 colours for the squares to be coloured (e.g. if they enter red,green,blue,yellow the squares will be coloured in that order, repeating the colours). Is it possible to loop the colours from the variables the user has given? Here is what I have so far: def main(): print ("Please enter four comma seperated colours e.g.: 'red,green,blue,yellow'\n\ Allowed colours are: red, green, blue, yellow and cyan") col1, col2, col3, col4 = input("Enter your four colours: ").split(',') win = GraphWin ("Squares", 500, 500) colours = [col1, col2, col3, col4] drawSquare (win, col1, col2, col3, col4, colours) win.getMouse() win.close() def drawSquare(win, col1, col2, col3, col4, colours): for i in range (4): for j in range (len(colours)): colour = colours[j] x = 50 + (i * 50) circle = Circle (Point (x,50), 20) circle.setFill(colour) circle.draw(win) I think I should be using a list in some way, but can't work out exactly how to do it. Can anybody help?

    Read the article

  • Error comparing hash to hashed mysql password (output values are equal)

    - by Charlie
    Im trying to compare a hashed password value in a mysql database with the hashed value of an inputted password from a login form. However, when I compare the two values it says they aren't equal. I removed the salt to simply, and then tested what the outputs were and got the same values $password1 = $_POST['password']; $hash = hash('sha256', $password1); ...connect to database, etc... $query = "SELECT * FROM users WHERE username = '$username1'"; $result = mysql_query($query); $userData = mysql_fetch_array($result); if($hash != $userData['password']) //incorrect password { echo $hash."|".$userData['password']; die(); } ...other code... Sample output: 7816ee6a140526f02289471d87a7c4f9602d55c38303a0ba62dcd747a1f50361| 7816ee6a140526f02289471d87a7c4f9602d55c38303a0ba62dcd747a1f50361 Any thoughts?

    Read the article

  • Best Practice for CouchDB Document Versioning

    - by Groundwater
    Following my question here I am exmploring ideas for a generic approach to document versioning in CouchDB. While I imagine there may be no canonical approach, I had the following idea and am looking for feedback. I would like to maintain readable document ids as much as possible, so a document existing at /document1 would contain a pointer document to all existing versions on the system. The actual revision documents would be at something like /document1/308ef032a3801a where 308ef032a3801a is some random number or hash. Example The pointer document { "_id" : "document1", "versions" : [ "document1/308ef032a3801a" ] } The version document { "_id" : "document1/308ef032a3801a", ... actual content }

    Read the article

  • viewDidLoad never called in Sub-classed UIViewController

    - by Steve
    I've run into some trouble with loading a sub-classed UIViewController from a nib. My viewDidLoad function is never called. The super-class has no nib, but the sub-classes each have their own. i.e. @interface SuperClass : UIViewController { } @end @interface SubClass : SuperClass{ } @end @implementation SubClass - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { } return self; } - (void)viewDidLoad{ // Never called } The view is loaded from a nib as follows: SubClass *scvc = [[SubClass alloc] initWithNibName:@"SubClass" bundle:nil]; [self.navigationController pushViewController:scvc animated:YES]; [scvc release]; There is a nib file with this name and it has it's file owner's class set properly. viewDidLoad is not called in the child or super. Any ideas?

    Read the article

  • Where is this backward_warning.h #warning coming from?

    - by Piku
    Without looking through every single source file in my XCode project, is there a way to find out which #include is triggering the following warning? #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. Clicking on the error in XCode just opens the backward_warning.h file, which is totally useless. I know what the warning means, I know how to fix it (when I see the file in question and can look at its #includes)... but I just don't know how to find the file causing the error!

    Read the article

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