Daily Archives

Articles indexed Friday March 4 2011

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

  • Do you write common pre-conditions for a large number of unit test cases ?

    - by Vinoth Kumar
    I have heard/read writing common pre-conditions for a large number of test cases is a bad thing, since this dependency may cause large number of test cases to fail if something changes . What are your thoughts on it ? If this is so , then what exactly is the purpose of setUp() method in Junit that runs before each test case ? If the same code inside setUp() runs before each test case , why cant it run only once before running all the test cases together ?

    Read the article

  • What do I need to do, to get placed in any software company?

    - by Anto Aravinth
    I'm doing my 3rd year CSE Engineering. I guess this is the right time to ask this question! As in the next year, I'm going to do projects, "get my hands dirty". And there is only few days left out, as I know many people in Stack Overflow are working in Software field, I thought to ask these question. Does the project that I'm doing in my final year need to be excellent? If so, what kind of project to do? And how do you say that the project is excellent or not? Writing the code is very fun and serious at times. But the code should have a good algorithm? And mostly in any software companies interview, what kind of question they ask? Not but not the least, mastering in any particular language speaks in interviews?

    Read the article

  • How would I get work as a PHP, MySQL Developer?

    - by Matthew
    I've been working with PHP and MySQL to create various projects that I've been interested in, I can design the user interface, and the back end programming. I've created simple social networking sites, book marking sites, and project management software. So what steps would I take to get a job? Is there a market for PHP, MySQL web developers? Is it possible to take instructions and work from home for someone? How would I accept payment? Should I start a company? or work for someone? I am currently based in South Africa, many of the companies are lacking the innovation that I'm seeking for in a company.

    Read the article

  • Shut down/log out, me menu absent in panel

    - by Chethan S.
    I upgraded my Lucid installation to Maverick today via an alternate CD. Everything went fine but the shut down icon which provides the options to log out, suspend, hibernate etc. in the top right corner of the panel and the me menu which allows to set chat status are absent! I tried searching for suitable options in 'Add to Panel' but cannot find the exact solution - shut down provides option only to shut down, log out only to log out and so on.

    Read the article

  • How to retrieve data from a corruped volume

    - by explorex
    Hi, My Ubuntu 10.10 just crashed(probably due to hardware error and in the end I was getting error like Unknown filesystem ..... grub> .. GRUB console before i could take some action) and i reinstalled the same version form USB stick. I had ubuntu installed in ext4 file system and I am also having the same filesystem in the same hard disk on different drive. When I try to access my previous filesystem, i get error Error mounting: mount: wrong fs type, bad option, bad superblock on /dev/sda6, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so I had some important files in the previous volume, I don't know how to retrieve them. And what are the chances that I would get the same outcome (hardware error)? Please help me!

    Read the article

  • Regain Sudo rights after removing from admin group

    - by berkes
    Hello, I accidentally removed myself from the admin group when editing the user. Now I can no longer use sudo. The error says: ber is not in the sudoers file. This incident will be reported. I booted up in rescue mode, but, when going into root prompt, it asks me for the root password. I don't have one, and providing with my own (first and only ubuntu-user) password, it won't allow entrance. My harddisk is encrypted, but only the /home/user part, not the entire disk, afaik. What can I do?

    Read the article

  • How to get rid of multiple linux versions in grub boot menu

    - by Silver Light
    I've been using dual boot on my PC for some time now, to use Ubuntu along side with Windows 7. One very disturbing thing happens, when Ubuntu linux core gets updated (this happens once in a while). They are added as options to the grub menu so, my boot menu now looks like this: Ubuntu, with linux 2.6.35-27 generic Ubuntu, with linux 2.6.35-27 generic (recovery mode) Ubuntu, with linux 2.6.35-25 generic Ubuntu, with linux 2.6.35-25 generic (recovery mode) Ubuntu, with linux 2.6.35-24 generic Ubuntu, with linux 2.6.35-24 generic (recovery mode) Ubuntu, with linux 2.6.35-22 generic Ubuntu, with linux 2.6.35-22 generic (recovery mode) Memory test Windows 7 This gets very annoying, because I want to load windows by default, but after every update it shifts down and I have to go to grub config and change the default option. My question: How to get rid of older versions of linux in the grub menu and leave only the newest one?

    Read the article

  • auto-update and email

    - by Colin Pickard
    I've got several Ubuntu 10.10 servers which should all be set to do automatic security updates. Is there any way I could get them to send me an email when they apply updates (particularly if they fail)? I'm using r-u-on to monitor availability, disk space etc but the security updates are very important and I don't have a good way to monitor them. I could possibly script something myself but I figured it's the kind of thing that's probably been solved many times already.

    Read the article

  • My ubuntuone is broken, what is the problem?

    - by user6962
    I am on 10.10 and u1sdtool seems to be completely broken. I reinstalled it, no change. I can add my PC to the account, but it is added twice(!) every time I tried. So I have my netbook and two times my PC in the account. The netbook with 10.04 has no problems. Below is the error msg I get when attempting to startup Ubuntu One on the command line. desktop:~$ u1sdtool --status Oops, an error ocurred: Traceback (most recent call last): Failure: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. desktop:~$ Starting it from the Me Menu has the same effect, the HDD will get really busy for a minute and then nothing happens, the client will not start. Nothing in the syslog or anywhere.

    Read the article

  • How can I install other applications after a failed installation using apt-get?

    - by Jonas
    I have a VPS with Ubuntu Server 10.10 x64. I tried to install Java using apt-get install openjdk-6-jre but that fails, see ca-certificates-java fails to install. Now I would like to install PHP with sudo apt-get install nginx php5-fpm php-apc php5-pgsql php5-suhosin but that also fails, with the same error message as I had with Java. Why is that? How can I install other applications now after the installation of Java has failed?

    Read the article

  • How to configure kubuntu for lightweight low-memory usage?

    - by augustin
    I just upgraded an old, secondary computer to the latest Kubuntu (10.10). It seems the effort was a bit too much for the hardware and one 512MB memory module died. I tried to take it away, clean the connectors, put it back several times, but to no avail. Until such a time I can find a second hand DDR memory module, I am left with a meagre 256MB RAM, which is below the official requirements (384MB) to run Kubuntu/KDE. Indeed: the computer constantly swaps the memory, making everything painfully slow. Since Kubuntu is already installed and I use it on all my computers (and I want to keep KDE for when I really need it), how can I configure Kubuntu to squeeze out every bit of unnecessary memory usage? This is a secondary computer but still very useful. We use it mostly for web browsing. A "lightweight" tag is missing.

    Read the article

  • Setup CRON weekly backup

    - by sadmicrowave
    I want to make a backup of my /var/lib/mysql and /var/www folders and save them as tar.gz files to my mounted network file server (uslons001). Here is my bash file located in: /etc/cron.weekly/mysqlbackup.sh #!/bin/bash mkdir ~/uslons001/`date +%d%m%y` tar -czf ~/uslons001/`date +%d%m%y`/mysql.tar.gz /var/lib/mysql tar -czf ~/uslons001/`date +%d%m%y`/www.tar.gz /var/www tar -czf ~/uslons001/`date +%d%m%y`.tar.gz ~/uslons001/`date +%d%m%y` echo Backup Completed `date` >> ~/backuplog Which works PERFECTLY fine when I execute it in a cmd shell but when I setup the cron job it never runs, so I'm not setting the cron job up properly. My cron job looks like this. 30 7 * * fri /etc/cron.weekly/mysqlbackup.sh Which should execute at 7:30AM every Friday... What am I doing wrong? UPDATE1 - change the cron job line to the following: 44 8 * * 5 /etc/cron.weekly/mysqlbackup.sh with still no luck...is there a cron error log file that I can read to help pin point where the problem is?

    Read the article

  • ca-certificates-java fails when trying to install openjdk-6-jre

    - by Jonas
    I use a VPS with Ubuntu Server 10.10 x64. I want to use Java and run the command sudo apt-get install openjdk-6-jre but it fails because the installation encounted errors while processing ca-certificates-java. I have tried to install the failed package with: sudo apt-get install ca-certificates-java How can I solve this? I have run sudo apt-get update and sudo apt-get upgrade but I get the same errors after that. I have also installed Ubuntu Server x64 on a VirtualBox, but the two Ubuntu Server 10.10 has different kernel versions (2.6.35 on VirtualBox and 2.6.18 on my VPS). And on VirtualBox I can install Jetty without any problems. The VPS is a fresh install of Ubuntu Server 10.10 x64, the first command I was running was sudo apt-get install openjdk-6-jre. When I run sudo apt-get install ca-certificates-java I get this message: Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates-java is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. Do you want to continue [Y/n]? Here I press Y then I get this message: Setting up ca-certificates-java (20100412) ... creating /etc/ssl/certs/java/cacerts... error adding brasil.gov.br/brasil.gov.br.crt error adding cacert.org/cacert.org.crt error adding debconf.org/ca.crt error adding gouv.fr/cert_igca_dsa.crt error adding gouv.fr/cert_igca_rsa.crt error adding mozilla/ABAecom_=sub.__Am._Bankers_Assn.=_Root_CA.crt error adding mozilla/AOL_Time_Warner_Root_Certification_Authority_1.crt error adding mozilla/AOL_Time_Warner_Root_Certification_Authority_2.crt error adding mozilla/AddTrust_External_Root.crt error adding mozilla/AddTrust_Low-Value_Services_Root.crt error adding mozilla/AddTrust_Public_Services_Root.crt error adding mozilla/AddTrust_Qualified_Certificates_Root.crt error adding mozilla/America_Online_Root_Certification_Authority_1.crt error adding mozilla/America_Online_Root_Certification_Authority_2.crt error adding mozilla/Baltimore_CyberTrust_Root.crt error adding mozilla/COMODO_Certification_Authority.crt error adding mozilla/COMODO_ECC_Certification_Authority.crt error adding mozilla/Camerfirma_Chambers_of_Commerce_Root.crt error adding mozilla/Camerfirma_Global_Chambersign_Root.crt error adding mozilla/Certplus_Class_2_Primary_CA.crt error adding mozilla/Certum_Root_CA.crt error adding mozilla/Comodo_AAA_Services_root.crt error adding mozilla/Comodo_Secure_Services_root.crt error adding mozilla/Comodo_Trusted_Services_root.crt error adding mozilla/DST_ACES_CA_X6.crt error adding mozilla/DST_Root_CA_X3.crt error adding mozilla/DigiCert_Assured_ID_Root_CA.crt error adding mozilla/DigiCert_Global_Root_CA.crt error adding mozilla/DigiCert_High_Assurance_EV_Root_CA.crt error adding mozilla/DigiNotar_Root_CA.crt error adding mozilla/Digital_Signature_Trust_Co._Global_CA_1.crt error adding mozilla/Digital_Signature_Trust_Co._Global_CA_2.crt error adding mozilla/Digital_Signature_Trust_Co._Global_CA_3.crt error adding mozilla/Digital_Signature_Trust_Co._Global_CA_4.crt error adding mozilla/Entrust.net_Global_Secure_Personal_CA.crt error adding mozilla/Entrust.net_Global_Secure_Server_CA.crt error adding mozilla/Entrust.net_Premium_2048_Secure_Server_CA.crt error adding mozilla/Entrust.net_Secure_Personal_CA.crt error adding mozilla/Entrust.net_Secure_Server_CA.crt error adding mozilla/Entrust_Root_Certification_Authority.crt error adding mozilla/Equifax_Secure_CA.crt error adding mozilla/Equifax_Secure_Global_eBusiness_CA.crt error adding mozilla/Equifax_Secure_eBusiness_CA_1.crt error adding mozilla/Equifax_Secure_eBusiness_CA_2.crt error adding mozilla/Firmaprofesional_Root_CA.crt error adding mozilla/GTE_CyberTrust_Global_Root.crt error adding mozilla/GTE_CyberTrust_Root_CA.crt error adding mozilla/GeoTrust_Global_CA.crt error adding mozilla/GeoTrust_Global_CA_2.crt error adding mozilla/GeoTrust_Primary_Certification_Authority.crt error adding mozilla/GeoTrust_Universal_CA.crt error adding mozilla/GeoTrust_Universal_CA_2.crt error adding mozilla/GlobalSign_Root_CA.crt error adding mozilla/GlobalSign_Root_CA_-_R2.crt error adding mozilla/Go_Daddy_Class_2_CA.crt error adding mozilla/IPS_CLASE1_root.crt error adding mozilla/IPS_CLASE3_root.crt error adding mozilla/IPS_CLASEA1_root.crt error adding mozilla/IPS_CLASEA3_root.crt error adding mozilla/IPS_Chained_CAs_root.crt error adding mozilla/IPS_Servidores_root.crt error adding mozilla/IPS_Timestamping_root.crt error adding mozilla/NetLock_Business_=Class_B=_Root.crt error adding mozilla/NetLock_Express_=Class_C=_Root.crt error adding mozilla/NetLock_Notary_=Class_A=_Root.crt error adding mozilla/NetLock_Qualified_=Class_QA=_Root.crt error adding mozilla/Network_Solutions_Certificate_Authority.crt error adding mozilla/QuoVadis_Root_CA.crt error adding mozilla/QuoVadis_Root_CA_2.crt error adding mozilla/QuoVadis_Root_CA_3.crt error adding mozilla/RSA_Root_Certificate_1.crt error adding mozilla/RSA_Security_1024_v3.crt error adding mozilla/RSA_Security_2048_v3.crt error adding mozilla/SecureTrust_CA.crt error adding mozilla/Secure_Global_CA.crt error adding mozilla/Security_Communication_Root_CA.crt error adding mozilla/Sonera_Class_1_Root_CA.crt error adding mozilla/Sonera_Class_2_Root_CA.crt error adding mozilla/Staat_der_Nederlanden_Root_CA.crt error adding mozilla/Starfield_Class_2_CA.crt error adding mozilla/StartCom_Certification_Authority.crt error adding mozilla/StartCom_Ltd..crt error adding mozilla/SwissSign_Gold_CA_-_G2.crt error adding mozilla/SwissSign_Platinum_CA_-_G2.crt error adding mozilla/SwissSign_Silver_CA_-_G2.crt error adding mozilla/Swisscom_Root_CA_1.crt error adding mozilla/TC_TrustCenter__Germany__Class_2_CA.crt error adding mozilla/TC_TrustCenter__Germany__Class_3_CA.crt error adding mozilla/TDC_Internet_Root_CA.crt error adding mozilla/TDC_OCES_Root_CA.crt error adding mozilla/TURKTRUST_Certificate_Services_Provider_Root_1.crt error adding mozilla/TURKTRUST_Certificate_Services_Provider_Root_2.crt error adding mozilla/Taiwan_GRCA.crt error adding mozilla/Thawte_Personal_Basic_CA.crt error adding mozilla/Thawte_Personal_Freemail_CA.crt error adding mozilla/Thawte_Personal_Premium_CA.crt error adding mozilla/Thawte_Premium_Server_CA.crt error adding mozilla/Thawte_Server_CA.crt error adding mozilla/Thawte_Time_Stamping_CA.crt error adding mozilla/UTN-USER_First-Network_Applications.crt error adding mozilla/UTN_DATACorp_SGC_Root_CA.crt error adding mozilla/UTN_USERFirst_Email_Root_CA.crt error adding mozilla/UTN_USERFirst_Hardware_Root_CA.crt error adding mozilla/ValiCert_Class_1_VA.crt error adding mozilla/ValiCert_Class_2_VA.crt error adding mozilla/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.crt error adding mozilla/Verisign_Class_1_Public_Primary_Certification_Authority.crt error adding mozilla/Verisign_Class_1_Public_Primary_Certification_Authority_-_G2.crt error adding mozilla/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.crt error adding mozilla/Verisign_Class_2_Public_Primary_Certification_Authority.crt error adding mozilla/Verisign_Class_2_Public_Primary_Certification_Authority_-_G2.crt error adding mozilla/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.crt error adding mozilla/Verisign_Class_3_Public_Primary_Certification_Authority.crt error adding mozilla/Verisign_Class_3_Public_Primary_Certification_Authority_-_G2.crt error adding mozilla/Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.crt error adding mozilla/Verisign_Class_4_Public_Primary_Certification_Authority_-_G2.crt error adding mozilla/Verisign_Class_4_Public_Primary_Certification_Authority_-_G3.crt error adding mozilla/Verisign_RSA_Secure_Server_CA.crt error adding mozilla/Verisign_Time_Stamping_Authority_CA.crt error adding mozilla/Visa_International_Global_Root_2.crt error adding mozilla/Visa_eCommerce_Root.crt error adding mozilla/WellsSecure_Public_Root_Certificate_Authority.crt error adding mozilla/Wells_Fargo_Root_CA.crt error adding mozilla/XRamp_Global_CA_Root.crt error adding mozilla/beTRUSTed_Root_CA-Baltimore_Implementation.crt error adding mozilla/beTRUSTed_Root_CA.crt error adding mozilla/beTRUSTed_Root_CA_-_Entrust_Implementation.crt error adding mozilla/beTRUSTed_Root_CA_-_RSA_Implementation.crt error adding mozilla/thawte_Primary_Root_CA.crt error adding signet.pl/signet_ca1_pem.crt error adding signet.pl/signet_ca2_pem.crt error adding signet.pl/signet_ca3_pem.crt error adding signet.pl/signet_ocspklasa2_pem.crt error adding signet.pl/signet_ocspklasa3_pem.crt error adding signet.pl/signet_pca2_pem.crt error adding signet.pl/signet_pca3_pem.crt error adding signet.pl/signet_rootca_pem.crt error adding signet.pl/signet_tsa1_pem.crt error adding spi-inc.org/spi-ca-2003.crt error adding spi-inc.org/spi-cacert-2008.crt error adding telesec.de/deutsche-telekom-root-ca-2.crt failed (VM used: java-6-openjdk). dpkg: error processing ca-certificates-java (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: ca-certificates-java E: Sub-process /usr/bin/dpkg returned an error code (1) Update I also get a problem when running java -version: Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. My VPS had 128MB of Memory, I changed to 256MB but got the same problem. Then I changed to 512MB and got the same problem. I found a related post on a forum: Sub-process /usr/bin/dpkg returned an error code (1) And I tried: sudo apt-get clean sudo apt-get --reinstall install openjdk-6-jre sudo dpkg --configure -a But I got the same problem, even when I'm using 512MB of Memory. Any suggestions?

    Read the article

  • Why does my application hang in interruptible state?

    - by Greg
    Hello, I am running on Ubuntu 10.04 LTS Server an GTK application that used to work fine. It suddenly started to hang in interruptible state (Sl+) without any apparent reason. Here is a snippet of the strace: poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, 0) = 0 (Timeout) poll([{fd=5, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=5, revents=POLLOUT}]) writev(5, [{"\2\30\4\0\224\4\240\0\0@\0\0\37\0\240\0\2\4\4\0\224\4\240\0\0@\0\0\37\0\240\0"..., 192}, {NULL, 0}, {"", 0}], 3) = 192 read(5, 0x2ba9ac4, 4096) = -1 EAGAIN (Resource temporarily unavailable) I googled that line read(5, 0x2ba9ac4, 4096), which seems to be more significant, and it seems that many other applications tend to have the same problem. I tried to restart my X server, but it didn't help. Do you have an idea how to solve this problem?

    Read the article

  • Apple MBP 7,1 Color profile xcalib

    - by cloudlight
    I have installed Kubuntu 64bit on my MBP 7,1. After installation I was going through following documentation (screen) https://help.ubuntu.com/community/MacBookPro7-1/Maverick#Screen I am confused about line /usr/bin/xcalib "/etc/xcalib/<insert name of profile here>" which profile to put at that place? I am getting following output on command prompt bharat@bharat-MacBookPro:~$ ls /etc/xcalib Color LCD-00000610-0000-9CC5-0000-000004273140.icc EPSON PJ -00004CA3-0000-A600-0000-000028E98001.icc SyncMaster-00004C2D-0000-0117-4C45-31370B4074F5.icc

    Read the article

  • How do I enable WebGL sites with Firefox 4 Beta?

    - by Greg Grossmeier
    I am using Firefox 4.0b12 from the Mozilla Team's "Firefox Next" PPA. My about:config has webgl.enabled_for_all_sites set to true as most guides recommend that and also say that is all that is needed. It doesn't work for me. The main Mozilla Demos page ("Web O' Wonder") gives me: Unfortunately, while your browser supports WebGL, your video drivers may be too old. To view any of the demos tagged with WebGL, try updating your drivers at NVIDIA, AMD, and Intel. You can still watch screencasts of the WebGL demos or fully experience our other non-WebGL demos without updating. This Mozilla demo gives me "No WebGL context found."

    Read the article

  • Windows not closing

    - by bhanu
    After login, a number of windows such as Desktop, Downloads, and Pictures opens automatically. When I try to close them one by one closes itself but last one opens all indicating starting file manager in lower panel/status bar. After login all the windows such as desktop,download,home opens automatically when i try to minimise them all minimise. when i try to close them one after another they disappears but not last one which closes itself and reappear along with other indicating message starting file manager in status bar. ( it seems that there are a number of open nautilus windows at startup upon login, and when the user tries to close them, nautilus crashes and tries to restart)

    Read the article

  • How to set up dual wired and wireless connections?

    - by Col
    My laptop has both wireless and a wired connection capabilities. Can I connect to a router A using wireless and a separate router B using wired ethernet at the same time without having to switch back and forth? Thanks for replying so quickly. I wish to connect to two separate networks. The wireless connection is to router A which is connected to broadband internet. The wired connection is to router B which I wish to share files and a printer on 1 or 2 other desktops also using wired connections on B and maybe using synergy to have only one keyboard and mouse for 2 desktops. The wireless laptop is the only one required to have internet access.

    Read the article

  • Ok to target product names in adwords?

    - by Tom Gullen
    If I have widget company called "Widget Designer" and I have a direct competitor who has "Widgitator Version 5", am I allowed to target a campaign using the literal keywords "Widgitator"? Is this OK? Will they ever find out? Is it bad business? Update I can't really say what the words are, but this is a good example, if my product is called "Chair-o-matic" and it makes chairs, and a competitors is called "Chair Maker 5" can I target the keyword pair "Chair Maker"?

    Read the article

  • What does the impression and ctr means in google webmaster

    - by KoolKabin
    I am checking google webmaster tools. I entered the search queries section. There i found alot keywords and their impression and ctr etc. I clicked on one of the query keyword there it shows the keyword and position in search result, but when i go to google.com and type the specified keyword it shows no impressions too... how do i measure find my site's impression on google.com my site: http://www.trekkingandtoursnepal.com keyword: trekking nepal

    Read the article

  • What would be the level of effort required to implement a screencapture command on a PS3 game?

    - by Sean Scott
    Looking to see what the level of effort is for implementing a screen capture command into PS3 game by a mid-level PS3 game developer. Bonus for a description of what is involved in the process... EDIT Not sure how to get back my question since it was the first but let me clarify some things. @Nate Bross, nope I am not the actor although i've fielded calls for him on occasion @coderanger my intent was to try and speak to other PS3 developers, however coming from a web development no one in my social circle close or extended develops on the PS3. Additionally i'm interested in hearing the effort required in terms of hours so that this information can be passed on to a client. A client who has a game on the PS3 using the unreal engine. Convo with devs sometimes go something like "can you implement feature a" which gets a response "this will take us 8 weeks and an army". Trying to be educated before the ask. I hope that helps If anyone here is a PS3 game dev and would like to respond off site so as not to break NDA that would be awesome. @Roger it would be from within the game, something that users can use. Something akin to the iphone screencap utility. No need to get fancier than that.

    Read the article

  • How to implment the database for event conditions and item bonuses for a browser based game

    - by Saifis
    I am currently creating a browser based game, and was wondering what was the standard approach in making diverse conditions and status bonuses database wise. Currently considering two cases. Event Conditions Needs min 1000 gold Needs min Lv 10 Needs certain item. Needs fulfillment of another event Status Bonus Reduces damage by 20% +100 attack points Deflects certain type of attack I wish to be able to continually change these parameters during the process of production and operation, so having them hard-coded isn't the best way. All I could come up with are the following two methods. Method 1 Create a table that contains each conditions with needed attributes Have a model named conditions with all the attributes it would need to set them conditions condition_type (level, money_min, money_max item, event_aquired) condition_amount prerequisite_condition_id prerequisite_item_id Method 2 write it in a DSL form that could be interpreted later in the code Perhaps something like yaml, have a text area in the setting form and have the code interpret it. condition_foo: condition_type :level min_level: 10 condition_type :item item_id: 2 At current Method 2 looks to be more practical and flexible for future changes, trade off being that all the flex must be done on the code side. Not to sure how this is supposed to be done, is it supposed to be hard coded? separate config file? Any help would be appreciated. Added For additional info, it will be implemented with Ruby on Rails

    Read the article

  • Distributed C++ game server which use database.

    - by Slav
    Hello. My C++ turn-based game server (which uses database) does stand against current average amount of clients (players), so I want to expand it to multiple (more then one) amount of computers and databases where all clients still will remain within single game world (servers will must communicate with each other and use multiple databases). Is there some tutorials/books/common standards which explain how to do it in a best way?

    Read the article

  • Sort Array in PHP

    - by DonCroce
    I have a script which gets some values from a DB. The structure of the vars is as the following: $dump["likes"] = 1234; $likes["data"][$i]["name"] = "ABCDEFG"; for($i=0;$i<=$max;$i++){ $data[$i]["likes"] = $dump["likes"]; $data[$i]["name"] = $likes["data"][$i]["name"]; } //Print Here Sorted array (highest value in "like" first) I just need a way to find out in which entry the biggest "likes" are :) So far i have tried array_multisort, but it showed me "inconsistent size" or some error... Thanks for all your help!

    Read the article

  • misleading plot issue in mathematica

    - by Qiang Li
    I want to study some "strange" functions by plotting them out in mathematica. One example is the following: mod2[x_] := Which[Mod[x, 2] >= 1, -2 + Mod[x, 2], True, Mod[x, 2]]; f[x_] := Which[-1 <= x <= 1, Abs[x], True, Abs[mod2[x]]]; fn[x_, n_] := Sum[(3/4)^i*f[4^n*x], {i, 0, n}] Plot[{fn[x, 0], fn[x, 1], fn[x, 2], fn[x, 5]}, {x, -2, 2}] However, the plot I got from mma is misleading, in the sense that the maxima and minima of fn[x, 5] should be on the same two levels. But due to high oscillation of the function, and the fact that clearly mma only takes limited number of points to draw the function, you see the plot exhibit strange behavior. Is there any option in plot to remedy for this? Many thanks.

    Read the article

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