Search Results

Search found 31491 results on 1260 pages for 'simple talk'.

Page 20/1260 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Very simple OOP question

    - by Mosty Mostacho
    I was creating and discussing a class diagram with a partner of mine. To simplify things, I've modify the real domain we're working on and made up the following diagram: Basically, a company works on constructions that are quite different one from each other but are still constructions. Note I've added one field for each class but there should be many more. Now, I thought this was the way to go but my partner told me that if in the future new construction classes appear we would have to modify the Company class, which is correct. So the new proposed class diagram would be this: Now I've been wondering: Should the fact that in no place of the application will there be mixed lists of planes and bridges affect the design in any way? When we have to list only planes for a company, how are we supposed to distinguish them from the other elements in the list without checking for their class names? Related to the previous question, is it correct to assume that this type of diagram should be high-level and this is something it shouldn't matter at this stage but rather be thought and decided at implementation time? Any comment will be appreciated.

    Read the article

  • Simple question about a cocos2d based game template

    - by Zishan
    I am learning a cocos2d based Game template tutorial from here and now I am at this point of the tutorial. My question is, how can i run 30 different scenes in 30 different levels of 5 chapter? Now I am using this switch (gameData.selectedLevel) { case 1: [SceneManager goChapter1Level1Scene]; break; (... snip a whole lot of lines...) case 30: [SceneManager goChapter5Level6Scene]; break; default: break; } in the "- (void) onPlay: (CCMenuItemImage*) sender" method. But it work only for 6 levels scene of chapter1. Other 4 chapters levels are show as same as 1st chapter levels scene. they are not show their own level scene. can any one please teach me, how can I do this stuff using this game template?

    Read the article

  • Stupid simple music player?

    - by itsadok
    Here's what I want: I have a folder with MP3 files. I would like to play all the files in the folder, alphabetically. And I need a way to pause, skip to next file, and that's pretty much it. I don't want to use my music player to organize my music library, I don't need connection to network services, and I don't even need ID3 support. On Windows, WinAmp 2 did what I wanted. What's my best option on Ubuntu?

    Read the article

  • Simple question about what methodology to pick for my information system [closed]

    - by Neenee Kale
    Possible Duplicate: I need help on methodologies for information system project I will be implementing a student information system for parents for my final year project. I have to choose the best suitable methodology which i could use through out my project. could you please recommend me any methodologies i could use please. Also i would like to ask is Agile system development a methodology?

    Read the article

  • Creating A Simple Bash Script With Multiple Commands

    - by unorthodox grammar
    Trying to create a bash script that opens gnome-terminal, and then runs ls to display the contents of a directory, but it just opens gnome-terminal. I will be creating some other scripts that also use multiple commands. My script: #!/bin/bash gnome-terminal ls -a /examplefolder EDIT: To clarify what I'm trying to achieve. I'm trying to create a script that will open gnome-terminal, list the contents of /examplefolder, and then be ready for regular terminal usage. Is this possible, or am I barking up the wrong tree?

    Read the article

  • cocos2d-x simple shader usage [on hold]

    - by Narek
    I want to obtain color ramp effect from this tutorial: http://www.raywenderlich.com/10862/how-to-create-cool-effects-with-custom-shaders-in-opengl-es-2-0-and-cocos2d-2-x Here is my code in cocos2d-x 3: bool HelloWorld::init() { ////////////////////////////// // 1. super init first if ( !Layer::init() ) { return false; } Vec2 origin = Director::getInstance()->getVisibleOrigin(); sprite = Sprite::create("HelloWorld.png"); sprite->setAnchorPoint(Vec2(0, 0)); sprite->setRotation(3); sprite->setPosition(origin); addChild(sprite); std::string str = FileUtils::getInstance()->getStringFromFile("CSEColorRamp.fsh"); const GLchar * fragmentSource = str.c_str(); GLProgram* p = GLProgram::createWithByteArrays(ccPositionTextureA8Color_vert, fragmentSource); p->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION); p->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::VERTEX_ATTRIB_TEX_COORD); p->link(); p->updateUniforms(); sprite->setGLProgram(p); // 3 colorRampUniformLocation = glGetUniformLocation(sprite->getGLProgram()->getProgram(), "u_colorRampTexture"); glUniform1i(colorRampUniformLocation, 1); // 4 colorRampTexture = Director::getInstance()->getTextureCache()->addImage("colorRamp.png"); colorRampTexture->setAliasTexParameters(); // 5 sprite->getGLProgram()->use(); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, colorRampTexture->getName()); glActiveTexture(GL_TEXTURE0); return true; } And here is the fragment shader as it is in the tutorial: #ifdef GL_ES precision mediump float; #endif // 1 varying vec2 v_texCoord; uniform sampler2D u_texture; uniform sampler2D u_colorRampTexture; void main() { // 2 vec3 normalColor = texture2D(u_texture, v_texCoord).rgb; // 3 float rampedR = texture2D(u_colorRampTexture, vec2(normalColor.r, 0)).r; float rampedG = texture2D(u_colorRampTexture, vec2(normalColor.g, 0)).g; float rampedB = texture2D(u_colorRampTexture, vec2(normalColor.b, 0)).b; // 4 gl_FragColor = vec4(rampedR, rampedG, rampedB, 1); } As a result I get a black screen with 2 draw calls. What is wrong? Do I miss something?

    Read the article

  • How to Setup Software RAID for a Simple File Server on Ubuntu

    - by Sysadmin Geek
    Do you need a file server on the cheap that is easy to setup, “rock solid” reliable with Email Alerting? will show you how to use Ubuntu, software RAID and SaMBa to accomplish just that Latest Features How-To Geek ETC How To Boot 10 Different Live CDs From 1 USB Flash Drive The 20 Best How-To Geek Linux Articles of 2010 The 50 Best How-To Geek Windows Articles of 2010 The 20 Best How-To Geek Explainer Topics for 2010 How to Disable Caps Lock Key in Windows 7 or Vista How to Use the Avira Rescue CD to Clean Your Infected PC Install LibreOffice via PPA and Receive Auto-Updates in Ubuntu Creative Portraits Peek Inside the Guts of Modern Electronics Scenic Winter Lane Wallpaper to Create a Relaxing Mood Access Your Web Apps Directly Using the Context Menu in Chrome The Deep – Awesome Use of Metal Objects as Deep Sea Creatures [Video] Convert or View Documents Online Easily with Zoho, No Account Required

    Read the article

  • On-Site SEO 101 - Simple Tips to Help Improve Your Website Visibility

    Search Engine Optimization (SEO) is often perceived as impossible to understand by novice website owners and creators. While it is true that any website would benefit greatly from experienced, professional SEO services, many people simply cannot afford to keep an SEO on payroll on a consistent, month-to-month basis. For people in this category, all hope is not lost.

    Read the article

  • Simple Architecture Verification

    - by Jean Carlos Suárez Marranzini
    I just made an architecture for an application with the function of scoring, saving and loading tennis games. The architecture has 2 kinds of elements: components & layers. Components: Standalone elements that can be consumed by other components or by layers. They might also consume functionality from the model/bottom layer. Layers: Software components whose functionality rests on previous layers (except for the model layer). -Layers: -Models: Data and it's behavior. -Controllers: A layer that allows interaction between the views and the models. -Views: The presentation layer for interacting with the user. -Components: -Persistence: Makes sure the game data can be stored away for later retrieval. -Time Machine: Records changes in the game through time so it's possible to navigate the game back and forth. -Settings: Contains the settings that determine how some of the game logic will apply. -Game Engine: Contains all the game logic, which it applies to the game data to determine the path the game should take. This is an image of the architecture (I don't have enough rep to post images): http://i49.tinypic.com/35lt5a9.png The requierements which this architecture should satisfy are the following: Save & load games. Move through game history and see how the scoreboard changes as the game evolves. Tie-breaks must be properly managed. Games must be classified by hit-type. Every point can be modified. Match name and player names must be stored. Game logic must be configurable by the user. I would really appreciate any kind of advice or comments on this architecture. To see if it is well built and makes sense as a whole. I took the idea from this link. http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

    Read the article

  • Simple NAS setup for Ubuntu

    - by Sean Houlihane
    So, I want to connect my shiny new NAS (QNAP TS-210p II) to my Ubuntu 11.10 box. I have a 2nd Ubuntu machine, but I don't use that enough to be too worried about it. Use is ideally to offload all storage except for system (which can then run off a 30GB flash drive). The main machine also runs Myth front/backends. Both are on a wired network currently. I have got a basic setup working, mounted over NFS, but have some issues, and whenever I look for answers, I seem to get unto the UbuntuServer domain, with what seems like more detail than I want in an answer. Questions I have identified so far: 1) Sharing UIDs to get file permissions correct. LDAP or something else? What is necessary to make this work? 2) Mounting an NFS device reliably. Do I just add it in fstab or is some sort of auto-mount advisable? Its a wired network, but I shouldn't need to worry about reboot after power-outages and sequencing...

    Read the article

  • Making simple forms in web applications

    - by levalex
    How do you work with forms in your web applications? I am not talking about RESTful applications, I don't want to build heavy front-end using frameworks like Backbone. For example, I need to add "contact us" form. I need to check data which was filled by user and tell him that his data was sent. Requirements: I want to use AJAX. I want to validate form on back-end side and don't want to duplicate the same code on front-end side. I have my own solution, but it doesn't satisfy me. I make an AJAX request with serialized data on form submit and get response. The next is checking "Content-type" header. html - It means that errors with filling form are exists and response html is form with error labels. - I will replace my form with response html. json and response.error_code == 0 - It means that form was successfully submited. - I will show user notification about success. json and response.error_code != 0 - Something was broken on back-end (like connection with database). other - I display the following message : We have been notified and have started to work with that problem. Please, try it later. The problem of that way is that I can't use it with forms that upload file. What is your practise? What libraries and principles do you use?

    Read the article

  • 3 Simple Steps to Achieving a Front Page Search Listing on Google

    It's a fact that most website owners struggle to get traffic to their sites. Unless you are very fortunate or have invested a lot of time and money in SEO then getting a front page ranking on Google for a highly searched keyword phrase is normally just a pipe dream. After all, there are only 10 front page spots to be had and competition to secure one is incredibly high - as are the rewards.

    Read the article

  • &amp;#65279;Five Simple Photo Fixes with digiKam

    <b>Linux Magazine: </b>"digiKam is an immensely powerful photo application, so learning all its features requires time and effort. But this capable photo management application also offers a few easy to use features which you can use to instantly improve your shots."

    Read the article

  • 'dock' working in simple words

    - by Shirish11
    I would like to know the idea behind the working of 'docking' in applications. I have worked with applications where components from individual forms are docked on a single main form to provide the necessary GUI. But I don't have any idea whats happening in the background. According to Wikipedia A dock is a graphical user interface element that typically provides the user with a way of launching, switching between, and monitoring running programs or applications. Now I am a bit confused if it is some component or an event or a property or something else. EDIT : The applications was developed in Delphi on windows platform. There is something more in Delphi (manual dock and automatic dock).

    Read the article

  • Two Simple Keys to SEO Success - Take Care of the Basics and Forget About Algorithm-Chasing

    Search engine optimization (SEO) is critical to the success of any website because it helps to improve a website's visibility in the natural search results - the end result of which should be that the optimized website experiences a sustainable boost in search referral traffic. And yet in spite of the obvious importance of SEO, the reality is that the vast majority of websites have never been exposed to even a bare-minimum level of SEO effort, meaning that they are potentially forfeiting top rankings - and the traffic that top rankings virtually guarantee - to their competitors Why do so few people bother with SEO when it is so essential to a website's success?

    Read the article

  • Oracle Exalogic: Simple IT Operations, Great Application Experience

    - by Michelle Kimihira
    See a demo featuring Yoav Eilat, Director of Product Marketing. Yoav demonstrates how easy it is to deploy new applications and how administrators can manage the entire system from a single console on Exalogic. Click here to view. Additional Information Product Information on Oracle.com: Oracle Fusion Middleware, Oracle Exalogic Follow us on Twitter and Facebook Subscribe to our regular Fusion Middleware Newsletter

    Read the article

  • Composing programs from small simple pieces: OOP vs Functional Programming

    - by Jay Godse
    I started programming when imperative programming languages such as C were virtually the only game in town for paid gigs. I'm not a computer scientist by training so I was only exposed to Assembler and Pascal in school, and not Lisp or Prolog. Over the 1990s, Object-Oriented Programming (OOP) became more popular because one of the marketing memes for OOP was that complex programs could be composed of loosely coupled but well-defined, well-tested, cohesive, and reusable classes and objects. And in many cases that is quite true. Once I learned object-oriented programming my C programs became better because I structured them more like classes and objects. In the last few years (2008-2014) I have programmed in Ruby, an OOP language. However, Ruby has many functional programming (FP) features such as lambdas and procs, which enable a different style of programming using recursion, currying, lazy evaluation and the like. (Through ignorance I am at a loss to explain why these techniques are so great). Very recently, I have written code to use methods from the Ruby Enumerable library, such as map(), reduce(), and select(). Apparently this is a functional style of programming. I have found that using these methods significantly reduce code volume, and make my code easier to debug. Upon reading more about FP, one of the marketing claims made by advocates is that FP enables developers to compose programs out of small well-defined, well-tested, and reusable functions, which leads to less buggy code, and low code volume. QUESTIONS: Is the composition of complex program by using FP techniques contradictory to or complementary to composition of a complex program by using OOP techniques? In which situations is OOP more effective, and when is FP more effective? Is it possible to use both techniques in the same complex program? Do the techniques overlap or contradict each other?

    Read the article

  • Question about a simple design problem

    - by Uri
    At work I stumbled uppon a method. It made a query, and returned a String based on the result of the query, such as de ID of a customer. If the query didn't return a single customer, it'd return a null. Otherwise, it'd return a String with the ID's of them. It looked like this: String error = getOwners(); if (error != null) { throw new Exception("Can't delete, the flat is owned by: " + error); } ... Ignoring the fact that getCustomers() returns a null when it should instead return an empty String, two things are happening here. It checks if the flat is owned by someone, and then returns them. I think a more readable logic would be to do this: if (isOwned) { throw new Exception("Can't delete, the flat is owned by: " + getOwners()); } ... The problem is that the first way does with one query what I do with two queries to the database. What would be a good solution involving good design and efficiency for this?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >