Daily Archives

Articles indexed Wednesday November 30 2011

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

  • How to organize functional programs

    - by bleakcabal
    In OOP, your basic unit of organization for code is the class. A frequently used methodology in Java, C# and similar languages is to organize your code around having one file for each class with the file name following the class name. You can consider each of these class as a unit of organization to group a single concept. These classes are in in namespaces which often follow the directory structure of the files in the solution/project. Namespaces are another level of organization. How are large projects in functional languages typically organized? How to you determine how to split your functions into different files? Are other units of grouping beside files used? How is code typically organized within a single file?

    Read the article

  • WebLogic Server internal server error [migrated]

    - by Abhinav Pandey
    When I deployed a project in Apache Tomcat 6.0 it is working fine. When I deployed a same project in WebLogic Server 10.3 it's showing an error: Error 500--Internal Server Error javax.servlet.ServletException: [HTTP:101249][weblogic.servlet.internal.WebAppServletContext@ae43b8 - appName: '_appsdir_ab_dir', name: 'ab', context-path: '/ab', spec-version: 'null']: Servlet class FirstServlet for servlet FirstServlet could not be loaded because the requested class was not found in the classpath . java.lang.UnsupportedClassVersionError: FirstServlet : Unsupported major.minor version 51.0.

    Read the article

  • Controllers in CodeIgniter

    - by Dileep Dil
    I little bit new to the CodeIgniter framework and this is my first project with this framework. During a chat on StackOverflow somebody said that we need to make controllers tiny as possible. Currently I have a default controller named home with 1332 lines of codes (and increasing) and a model named Profunction with 1356 lines of codes (and increasing). The controller class have about 46 functions on it and also with model class. I thought that Codeigniter can handle large Controllers or Models well, is there any problem/performance issue/security issues regarding this?

    Read the article

  • What's the point of initializing a variable with the same value twice?

    - by JoeM05
    I was reading Ben Cherry's "JavaScript Module Pattern: In-Depth", and he had some example code that I didn't quite understand. Under the Cross-File Private State heading, there is some example code that has the following: var _private = my._private = my._private || {} This doesn't seem to be different from writing something like this: var _private = my._private || {} What's happening here and how are these two declarations different?

    Read the article

  • Should back end processes be included in use cases in requirements document?

    - by bizso09
    We're writing a requirements document for our client and need to include the use cases of the system. We're following this template: ID Description Actors Precondition Basic Steps Alternate Steps Exceptions Business validations/Rules Postconditions In the Basic Steps section, should we include steps that the system performs in the back end or should we only include steps that the user directly interacts with? Example: Basic Steps for Search 1: User goes to search page User enters term User presses search System matches search term with database entries System displays results vs Basic Steps for Search 2: User goes to search page User enters term User presses search System displays results

    Read the article

  • Is there a better approach to speech synthesis than text-to-speech for more natural output? [closed]

    - by Anne Nonimus
    We've all heard the output of text-to-speech systems, and for anything but very short phrases, it sounds very machine-like. The ultimate goal of speech synthesis systems is to pass a Turing test of hearing. Clearly, the state of the art in text-to-speech has much to improve. However, speech synthesis isn't restricted to just text-to-speech systems, and I'm wondering if other approaches have been tried with better success. In other words, has there been any work done (libraries, software, research papers, etc.) on natural speech synthesis other than text-to-speech systems?

    Read the article

  • How to enable 3D acceleration under VMware workstation 8?

    - by Yan Zhou
    I saw there are similar questions, but I don't think they answer exactly my questions. Did anyone managed to get 3D acceleration work under VMWare workstation 8? I have VMware 8.01 installed on Ubuntu 11.10. The guest I am trying is also Ubuntu 11.10. I manually installed vmware-tools and it went well, except the X-config part was skipped as it said the distribution driver is used. The guest runs well but it seems fall back to 2D mode. Does any one has any idea how to enable 3D acceleration under VMWare workstaion with Linux guest?

    Read the article

  • Ubuntu 10.04 Cant Adjust brightness on my lenevo Thinkpad?

    - by Mo.
    I cant seem to be able to adjust the brightness on my think-pad laptop running Ubuntu 10.04. In the power management applet it shows that the power is set to 100%, but even if i try to lower it the actual screen brightness dosent change. Any ideas of how I can get around this? I tried changing the brightness from the terminal but its already set to Max brightness (however the actual screen brightness is no that bright at all). Thanks

    Read the article

  • How do I get my clipboard (copy and paste) working again?

    - by Alex Black
    I'm running Ubuntu 9.04, and out of the blue I can no longer cut and paste, I imagine if I restart my computer I'll be able to, but thats a pain, how can I fix/reset the clipboard? Type "hello" into Text Editor Highlight the text "hello" Press CTRL-C See the text become unhighlighted (is this normal?) Press CTRL-V See the word "network" get pasted in.. perhaps that was the last thing I copied when it was still working?

    Read the article

  • Wvdial randomly drops 3G connection - How to auto-reconnect?

    - by askvictor
    I'm using a 3G modem for a router running Ubuntu server 10.04. I have the connection established using wvdial, which works successfully, but sometimes the connection drops. I would like it to auto re-connect. I've set the "auto reconnect" in wvdial.conf, but this does not seem to work. Any ideas? Am I missing a config option, or should I try writing a script which polls the network status and resets if ppp0 has gone down?

    Read the article

  • How To Setup Domain Name for SchoolTool Local Server

    - by zeroseven0183
    I am currently testing SchoolTool 2.0 and I would like to do some things: This application is installed on a virtual machine running Ubuntu Server 11.10 bridged to our home network. The site is accessible through IP address. What I would like to do is setup a local domain, say schooltool.ourhomedomain.com. I thought my sister would appreciate it more if it were not via IP address. If there's anymore information needed, let me know. Thanks in advance!

    Read the article

  • Graphics card recommendation for dual-HD output?

    - by Graham
    I'm going for a dual-HD monitor setup (HDMI or DVI output), running Ubuntu 11.10 64-bit with Unity 3D. What graphics card / video card should I get? Requirements: Dual-monitor output for DVI (mixed-resolution: 1920x1080 and 1920x1200) Or dual-HDMI output, if it works with Ubuntu Smooth desktop compositing and (Chrome) browser and IDE window rendering At least 60fps on fullscreen glxgears (1920x1200 resolution) Supported and non-buggy behaviour in Unity 3D/Compiz Not looking to play games Smooth fullscreen video playback (just because)

    Read the article

  • gksudo waits for a few seconds after execution

    - by phoenix
    i'm frequently using application launchers to run personal bash scripts and thus i often use gksudo in case i do administrative tasks. the problem is that when i execute a command with gksudo,the execution is successful, but afterwards gksudo waits for about 5 seconds before it closes/finishes. in some scripts i use gksudo multiple times, resulting in execution times of a few minutes, even though everything should be done in a few seconds. can anyone help me here? ps: here are my main /etc/sudoers-settings (might have something to do with my problem): Defaults env_reset,!tty_tickets,timestamp_timeout=2 phoenix ALL= NOPASSWD: /bin/mount,/bin/umount,/usr/sbin/firestarter,/usr/bin/truecrypt,/usr/bin/apt-get

    Read the article

  • ACPI=OFF in Ubuntu 11.10

    - by Mark
    When I tried to upgrade from 11.04 to 11.10 the system froze, so I've been playing around with a couple other linux builds (Fedora, Mint, and Puppy) the last couple days and I keep coming around to the same problem: a lockup during boot; each build referencing a kernel error. On another board someone suggested booting with a boot up line of "ACPI = off". It works with other OS', but I'm not sure where to put this command. Can anyone 'enlighten' me, please?

    Read the article

  • Alt-Tab in Unity 2D makes app icon jiggle instead of switching

    - by itsadok
    I'm using Unity 2D as my desktop, and it works fine most of the time, but every now and then, I try to Alt-Tab to switch to a different application, and instead of switching to that window, the launcher bar opens, and the icon of the application I was trying to switch to starts jiggling. If I try to switch to something else, that icon starts jiggling too. If I click on the icon with the mouse, then it stops jiggling and switches to the requested window. What is this behavior? I haven't seen any mention of jiggling icons in Unity. I don't understand the original purpose of this, and I'd like a way to fix it so that I won't have to use the mouse.

    Read the article

  • How do I install Postgres Graphical Installer?

    - by Tusar Das
    I am a newbie in using Ubuntu (more precisely never used linux except the production deployment ). Now I choose to hold a grip on the system and intalled a latest 11.10 Ubuntu in my 32 bit Intel** desktop. In this machine **I have a 'administrator' user 'tusar'. I want to install the PostgreSQL graphical version so downloaded this file postgresql-8.4.9-1-linux.bin from here Now If run the file with ./filename command (refuses if I am not root), it opens up the graphical interface and completes the installation (creates user postgres and ask for password, wont complete if I dont give valid password). I checked with /etc/inint.d/postgresql-8.4 status , that postgres is running. But the problem is I am unable to open the GUI (I installed it in /opt/Postgresql ), its telling permission denied even if I am logged in as 'tusar'. Then I tried using the su postgres command and it directly changed the user without password. Now if I run the psql , createdb , its prompting me to install the postgres-client-package but this utilies are already installed and I can view them in my /opt/Postgresql/8.4/bin folder. I can run query through my JDBC utility programs but unable to use neither terminal nor the graphical interface (although I can see pgAdmin3 is there ). Urgent help needed. I have used this guide for the installation.

    Read the article

  • How do I install Zimbra Desktop in an Ubuntu-friendly way?

    - by d3vid
    I'd like to install Zimbra Desktop but I'm worried about picking logical installation locations and how it will integrate with the Unity desktop. If it doesn't appear in the Messaging Menu there isn't much I can do about that, but what about the launcher? There doesn't seem to be PPA or similar resource. These instructions for 10.10 seem complete: http://www.ubuntugeek.com/how-to-install-zimbra-desktop-on-ubuntu-10-10-maverick.html 6 If you would, accept the default directori where it install /opt/zimbra/zdesktop Is this the logical location for Ubuntu? 9 Now you’ll be asked about where to install files, for example: Home//.zdesktop Sounds right. Is it? 10 And then you’ll be asked about the path where to locate the icon where you’ll launch Zimbra, for example: /home//Desktop How about this?

    Read the article

  • Does Google submit HTML forms?

    - by Saeed Neamati
    I have a web page, say http://domain/purchase and in this page, I have a web form. User, on submitting this form (which has validation, both client-side and server side and won't be validated until fields are filled appropriately), would be redirected to another page, where (s)he can choose other things, and specify other settings and then purchase our product. Say the second page is http://domain/options. So, user comes to our site and visits http://domain/purchase, fills the form, submits it, and then would be redirected to the second page, http://doamin/options?parameter1=value1&parameter2=value2, which contains parameters from the first page. This is very common in passing parameters between web pages (or technically, between URLs). Now I was reviewing my website, and saw that Google had indexed some of my redirected web pages and URLs, like: http://domain/options?parameter1=value1&parameter2=value2 http://domain/options?parameter1=value3&parameter2=value4 http://domain/options?parameter1=value5&parameter2=value6 http://domain/options?parameter1=value7&parameter2=value8 http://domain/options?parameter1=value9&parameter2=value10 This means that Google Bot has visited our http://domain/purchase page, and has filled our form, and has submitted it, and was being redirected to the other URL, with corresponding parameters. This is the only way that makes sense to me. Does Google really fills forms? PS: All parameters are meaningful, meaning that they are not filled arbitrarily. For example, the phone parameter in indexed pages has correct phone numbers. How is it possible?

    Read the article

  • Where can I get the 10k common English dictionary words which Stack overflow uses in related question? [migrated]

    - by itpian.com
    Where can I get the 10k common English dictionary words which Stack overflow uses in related question? Here in SE podcast - http://blog.stackoverflow.com/2008/12/podcast-32/ One of our major performance optimizations for the “related questions” query is removing the top 10,000 most common English dictionary words (as determined by Google search) before submitting the query to the SQL Server 2008 full text engine. It’s shocking how little is left of most posts once you remove the top 10k English dictionary words. This helps limit and narrow the returned results, which makes the query dramatically faster.

    Read the article

  • guidline for promoting a web forum or portal

    - by Hafiz
    I am a web application developer, have developed a lot of sites, portal and apps for clients. Now I want to have own such sites that with which I can do business. But I don't know what are steps to do so. What I know is make a site or portal. But what after that? There are lot of people having so much traffic on sites built with some simple open source. Many of them are forums. I also wanted to start a forum and a web portal. I can develop that or can have open source. But what after that? Content entry and SEO? Is it all to promote a portal or site? Do SEO nowadays work ? or it is all about marketing and advertising? I have no idea about that so please tell what you guys suggest. thanks for every one's opinion in advance.

    Read the article

  • How to create an Orthographic display in OpenGL (ES) that handles different screen sizes and orientations?

    - by Piku
    I'm trying to create an iPad/iPhone game using GLES2.0 that contains a 3D scene with a heads-up-display/GUI overlaid on the top. However, this problem would also apply if I were to port my game to a computer and run the game in a resizable window, or allow the user to change screen resolutions... When trying to make the 2D GUI/HUD work I've made the assumption that all I'm really doing is drawing a load of 2D textured 'quads' on the screen and am trying to treat the orthographic projection as an old-style 2D display with 0,0 in the upper left and screenWidth,ScreenHeight in the lower right. This causes me all sorts of confusion when I rotate my ipad into Landscape mode since I can't work out what to put into my projection and modelview matrices to turn everything around the right way. It also gets messy if I want to support the iPad's large screen, an iPhone or a Retina display since I have to then draw three sets of textures for everything and work out which ones to use. Should I be trying to map the 2D OpenGL co-ords 1:1 with the screen? While typing out this question it occurs to me that I could keep my origin in the centre, still running -1/+1 along the axes. This would let me scale my 2D content appropriately on the different screen sizes, but wouldn't I end up with the textures being scaled and possibly losing quality? I'm using OpenGLES 2.0 and have a matrix library that has equivalents to the GLES1.1 glOrthof() and glFrustrum() calls.

    Read the article

  • BOX2D and AS3: Mouse Event not working

    - by Gabriel Meono
    Background: Trying to make a simple "drop the ball" game. The code is located inside the first frame of the timeline. Nothing more is on the stage. Issue: Using QuickBox2D I made a simple If statement that drops and object acording the Mouse-x position: if (MouseEvent.CLICK) { sim.addCircle({x:mouseX, y:1, radius:0.25, density:5}); I imported the MouseEvent library: import flash.events.MouseEvent; Nothing happens if I click, no output errors either. See it in action: http://gabrielmeono.com/download/Lucky_Hit_Alpha.swf http://gabrielmeono.com/download/Lucky_Hit_Alpha.fla Full Code: [SWF(width = 350, height = 600, frameRate = 60)] import com.actionsnippet.qbox.*; import flash.events.MouseEvent; var sim:QuickBox2D = new QuickBox2D(this); sim.createStageWalls(); //var ball:sim.addCircle({x:mouseX, y:1, radius:0.25, density:5}); // // make a heavy circle sim.addCircle({x:3, y:1, radius:0.25, density:5}); sim.addCircle({x:2, y:1, radius:0.25, density:5}); sim.addCircle({x:4, y:1, radius:0.25, density:5}); sim.addCircle({x:5, y:1, radius:0.25, density:5}); sim.addCircle({x:6, y:1, radius:0.25, density:5}); // create a few platforms sim.addBox({x:3, y:2, width:4, height:0.2, density:0, angle:0.1}); // make 26 dominoes for (var i:int = 0; i<7; i++){ //End sim.addCircle({x:1 + i * 1.5, y:16, radius:0.1, density:0}); sim.addCircle({x:2 + i * 1.5, y:15, radius:0.1, density:0}); //Mid end sim.addCircle({x:0 + i * 2, y:14, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:13, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:12, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:11, radius:0.1, density:0}); sim.addCircle({x:0 + i * 2, y:10, radius:0.1, density:0}); //Middle Start sim.addCircle({x:0 + i * 1.5, y:09, radius:0.1, density:0}); sim.addCircle({x:1 + i * 1.5, y:08, radius:0.1, density:0}); sim.addCircle({x:0 + i * 1.5, y:07, radius:0.1, density:0}); sim.addCircle({x:1 + i * 1.5, y:06, radius:0.1, density:0}); } if (MouseEvent.CLICK) { sim.addCircle({x:mouseX, y:1, radius:0.25, density:5}); sim.start(); /*sim.mouseDrag();*/ }

    Read the article

  • How can one compile Darwinia under Linux?

    - by Tobias Kienzler
    Introversion is now offering the Darwinia+Multiwinia source for sale, stating Note: You will need Windows and Visual Studio 2008 to build the games. We have tested that the code compiles correctly on the PC, but you will need to put some effort in to compile for Mac / Linux. There is no Xbox code in this release. Has anyone put this effort in already? The best answer would (be yes and) mention modifications that had to be done (also mentioning the distribution used), the second-to-best would explain why it doesn't work right now. Since I haven't bought the source pack I'm relying on up-votes as confirmation, so please comment on answers if something doesn't work or has to be modified e.g. for another Linux distribution. I'm currently using Ubuntu 8.04, but 10.04 or e.g. Gentoo would be a choice, too. EDIT: Clarification: The intention is to make a new game with that engine, but since this question is a prerequisite, it seems suitable here. UPDATE It is a bit off topic, but for those interested, Introversion added the source code of Uplink, Darwinia, Multiwinia and DEFCON to The Humble Introversion Bundle, so don't miss it!

    Read the article

  • 2d, Top-down map with different levels

    - by Ktash
    So, I'm creating a 2d, top down, sprite based (tiled) game, and right now I'm working on maps (well, a map editor at the moment, but it will be creating my maps, so basically the same thing). The scenario So, I'm thinking about efficiency and creating a map in pieces. In each piece, I plan on having 'layers'. Basically, I plan on rendering it down to a 'below hero' level, and an 'above hero' level, with the hero rendered in between obviously. There will likely also be a 'on level with hero' layer, but I'm not quite there yet. Not even worrying about events or interaction yet. Just looking to get a hero on the screen. Now for movement, I obviously need to know what tiles can be moved and in what direction. My plan at the moment is each tile getting 8 bits (4 'can enter in direction' bits, 4 'can leave in direction'). This will allow me to limit movement and even allow one way directional movement. The dilemma This works great for a lot of scenarios. It will allow me to store a map in essentially 3 layers, a string, and gives me flexibility going forward. However, I can't create maps that themselves have layers. A good example is a bridge where the user can go under or over the bridge without invalid moves being allowed. I can't create a platform and allow movement underneath. These are things I would like to be able to include in my game. My idea In theory, I could allow multiple hero layers and then allow multiple sets of 'below' and 'above' layers (or sandwich layers). But this complicates my system, and makes movement between maps potentially tricky (If the hero is on the third layer at the edge of a map, but that corresponds to the second layer on the other map, how can I allow or disallow movement). My question Is there a better way to manage multiple maps with multiple levels like this where a users level may be 'connected' on different levels on different maps? Or even... Am I doing this the hard way? Is there a more standard way to handle top-down 2d tiled maps that I am just not aware of? Things to note or that might be helpful This will be done in Javascript (transferred around in JSON) State will need to be transferred quickly, so a map-id and x/y/direction should be enough to get me a boolean 'can move' value Maps will not be standard sized (though they will be in a certain number of tiles) Making an editor tool so that I can have others help, so something that I can create in a tool would be helpful 'Teleportation' locations will likely need to exist to get into building maps and to and from different map sets (which will not necessarily be connected), but have not been created yet (lumping in with events at the moment).

    Read the article

  • ParticleSystem in Slick2d (with MarteEngine)

    - by Bro Kevin D.
    First of all, sorry if this sounds very newbie-ish. I'm stuck at making a ParticleSystem I made using Pedigree to work in my game. It's basically an explosion that I want to display whenever an enemy dies. The ParticleSystem has two emitters, smoke and explosion I tried putting it in my Enemy (extends Entity) class Enemy extends Entity class @Override public void update(GameContainer gc, int delta) throws SlickException { super.update(gc, delta); /** bunch of codes */ explosionSystem.update(delta); } @Override public void render(GameContainer gc, Graphics gfx) throws SlickException { super.render(gc, gfx); if(isDestroyed) { explosionSystem.render(x,y); if(explosionSystem.getEmitter(1).completed()) { this.destroy(); } } } And it does not render. I'm not sure if this is the proper way of implementing it, as I've considered creating an Entity to serve as controller for all the Enemies. Right now, I'm just adding enemies every second. So how do I render the ParticleSystem when the enemy dies? If anyone can point me to the right direction. Thank you for your time.

    Read the article

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