Daily Archives

Articles indexed Tuesday August 28 2012

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

  • What Pattern will solve this - fetching dependent record from database

    - by tunmise fasipe
    I have these classes class Match { int MatchID, int TeamID, //used to reference Team ... other fields } Note: Match actually have 2 teams which means 2 TeamID class Team { int TeamID, string TeamName } In my view I need to display List<Match> showing the TeamName. So I added another field class Match { int MatchID, int TeamID, //used to reference Team ... other fields string TeamName; } I can now do Match m = getMatch(id); m.TeamName = getTeamName(m.TeamId); //get name from database But for a List<Match>, getTeamName(TeamId) will go to the database to fetch TeamName for each TeamID. For a page of 10 Matches per page, that could be (10x2Teams)=20 trip to database. To avoid this, I had the idea of loading everything once, store it in memory and only lookup the TeamName in memory. This made me have a rethink that what if the records are 5000 or more. What pattern is used to solve this and how?

    Read the article

  • Proper Method name for XML builder

    - by Wesley
    I think this is the right stack for this. I have a helper class which builds CAML queries (SharePoint XML for getting list items from SQL) There is one method that is flexibly used to build the queries that get all related votes and comments for a social item. I don't want to call it BuildVoteorCommentXML or something long winded like that. Is there a good naming convention for getting all Join/Foreign Key objects from a core object?

    Read the article

  • should i take Exam 70-515 or should i wait for Exam 70-480 ? [closed]

    - by Filip
    As it states on Microsoft site exam 70-515 is scheduled to retire July 31, 2013. His successor is suppose to be exam 70-480 in my understanding. I know most of the stuff in exam 70-515 but it will take me like one mount to read the book from Microsoft Press Resource Center and get ready for the exam, also i will be paying for the exam not the company i work for. So i think it is better to start reading books and forums that concentrate on how and for what will be exam 70-480 then paying for something that will not be valued for ~ 1 year from now. Whats your thoughts/suggestions ?

    Read the article

  • Philosophy behind the memento pattern

    - by TheSilverBullet
    I have been reading up on memento pattern from various sources of the internet. Differing information from different sources has left me in confusion regarding why this pattern is actually needed. The dofactory implementation says that the primary intention of this pattern is to restore the state of the system. Wiki says that the primary intention is to be able to restore the changes on the system. This gives a different impact - saying that it is possible for a system to have memento implementation with no need to restore. And that ability of restore is a feature of this. OODesign says that It is sometimes necessary to capture the internal state of an object at some point and have the ability to restore the object to that state later in time. Such a case is useful in case of error or failure. So, my question is why exactly do we use this one? Is it to save previous states - or to promote encapsulation between the Caretaker and the Memento? Why is this type of encapsulation so important? Edit: For those visiting, check out this Implementation!

    Read the article

  • Why aren't there native Javascript interpreters for Windows/Mac/Linux?

    - by MebAlone
    It seems to me it would be very useful to use Javascript for general server side scripting tasks as it has more or less the same features as Perl and Python. But AFAIK there are no generally available Javascript interpreters for the major machine architectures. I guess the other problem may be lack of libraries but surely these would come if the interpreters were there. Google's V8 maybe could be a starting point. Does anyone think we'll see this soon?

    Read the article

  • Crappy school, what to do? [closed]

    - by zhenka
    I started programming fairly late. I am 24 years old and about to graduate from a local public university with a really poorly designed curriculum and teachers. Most of the work felt like busy work, and no matter how much I try, it all feels like a waste. I know what a good curriculum looks like. I know what books I should read, but alas it's not so in my university. There is no way at this point that I can catch up to those graduating from places like MIT. My question and this is a serious one: what do I do? Do I just postpone learning the theory I would have learned until later and focus on software engineering skills? How important is the theory in terms of landing a job in New York? Any particular things I should focus on to land a software engineer job? I am very motivated and I just wish someone would give me the time and a chance.

    Read the article

  • Which version of Java should I use for learning?

    - by Dan
    I am a QA engineer interested in mobile development and automation.I have basic programming experience (intermediate level Python, C++ programmer) and as most companies choose Java for writing frameworks I need to pickup Java. I use Ubutnu 12.04 LTS and I will be using Head First Java as learning material. When I searched for JDK options I found Oracle Java 6 and 7 and Open JDK. I read somewhere in Ubuntu forums that Java 6 is not recommended on Ubuntu systems and I am a little bit confused about which version should I use, that would be compatible with the book and the OS.

    Read the article

  • How to find siblings of a tree?

    - by smallB
    On my interview for an internship, I was asked following question: On a whiteboard write the simplest algorithm with use of recursion which would take a root of a so called binary tree (so called because it is not strictly speaking binary tree) and make every child in this tree connected with its sibling. So if I have: 1 / \ 2 3 / \ \ 4 5 6 / \ 7 8 then the sibling to 2 would be 3, to four five, to five six and to seven eight. I didn't do this, although I was heading in the right direction. Later (next day) at home I did it, but with the use of a debugger. It took me better part of two hours and 50 lines of code. I personally think that this was very difficult question, almost impossible to do correctly on a whiteboard. How would you solve it on a whiteboard? How to apprehend this question without using a debugger?

    Read the article

  • What is the best retort to "premature optimization is the root of all evil"

    - by waffles
    Often I hear the sentiment ... "Why worry about performance, write slow code, get your product to market ... don't worry about performance. You can sort that out later" The culmination of this sentiment is: "... premature optimization is the root of all evil ... #winning" I was wondering, does anybody have a good retort to this one liner. Ideally an equally strong one liner that encompasses the reverse of this sentiment?

    Read the article

  • Boss solution vs Developer solution

    - by mahen23
    The problem: When we were sending newsletters to customers, there was no way to confirm if the customer already received the mail. So the boss decided to implement this idea: Boss's Idea: Each time mail was being sent, do an INSERT in a db with the title of the newsletter being sent and the email address which is receving the email address. To ensure that any email address does not receive the same email twice, do a SELECT in the table and find the title of the newsletter being sent: if (title of newsletter is found) { check to see of the email we are sending mail to is already present. if it does, do not send mail } else { send mail } MY idea: create a column called unique and mark it as UNIQUE. Each time mail was being sent, concatenate email + newsletter id and record it in the UNIQUE row. The next time we do a "mysql_affected_rows" check to see if our INSERT was successful, we send the mail, else, there is already a duplicate and no need to send it.

    Read the article

  • What happens if you're unable to solve a problem?

    - by gablin
    I'm a year away from graduating from university, and I'm really looking forward to solving practical problems. Especially non-trivial ones which require a bit of research and a lot of thinking. But at the same time, that is also my greatest fear - being faced with a problem that I'm unable to solve, no matter how hard I try. And with pressure to deliver code on impending deadlines just around the corner, it does look a bit scary when viewing it from the safe playgrounds on uni (where the worst thing that can happen is that you have to redo a course or exam). So for those who have been in industry for any longer length of time, what would happen if you were told to solve a problem that you couldn't? Has it happened, and if so, what did happen? Did they just drop it and said "Oh well, guess we can make do with something else"? Were there consequences? Were you reprimanded, or even fired?

    Read the article

  • No enable mobile broadband option

    - by noboot
    I just migrated from Wubi to actual dual booting Ubuntu and Windows 7 my machine is an Aspire 4750G. When I had (Wubi) Ubuntu 12.04 LTS 64-bit the network applet included the "enable mobile broadband" option. Now, I am using Ubuntu 12.04 LTS (32-bit) actual install as the 64-bit does not work. And my problem is that it does not show the "enable mobile broadband" option. This is so weird considering that I did not encounter the same problem in Wubi based installation.. Kindly help.. I have managed to connect to the internet via Sakis3G Script, still I find the previous method a lot more convenient..

    Read the article

  • Why am I am unable to open exe files?

    - by Aaron
    It doesn't matter what disk I use, it can not open the program. I keep getting the following error: Archive: /media/xxxxxxxx/INSTALL/_Setupa.exe [/media/xxxxxxxxxx/INSTALL/_Setupa.exe] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. zipinfo: cannot find zipfile directory in one of /media/xxxxxx/INSTALL/_Setupa.exe or /media/xxxxxxxxx/INSTALL/_Setupa.exe.zip, and cannot find /media/xxxxxxxxx/INSTALL/_Setupa.exe.ZIP, period. Any ideas?

    Read the article

  • /etc/postfix/transport missing

    - by Thufir
    I'm following the mailman guide but cannot locate /etc/postfix/: root@dur:~# ll /etc/postfix/ total 124 drwxr-xr-x 3 root root 4096 Aug 27 20:04 ./ drwxr-xr-x 170 root root 12288 Aug 27 19:58 ../ -rw-r--r-- 1 root root 373 Aug 14 01:44 dynamicmaps.cf -rw-r--r-- 1 root root 2252 Aug 27 20:04 main.cf -rw-r--r-- 1 root root 1280 Aug 16 23:59 main.cf.1.orig -rw-r--r-- 1 root root 3298 Aug 25 16:59 main.cf.2.mysql -rw-r--r-- 1 root root 1323 Aug 26 00:38 main.cf.3.dovecot -rw-r--r-- 1 root root 2092 Aug 27 20:01 main.cf.4 -rw-r--r-- 1 root root 5563 Aug 14 01:43 master.cf -rw-r--r-- 1 root root 150 Aug 17 00:21 mysql_alias.cf -rw-r--r-- 1 root root 150 Aug 17 00:22 mysql_domains.cf -rw-r--r-- 1 root root 150 Aug 17 00:21 mysql_mailbox.cf -rw-r--r-- 1 root root 19707 Apr 13 13:33 postfix-files -rwxr-xr-x 1 root root 8729 Oct 6 2011 postfix-script* -rwxr-xr-x 1 root root 26498 Apr 13 13:33 post-install* drwxr-xr-x 2 root root 4096 Apr 13 13:33 sasl/ root@dur:~#

    Read the article

  • Precautions during SSH

    - by Shagun
    I recently had to give away my Ubuntu 12.10 root password to one of my friends so that he could SSH into my system and send some files to me. Now he is my friend and I trust him so I was not reluctant in sharing my password. And I did change it afterwards. But it just struck me how can I view all the commands that were executed by some other user remote logging into my system (obviously not my friend. I mean in general).To what extent can they access my data (especially my passwords eg I use Last Pass so can they access my account passwords as well??) And if they open any browser after logging into my system do they have access to all my passwords provided I have saved them using the "remember password" option given by chrome Also what precautions I should take when I am allowing some one to remote login in my system and how can I track the various commands used by them or the changes they made in my system. Also is there some simple way to get notified whenever some one logs into my system apart from checking the /var/log/auth.log file??

    Read the article

  • weird text stuttering

    - by user85724
    i've been having a strange problem with ubuntu lately. i searched in the forums and so but couldn't find anything. the things is that text in firefox and text editors stutters or freezes randomly. for example, when i am writing and url and suddenly want to erase it, the last letters freeze in their place for a few seconds while the others are being erased. or when i am reading something in the text editor, it mixes paragraphs and such, like an old and crazy epson inkjet printer.. please help?

    Read the article

  • How to prevent Ubuntu from changing screen brightness?

    - by cholazer
    I have recently installed 12.04 on ASUS-K53SV-V300. I can change the brightness on start-up with: echo 0 > /sys/class/backlight/acpi_video0/brightness >> /etc/rc.local or manually by Fn key. But, whenever Ubuntu dim my screen brightness to save power or wake-up from suspend or inactive for 20-30 seconds, brightness reset to high (my problem get much more when on battery). How can I disable screen brightness service to prevent it from changing my brightness? What service work on screen brightness? If I disable this service, can I manually set brightness by command? I found a program to work on brightness instead of default power manager.

    Read the article

  • How do I select Wireless radio portions in Ubuntu?

    - by Ryan McClure
    Bear with me, to be honest I have no idea what Wireless radio portions are.... At my school, I was told my the user support that the wireless network in my dorm uses 801.11 A/B/G/N. For some reason, the wireless in my room doesn't work. However, other buildings use only A/B/G, they say. In any other building, my wireless works fine. How do I tell my system to use the G portion only? (As requested by user support in the email I received). Here are the various logs/output requested: dmesg lshw -c network lsmod

    Read the article

  • How do I enable sound with the "linux-virtual" kernel?

    - by Ola Tuvesson
    I've been trying to enable sound for the linux-virtual kernel as I want to run an ultra slim Ubuntu server under VirtualBox but need audio. The resource usage difference between virtual and generic/server is surprisingly large, with the virtual kernel system using 80Mb less RAM after a clean boot (130Mb vs 210Mb), and I really want to squeeze every clock cycle and available byte I can out of the system. Besides, the virtual kernel has some additional optimisations enabled specifically for virtual machines (or so I am told). Now I have compiled my own kernel a few times in the past, for example to include the Intel-PHC module (for improved power management on Thinkpads), so the concept is not entirely alien to me, but I've run into a strange problem which I'm hoping someone can help explain: When I do a diff between the config files for Linux-generic and Linux-virtual there are precious few differences, and certainly none which pertain to sound support; there are really only five or six lines which differ, and they're mainly to do with i/o timing, sleep state and priorities. What gives? I expected the differences to be extensive, and that I would be able to identify the options that enabled audio by looking at them, but my problem doesn't seem to be related to the config file at all (yes, I know about the sound drivers section - it is identical between the two kernel configs). Am I looking in the wrong place? Many thanks!

    Read the article

  • Dual Monitor/Xinerama not working; cannot even detect on-board graphic card

    - by Steven H
    I have Kubuntu 12.04 and two identical VGA monitors. One I plugged via DVI-VGA adapter into the DVI port of my discrete AMD Radeon HD 6670, the other into the VGA port of my on-board graphic card (Radeon HD 6410D). After installing Kubuntu I got a black screen, so I booted with nomodeset and installed AMD's catalyst drivers but only the monitor plugged into the discrete graphic card worked. Using lspci I saw that the on-board graphics was not listed. Then I found in the BIOS settings the options "Surround View" and "Onboard Dual Link DVI" both disabled. After enabling both, the on-board graphics card shows up in lspci but in amdcccle, it only shows as [Uknown display]Uknown adapter. When I try to enable xinerama, I get a black screen after rebooting on both monitors. I tried several options and hints from the web but nothing worked so far. I also reinstalled the AMD drivers several times. What should I do?

    Read the article

  • I can't get suspend, hibernate and shutdown to work in Ubuntu 12.04

    - by Fostext
    I recently built a computer with these specs: Asus Motherboard, Intel i3 3.3 GHz dual processor, 8 GB of RAM. I installed 12.04 on a brand new hard drive. I partitioned the hard drive between root, home and swap like I have often read how to do. I cannot get this machine to properly shutdown. I have to hold the power button down now. Although, for the first few days it properly shutdown. I also cannot get the system to hibernate or suspend properly. I have read tons on this and watched many YouTube tutorials on how to fix both, but the computer never wakes up after suspend or hibernate. It just stays on a black screen. Can anyone help? I love 12.04 so far, but these setbacks are making me worried about stability and power management issues. Also, I wonder if it's really bad for the hard drive to force the CPU to shutdown.

    Read the article

  • Screen blink twice every 10 seconds on ubuntu 12.04

    - by Erik
    On 12.04 64-bit, about every 5 seconds my screen blinks twice. Even during installation of Ubuntu from CD, this happens during the complete process. I had no problems with earlier Ubuntu versions (earlier version was 10.04LTS 64-bit) System specs: I7-2600K MSI 7681 Motherboard 16 GB RAM 2 x Nvidia 560 card SLI (only 1 screen on 1 card active during install process) This flickering is driving me crazy, please help.

    Read the article

  • Why OpenDialog.py don't work on Jotty application

    - by venerable13
    I'm a Python beginner, I installed quickly, I wrote a "quickly tutorial" in terminal and I did all the steps before at: "However, the application is not complete. There are a few things left for you to do:" All the next steps aren't finished yet because when I use open dialog and select one of the files saved, the content of the file isn't showed on "textview1", Why? Only is deleted the content written. Before if was used without dialog works great. SaveDialog.py work great. -def on_mnu_new_activate(self, widget, data=None) don't work neither. -If I use the bold lines by the others don't work. ###def open_file(self, widget, data=None): def on_mnu_open_activate(self, widget, data=None): ###def save_file(self, widget, data=None): def on_mnu_save_activate(self, widget, data=None): To view the code, go to the link above, unrar the archive, install "quickly" if you don't have it yet, place inside on jotty directory, then put "quickly run", "quickly edit", "quickly design", depending what do you want to do. Code - problematic code with OpenDialog implemented. Code-part1 - works OK, but without OpenDialog. I need principally that OpenDialog function work great.

    Read the article

  • Full screen: launchbar + panel overlaps when showing a dialog box

    - by user85921
    I'm developing a program for 12.04 that will run on full-screen, so I would like to have full control of what appears on the screen. However, when I show another window (possibly a dialog/message box), the Uunity Panel and Launcher appears on the top and left side of the screen. I've experienced this behavior with other applications (Firefox, Gnubg) as well when in full-screen mode. I tried to play with the settings, now my dialog box is hidden from the the taskbar, set to float on it's parent, which is my full screen window. The problem still exists. Is there a way to prevent these panels from showing up, when the new window isn't shown in taskbar, or it's parent is a full-screen window? Or do I need to completely disable them?

    Read the article

  • Could not connect to any LDAP server as (null) error

    - by wirelessman
    I am using a Windows 2008 Server as my LDAP server and on a Ubuntu 12.04 client I am trying to connect to it. I get the following error: nss_ldap: could not connect to any LDAP server as (null) - Can't contact LDAP server From my Ubuntu client I run the following: ldapsearch -h 10.1.1.251 -D admin -w password -s base dc=ad,dc=xxx,dc=com -p 389 and get the following success message # search result search: 2 result: 0 Success Any help would be greatly appreciated.

    Read the article

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