Daily Archives

Articles indexed Tuesday April 3 2012

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Deprecated Methods in Code Base

    - by Jamie Taylor
    A lot of the code I've been working on recently, both professionally (read: at work) and in other spheres (read: at home, for friends/family/etc, or NOT FOR WORK), has been worked on, redesigned and re-implemented several times - where possible/required. This has been in an effort to make things smaller, faster more efficient, better and closer to spec (when requirements have changed). A down side to this is that I now have several code bases that have deprecated method blocks (and in some places small objects). I'm looking at making this code maintainable and easy to roll back on changes. I'm already using version control software in both instances, but I'm left wondering if there are any specific techniques that have been used by others for keeping the superseded methods without increasing the size of compiled outputs? At the minute, I'm simply wrapping the old code in C style multi line comments. Here's an example of what I mean (C style, psuedo-code): void main () { //Do some work //Foo(); //Deprecated method call Bar(); //New method } /***** Deprecated code ***** /// Summary of Method void Foo() { //Do some work } ***** Deprecated Code *****/ /// Summary of method void Bar() { //Do some work } I've added a C style example, simply because I'm more confident with the C style languages. I'm trying to put this question across as language agnostic (hence the tag), and would prefer language agnostic answers, if possible - since I see this question as more of a techniques and design question. I'd like to keep the old methods and blocks for a bunch of reasons, chief amongst them being the ability to quickly restore an older working method in the case of some tests failing, or some unforeseen circumstance. Is there a better way to do this (that multi line comments)? Are there any tools that will allow me to store these old methods in separate files? Is that even a good idea?

    Read the article

  • What is the abstract name for Drive, Directory and file?

    - by Omkar panhalkar
    I want to give nice name to my function while returns drive, directory and file. Can you please suggest a good abstract name for this trio? This is the function. static IEnumerable<string> GetDriveDirectoriesAndFile(string path) { if (path.Contains('/')) { path = path.Replace('/', '\\'); } if (path.Contains('\\')) { return path.Split('\\'); } return null; } Thanks, Omkar

    Read the article

  • Why do programmers use or recommend Mac OS X? [closed]

    - by codingbear
    I've worked on both Mac and Windows for awhile. However, I'm still having a hard time understanding why programmers enthusiastically choose Mac OS X over Windows and Linux? I know that there are programmers who prefer Windows and Linux, but I'm asking the programmers who would just use Mac OS X and nothing else, because they think Mac OS X is the greatest fit for programmers. Some might argue that Mac OS X got the beautiful UI and is nix based, but Linux can do that. Although Windows is not nix based, you can pretty much develop on any platform or language, except Cocoa/Objective-C. Is it the softwares that offer only on Mac OS X? Does that really worth using Mac? Is it to develop iPhone apps? Is it because you need to buy new Windows every 2 years (less backwards compatible)? I understand why people, who are working in multimedia/entertainment industry, would use Mac OS X; however, I don't have strong merits of Mac OS X over Windows. If you develop daily on Mac and prefer Mac over anything else, can you give me a merit that Mac has over Windows/Linux? Maybe something you can do on Mac that cannot be done in Windows/Linux with the same level of ease? I'm not trying to do another Mac vs. Windows here. I tried to find things that I do on Mac that cannot be done on Windows with the same level of ease, but I couldn't. So, I'm asking for some help.

    Read the article

  • Is Ubuntu workable as a laptop for an IT consultant?

    - by Eric Wilson
    I work as a consultant programmer, typically in large businesses. I use a Windows Laptop, and many of my colleagues use a Mac. My personal preference would be to run Ubuntu if I could have complete control over my development environment. But I will have occasional need for Microsoft specific products, especially IE. My colleagues that use a Mac often run Windows on a virtual machine for these situations. My question is: Is Ubuntu a workable solution for the laptop of an enterprise programmer? For example, is it as easy to run Windows on a VM on Ubuntu as it is on a Mac? Has anyone out there tried this? Is there any particular reason why Ubuntu would not serve as well as a Mac for development in this environment? Note that I am not doing .NET development, so I am typically dealing with Java that is going to be run on an Apache server and used by clients running Windows.

    Read the article

  • Is slower performance, of programming languages, really, a bad thing?

    - by Emanuil
    Here's how I see it. There's machine code and it's all that computers needs in order to run something. Computers don't care about programming languages. It doesn't matter to them whether the machine code comes from Perl, Python or PHP. Programming languages don't serve computers. They serve programmers. Some programming languages run slower than others but that's not necessarily because there is something wrong with them. In many cases, it's because they do more things that programmers would otherwise have to do (i.e. memory management) and by doing these things, they are better in what they are supposed to do - serve programmers. So, is slower performance, of programming languages, really, a bad thing?

    Read the article

  • What plug in or module to use with WordPress? [migrated]

    - by Qacro
    I am developing travel website where users can search and book their travel deal. It goes like this: Providers are creating their travel deals (same as some blogger create blog in WordPress); Users book wanted travel deals; Providers, who have their account where they can see if users book their deal, are notified by the email and sms about just booked (sold) deal. Site is going to be developed using WordPress. Is there any plugin or module that I can use to accomplish this, or at least something similar to reconfigure and not to take this process from scratch?

    Read the article

  • Do you have to be good at math to be a good programmer?

    - by Charles Roper
    It seems that conventional wisdom suggests that good programmers are also good at math. Or that the two are somehow intrinsically linked. Many programming books I have read provide many examples that are solutions to math problems, or are somehow related to math as if these examples are what make sense to most people. So the question I would like to float is: do you have to be good at math to be a good programmer?

    Read the article

  • What's the equivalent of the "cls" command from Windows/DOS?

    - by blade19899
    I used to use cmd back in windows and the command line a used a lot was cls. It's kind of like the clear command in Linux but it cleans the screen permanently. If you use the clear command it just scroll down so that you don't see the command you where working on. I like both a lot but my question is how do i get a cls like command that clears the screen and can't browse up to see the command you where working on?

    Read the article

  • Windows not recognizing its system drive after installing Ubuntu 11.10 alongside with windows 7. What to do?

    - by user53322
    After installing Ubuntu 11.10, it boots perfectly. But when I select Windows 7 from the GRUB menu, it restarts after showing the boot logo. I tried to repair the boot loader but the process failed. Then I decide to repair with system recovery disc. There I realize the system is unable to find any existing system. Then I boot into ubuntu and here I can see all the existing drive (with all content). All drives are still NTFS file system (I have 4 drive: 3 are NTFS another 1 is ext4). Tried to repair with gparted partition tool, but came with no luck. Also tried to reinstall windows but installer don't show any available drive. What to do? (something to do with Ubuntu?)

    Read the article

  • Logkeys fragile?

    - by Ahmed Nematallah
    The program logkeys (which seems to be the only keylogger for linux out there which I can run) has some problems, it stops logging after some time, never returns again, I don't know how to trigger that bug, if the file is edited while logging, it just stops, if the file exists before logging it doesn't try to append to it or delete it or anything, the first issue is the most important but the rest are quite annoying can anyone help me because I'm not a linux programmer (I don't really know anything about the linux API but I am a beginner C++ programmer) and I won't be able to make my own keylogger thanks for the interest BTW I'm sure I got the right input device because it starts logging then stops and I use the command "logkeys -s -u -d /dev/input/event3 -o '/home/ahmed/Documents/log.txt'"

    Read the article

  • UbuntuOne: how to sync folders on different partitions (symlink?)

    - by user37155
    I use Ubuntu One to synch my home/Documents folder among more computers. On a portable tablet I have set the Documents folder in a separate Fat32 partition named sda6, and I made it default documents folder with Ubuntu Tweaks. How do I synchronize it with my /Documents cloud ? I tried to link /sda/Documents in my home folder but it didn't succeed: UbuntuOne still tries to set an own Documents folder and doesn't let me sync the linked folder with the cloud. What can I do, would please anyone help me ? Greetings, Francesco

    Read the article

  • Install Samba 3.0.24 on Ubuntu Server 10.04 from Source

    - by Nilpo
    Has anyone had any luck compiling and installing Samba 3.0.24 on Ubuntu 10.04? I'm trying to set up realtime virus scanning on Samba shares (ClamAV) using the legacy version of Samba as it is the latest release supported by samba-vscan-0.3.6b. I'm no expert at this but I think I have all of the dependencies covered and I'm following the documentation with the source code but I'm getting errors as if there is a problem with the source code. I downloaded the source directly from http://ftp.samba.org/pub/samba/stable/samba-3.0.24.tar.gz After running ./configure and make, I get the following error. Compiling client/mount.cifs.c client/mount.cifs.c: In function ‘main’: client/mount.cifs.c:1068: error: ‘PATH_MAX’ undeclared (first use in this function) client/mount.cifs.c:1068: error: (Each undeclared identifier is reported only once client/mount.cifs.c:1068: error: for each function it appears in.) make: *** [client/mount.cifs.o] Error 1 You can view the full output log here. Can anyone help me get this installed or suggest another means of implementing realtime virus scanning on Samba shares?

    Read the article

  • LXDE Interactive password change

    - by Edgar Lina
    I wanted to know if its possible that LXDE ask for a new password at login time when the password has expired. I can see that it works at console login it ask me for a password change, however, on graphic mode (LXDE) it just returns to login screen after entered my user and password and never asks me for a password chage. Let me know if its possible to do so. I am ussing Lubuntu. Thanks in advance to all.

    Read the article

  • Alienware M17x R3: Possible downclock

    - by Ywen
    I installed recently Kubuntu 11.10 32 bits (had graphics driver issues, wanted to try on 32 bits version) on my new Alienware M17x, with a Core i7-2670QM CPU. Cores are supposed to be clocked at 2.2 GHz, however the output of $ cat /proc/cpuinfo | grep -i "hz" gives me: model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 model name : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz cpu MHz : 800.000 If useful, the AC adapter is plugged in (yet the ouput is the same when the computer is powered only by the battery) and I have Firefox and Eclipse running. Does /proc/cpuinfo reflect a possible automatic downclock made to save power if processor load is low or is this output abnormal? EDIT: Ok, I checked and yes, the ouput does vary in function of the load. I reach 2.2 GHz when needed. But my following problem remains. I was checking my CPU clocking because I experienced poor performances when reading 720p video files on Ubuntu with VLC or mplayer when on battery (and I believe VLC by default only uses CPU, not GPU to decode), whereas I haven't got such problems with VLC on Windows (which made me think it wasn't coming from a BIOS option, plus every option in the BIOS regarding the CPU is turned ON).

    Read the article

  • Is there an open source alternative to "Adobe Digital Editions"?

    - by soulsource
    For the moment I run Adobe Digital Editions under Wine to download ebooks burdened with ditigal restriction management. I only use it to open .acsm files supplied by ebook-shops, which contain authentication information required to download the actual DRM'ed ebook files, which I then transfer to my reader-device with calibre. My question is, if there exist open source alternatives to Adobe Digital Editions. They don't need much functionality. I just want to put the .acsm-file in and get the .epub out (no, I don't want to remove the drm, that'd be illegal afaik).

    Read the article

  • How to do firmware updates/upgrades to a Blackberry

    - by Luis Alvarado
    I have several clients/friends that have Blackberry and wish to update their phone but without installing Windows. Any windows. Just doing it from Ubuntu. How can this be done. The update the mention is for the firmware and new programs for the phone. I do not know much about Blackberries since am more of an android guy. At the end they want support for upgrade/update the Blackberry from within Linux and sync it to the PC (Backups, upload/download stuff to and from it). I have seen 2 types of projects working on this: Linberry (From Venezuela ;) ) - http://linberry.webcindario.com/ Barry - http://www.netdirect.ca/software/packages/barry but so far neither offers updating the firmware or downloading updates. Are there any Ubuntu blackberry projects I am not aware of.

    Read the article

  • Display Driver Issue on an hp TX2-1160ea Notebook

    - by Sam
    I'm new to Linux and recently switched to Ubuntu 11.04 due to my project requirement. My laptop has been freezing and going to black screen of death when I run anything related to display (Share desktop, stream video, etc). Today I went through the Ubuntu forum to install the appropriate graphic driver and, after doing it, I rebooted my PC. It gave an error before login saying "select the recovery mode" and after clicking OK, it didn't give the same error on reboot but I've lost the 11.04 graphical interface and all I see is the interface of Ubuntu v10 with slow visuals (even scrolling up/down on browser is really slow). For the reference, here's a desktop screenshot so that you can understand the situation. Also the laptop is overheating. How can I fix this problem? How can i get the Ubuntu 11.04 view back? I also tried Google, but couldn't find any issue like this. Some general Information: Laptop: HP TouchSmart TX2-1160ea Processor: AMD Turion TX2 Memory: 4GB OS: Ubuntu 11.04 Some debugging information:: $ report-hw | grep controller lspci -knn: 00:11.0 SATA controller [0106]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] lspci -knn: 00:14.3 ISA bridge [0601]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller [1002:439d] lspci -knn: 01:05.0 VGA compatible controller [0300]: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics] [1002:9612] lspci -knn: 08:00.0 Network controller [0280]: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] (rev 01) lspci -knn: 09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02) And: $ dpkg -l '*fglrx*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii fglrx 2:8.840-0ubunt Video driver for the ATI graphics accelerato ii fglrx-amdcccle 2:8.840-0ubunt Catalyst Control Center for the ATI graphics un fglrx-control <none> (no description available) un fglrx-control- <none> (no description available) ii fglrx-dev 2:8.840-0ubunt Video driver for the ATI graphics accelerato un fglrx-driver <none> (no description available) un fglrx-driver-d <none> (no description available) un fglrx-kernel-s <none> (no description available) un fglrx-modalias <none> (no description available) un xfree86-driver <none> (no description available) un xfree86-driver <none> (no description available) un xorg-driver-fg <none> (no description available) un xorg-driver-fg <none> (no description available) If you need any more information that could help, just ask.

    Read the article

  • Unable to access the server via SSH?

    - by Rishee
    when I am trying to access the server through ssh it says: ssh: connect to host xx.yyy.zzz.x port 22: Connection refused and on the server in auth.log it shows following log entry: Address xx.yyy.zzz.x maps to xx.yyy.zzz.x.static-pune-vsnl.net.in, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT! I have created a user account for that user and it is also in enabled status. Requested info It is Ubuntu 11.10 It is configured as SSH Server using openssh-server I am trying to connect to this server using Putty from Windows 7 i.e. My Desktop I have also asked this in superuser as per the request of @zpletan and link to that question is given below. http://superuser.com/questions/408080/unable-to-access-the-server-via-ssh Thanks in advance.

    Read the article

  • Is there anyone with an Thinkpad Edge E320 with working Fn-Keys?

    - by Wauzl
    I recently bought a new Lenovo ThinkPad Edge E320. I'm having trouble with my Fn-Keys. The ones for Sound, Brightness and MUltimedia work but those that toggle Wifi/Bluetooth, Webcam and Microphone on and off won't. Fortunately the Wifi, Webcam and Mic are enabled by default. My problem is that I can't disable them (which would be nice to know that this works) and that I can't enable Bluetooth. (I checked that my machine has bluetooth support) Can't say if it would work in Windows as I purchased a machine without Windows. Here is my dmesg: http://pastebin.com/gAgYeDG7 Thanks for reading :)

    Read the article

  • DNS lookup when using a CDN

    - by Steven Wu
    Using a CDN can vastly improve the load time of a website. I been thinking of using it to host all my external files like CSS, JS, Images, Videos etc. However I was thinking when linking to a CDN, wouldn't the browser have to use additional DNS lookup? So wouldn't this be counter productive? Or is the benefit to host every external files on a CDN out weighs the additional cost of a DNS lookup? What are your thoughts?

    Read the article

  • 302 Redirect causes garbage at end of Wordpress link in Facebook

    - by Joao
    When I try to link my Wordpress blog to Facebook, the url doesn't resolve properly. There's garbage appended at the end and Facebook is not able to retrieve information from the site. Happens in every page, post or main entry. Here's what happens: http://clarissarezende.com.br/ shows up in Facebook as http://clarissarezende.com.br/UPLcS/ (when copy/paste the link) and no information about the site shows up in FB. I'm using Wordpress 3.3.1 with ProPhoto 4. Recently I moved the DNS entry on my ISP. The blog is hosted at clarissarezende.com.br/public_html/blog2 and before the DNS would point to public_html and then I changed it to public_html/blog2. Note that I did not move any Wordpress files. Made the (I think) necessary changes all over Facebook, but still no dice... Any ideas on what can be happening?

    Read the article

  • Tracking AdWord ads with different text in Google Analytics

    - by at01
    I'm trying to see how the text in my Google AdWords ads affects my metrics in Analytics. I have auto-linking enabled, so I figured I would be able to automatically see this in Analytics. Unfortunately, if I try to add a second dimension of Traffic Sources-Ad Content, the metrics are only split by the ad's Headline. Most of my tests are changing only the ads' descriptions... So I guess I need to add a tracking parameter like ?campaign=special_text to my URLs? Or is there a way to see the ads split by ad descriptions? Should I add the full suite of utm_campaign/utm_medium/etc parameters? What's the proper way to track these ads which are mostly similar except the ad descriptions?

    Read the article

  • Does Google AdWords care about duplicate content?

    - by Yarin
    Our site offers several families of products, all of which have a common set of configurations. For simplicity's sake, we'll say we offer products A, B and C, each with configurations 1, 2 and 3 Products: A, B, C Configurations: 1, 2, 3 We want to create landing page <- ad group combinations that reflect each possible combination of each product and configuration. Each product and each configuration have their own page, and so each landing page would have include the product content and the configuration content: ourproducts.com/A-1 (Contains copy for A and 1) ourproducts.com/A-2 ourproducts.com/A-3 ourproducts.com/B-1 ... etc... As you can see, this will lead to duplicate content across our product pages, though in different combinations. My question is, does this matter from AdWords point of view? Will there be any negative consequence to repeating portions of content this way?

    Read the article

  • What percent of visitors should click on the next page before you enable prefetching?

    - by Kevin Burke
    Mozilla Firefox and Google Chrome support prefetching via an HTML tag: <!-- in chrome --> <link rel="prerender" href="http://example.org/index.html"> I suppose it is always worthwhile to include this tag if 100% of users on a page click on the "Next Page" button or similar, and never worthwhile to include it if only 2% or 3% of users visit the following page. At what percent of clicks should you turn on prefetching of the next page? 65%? Also, does the calculus change if the current page is HTTP and the next page is HTTPS?

    Read the article

  • Google Analytics doesn't show the correct landing page for my Facebook ads

    - by chiba
    Most of the visitors to my site are supposed to come from an external link with URL my-site.com/en/var from Facebook ads but Google Analytics shows that most of the landing page is my-site.com/var without en which is the prefix for English version of my site. Am I missing something to configure Google Analytics? Or is Facebook sending the visitors to the wrong URL (by the preview page of the Facebook ads the URL is set correct with the prefix en)? Any advice is appreciated.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >