Search Results

Search found 15210 results on 609 pages for 'technical writing'.

Page 182/609 | < Previous Page | 178 179 180 181 182 183 184 185 186 187 188 189  | Next Page >

  • Should I use the factory design pattern for every class?

    - by Frog
    I've been writing a website in PHP. As the code becomes more complex, I keep finding problems that can be solved using the factory design pattern. For example: I've a got a class Page which has subclasses HTMLPage, XMLPage, etc. Depending on some input I need to return an object of either one of these classes. I use the factory design pattern to do this. But as I encounter this problem in more classes, I keep having to change code which still initiates an object using its constructor. So now I'm wondering: is it a good idea to change all code so that it uses the factory design pattern? Or are there big drawbacks? I'm currently in a position to change this, so your answers would be really helpful.

    Read the article

  • Is deserializing complex objects instead of creating them a good idea, in test setup?

    - by Chris Bye
    I'm writing tests for a component that takes very complex objects as input. These tests are mixes of tests against already existing components, and test-first tests for new features. Instead of re-creating my input objects (this would be a large chunk of code) or reading one from our data store, I had the thought to serialize a live instance of one of these objects, and just deserialize it into test setup. I can't decide if this is a reasonable idea that will save effort in long run, or whether it's the worst idea that I've ever had, causing those that will maintain this code will hunt me down as soon as they read it. Is deserialization of inputs a valid means of test setup in some cases? To give a sense of scale of what I'm dealing with, the size of serialization output for one of these input objects is 93KB. Obtained by, in C#: new BinaryFormatter().Serialize((Stream)fileStream, myObject);

    Read the article

  • Depending on another open source library: copy/paste code or include

    - by user5794
    I'm working on a large class and started implementing new features that need graphics. I started writing the graphics functions myself, but I know that open source libraries exist that can provide me with this functionality without me having to write it myself. The problem is that I prefer the class to be self-sufficient and not dependent on any other library. If I don't write it myself, I would have to ask the user to make sure a graphics library is already installed (less user-friendly). If I write it myself, I do a lot more work than I have to. I could also copy/paste some of the relevant code into my own class, but not sure about the disadvantages of doing this (it's an open source library that matches my license, so I'm not concerned with legality, just programming-wise if there are disadvantages). So what should I do: copy paste code from the external library write the code myself so it's truly self-sufficient ask the user to download and install another library

    Read the article

  • Test Driven Development Code Order

    - by Bobby Kostadinov
    I am developing my first project using test driven development. I am using Zend Framework and PHPUnit. Currently my project is at 100% code coverage but I am not sure I understand in what order I am supposed to write my code. Am I supposed to write my test FIRST with what my objects are expected to do or write my objects and then test them? Ive been working on completing a controller/model and then writing at test for it but I am not sure this is what TDD is about? Any advice? For example, I wrote my Auth plugin and my Auth controller and tested that they work properly in my browser, and then I sat down to write the tests for them, which proved that there were some logical errors in the code that did work in the browser.

    Read the article

  • Deferent ways of solving problems in code.

    - by Erin
    I now program in C# for a living but before that I programmed in python for 5 years. I have found that I write C# very that most examples I see on the web. Rather then writing things like: foreach (string bar in foo) { //bar has something doen to it here } I write code that looks like this. foo.ForEach( c => c.someActionhere() ) Or var result = foo.Select( c => { //Some code here to transform the item. }).ToList(); I think my using code like above came form my love of map and reduce in python while not exactly the same thing the concepts are close. Now it's time for my question. What concepts do you take and move with you from language to language. That allow you to solve a problem in a way that is not the normal accepted solution in that language?

    Read the article

  • Unable to Restore Nexus 7 2013

    - by belkinsa
    I have a Nexus 7 2013 with FLO-04.01 bootloader and I tired ./flash-all.sh and it fails. Happens every time. Output below: svetlana@svetlana-TECRA-M5:~/Downloads/razor-krt16s$ sudo ./flash-all.sh [sudo] password for svetlana: < waiting for device > sending 'bootloader' (3911 KB)... OKAY [ 0.163s] writing 'bootloader'... OKAY [ 1.446s] finished. total time: 1.609s rebooting into bootloader... OKAY [ 0.006s] finished. total time: 0.006s archive does not contain 'boot.sig' archive does not contain 'recovery.sig' failed to allocate 721539744 bytes error: update package missing system.img svetlana@svetlana-TECRA-M5:~/Downloads/razor-krt16s$

    Read the article

  • Do I need the 'w' component in my Vector class?

    - by bobobobo
    Assume you're writing matrix code that handles rotation, translation etc for 3d space. Now the transformation matrices have to be 4x4 to fit the translation component in. However, you don't actually need to store a w component in the vector do you? Even in perspective division, you can simply compute and store w outside of the vector, and perspective divide before returning from the method. For example: // post multiply vec2=matrix*vector Vector operator*( const Matrix & a, const Vector& v ) { Vector r ; // do matrix mult r.x = a._11*v.x + a._12*v.y ... real w = a._41*v.x + a._42*v.y ... // perspective divide r /= w ; return r ; } Is there a point in storing w in the Vector class?

    Read the article

  • How to purge old links in google from an old domain.

    - by jbcurtin
    Hey all, Recently, I uploaded a new site to an existing domain and I'd like to figure out how I can forward all links to said domain to a new domain. I'm looking for a wordpress solution if possible, but in the end I I seem myself writing a small header script that I will paste into ever directory's index file saying header('Location:http://xxx.yyy.zzz') Is there a cleaner way to do this without having to resort to managing the whole file structure? No, I do not have access to the apache runtime. Unfortunately it is a shared-host server. Thanks in advance.

    Read the article

  • Considerations when designing a file type

    - by AndyBursh
    I'm about to start writing a process for saving some data structure from code in to a file of some proprietary, as-yet-undefined type. However, I've never designed a file type or structure before. Are there any things, generally speaking, that I should consider before starting my design? Are there any accepted good practices here? Bad practices I should avoid? Any absolute do's and don'ts? Can anybody recommend any good reading on this topic?

    Read the article

  • Starting in GeeksWithBlog

    - by JTorrecilla
    It’s a great pleasure for me to start writing in a big Community like GeeksWithBlog. Firstly, I want to present myself: My name is Javier Torrecilla and I am a .NET 4x4 Developer. Currently I write also in Spanish in my Spanish Blog. Well, What kind of topics are you going to read here? All kind related to .NET Technologies: C#, VB, ASP.NET, MVC, EF, …, Databases: Oracle, SQL Server… Hope my post will be useful for all. Best Regards!

    Read the article

  • Alerts are good, aren't they?

    - by fatherjack
    It is accepted best practise to set some alerts on every SQL instance you install. They aren't particularly well publicised but I have never seen any one not recommend setting up alerts for Error 823, 824 and 825. These alerts are focussed on successful access(IO) to the hard drives that SQL Server is using. If there are  any errors when reading or writing to the drives then one of these errors will be returned. Having the alerts on these errors means that any IO issues will be brought to the...(read more)

    Read the article

  • Finish long directory name with tab problem

    - by user1880405
    I have simple problem that I have to long directories which I want to cd into, but I would like to know easy way. mosquito@mosquito-K56CB:~/Downloads$ ls | grep Guns Guns n' Roses - Appetite for Destruction (Japanese Edition) 1987 Guns n' Roses - Use Your Illusion I 1991 Of course I can just copy the name and put it like this: cd "Guns n' Roses - Appetite for Destruction (Japanese Edition) 1987" But why when I write cd Guns then tab, it finishes line into: cd Guns\ n\'\ Roses\ -\ then by my understanding I should just start writing App.. with tab and it should finish whole name, but it does not. And hitting tab twice does not show me anything either. What I am missing here?

    Read the article

  • Repeater vs. ListView

    - by MoezMousavi
    I do really hate repeater. I was more a GridView lover but after 3.5 be born, I prefer ListView.  The first problem with Repeater is paging. You will need to write code to handle paging. Second common problem is empty data template. Have a look at this:             if (rptMyRepeater.Items.Count < 1)             {                 if (e.Item.ItemType == ListItemType.Footer)                 {                     Label lblFooter = (Label)e.Item.FindControl("lblEmpty");                     lblFooter.Visible = true;                 }             }   I found the above code is usefull if you need to show something like "There is no record" is your data source has no records. Although the ListView has a template.   If you combine ListView with a DataPager, you will be in heaven as it is sorting the paging for you without writing code. (http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datapager.aspx)     Note: You have got to bind ListView in PreRender, it doesn't work properly in PageLoad   More: http://www.4guysfromrolla.com/articles/061009-1.aspx

    Read the article

  • My system screen goes black and displays Term Signal Killed?

    - by Quandite
    My computer will often just die randomly while I am using it. The screen goes black and sometimes displays the words TERM signal killed along with other things and sometimes it displays nothing. The writing stays on the screen momentarily before it disappears to just black. I then have to hold in the power button to turn it off and then re boot. Here are the specs... help! Ubuntu 10.04(lucid) Kernel Linux 2.6.32-23-generic GNOME 2.30.2 memory 495.7 MiB processor Intel(R) Pentium(R) 4CPU 1.80GHz

    Read the article

  • schema.org specification for generic pages or posts on a CMS

    - by NateWr
    I'm trying to determine the best possible schema.org type to declare for the content section in the template of a content management system, which will handle regular news posts for small, local hospitality businesses. The type should represent the content of that page, which is likely to be a wide range of things. The description for Article pretty strongly encourages its use to be limited to the articles of a publication. For purely semantic reasons, I'm not sure if Blog is appropriate in this case -- businesses won't be creating typical "blog" content but are more likely to be writing about upcoming events, special deals, awards, etc. Would Webpage be appropriate in this instance? Although I'm a fan of the schema.org concept, I frequently find myself unsure how broadly or narrowly I'm meant to infer the meaning of a type. In such cases, is it safe to use a high-level element, such as CreativeWork, or does this blunt the usefulness of the markup?

    Read the article

  • Case Management Model and Notation (CMMN) by Torsten Winterberg

    - by JuergenKress
    The beta version of the current working draft of the new OMG paper can be found here. This figure 72 shows an example, how a case (here: writing a document) can be modeled using CMMN elements: Table 43 explains, where the different types of decorators can be used: The meaning if the elements and the decorations are explained in the CMMN beta document. Read the full article here. SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Facebook Wiki Mix Forum Technorati Tags: ACM,BPM,Torsten Winterberg,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

  • How to handle an arrogant coworker [closed]

    - by Guy
    In my workplace I have a coworker who have been working in the company for 3 years (1 more than me) doing stuff surrounding to software development but not software development. We need to run a new project in C and we have a lot of professional disagreements that in my opinion are caused by too much pride to his skill. For example he strives to insert code unnecessary code generation using C macros as possible instead of writing the same C code with the correct separations to functions. I tried to explain to him why inline function are a better replacement for C macros but he said to me that he knows better than gcc how to inline a function. How can I handle such a person?

    Read the article

  • How to determine which cells in a grid intersect with a given triangle?

    - by Ray Dey
    I'm currently writing a 2D AI simulation, but I'm not completely certain how to check whether the position of an agent is within the field of view of another. Currently, my world partitioning is simple cell-space partitioning (a grid). I want to use a triangle to represent the field of view, but how can I calculate the cells that intersect with the triangle? Similar to this picture: The red areas are the cells I want to calculate, by checking whether the triangle intersects those cells. Thanks in advance. EDIT: Just to add to the confusion (or perhaps even make it easier). Each cell has a min and max vector where the min is the bottom left corner and the max is the top right corner.

    Read the article

  • Google App Engine: How to be notified when APIs change or become available?

    - by herpylderp
    I am thinking about writing a GAE app but am a little hesitant because the EULA gives Google full rights to change their APIs anytime they want, for any reason. Obviously, they'd be out of business quick if they just 'upped and refactored their entire APIs, so I have to imagine they have some kind of notification system, perhaps even an RSS feed, etc. to notify developers well in advance of looming changes, or new features coming out in future releases. However, for the life of me I can't seem to find any trace of the existence of such a notification system. Perhaps the Google forums is the only place to get such updates? I guess I'm asking any battle-worn GAE veterans for re-assurance that there are reliable ways of getting notifications about policy or API changes from Google such that I could react and make the necessary app changes without production breaking or impacting any clients. Thanks in advance!

    Read the article

  • Storing a Hex Grid

    - by Pedro Caetano
    I've been creating a small hex grid framework for Unity3D and have come to the following dilema. This is my coordinate system (taken from here) Link because I'm a new user It all works pretty nicely except for the fact I have no idea how to store it. I originally intended to store this in a 2D array and use images to generate my maps. One problem was that it had negative values (this was easily fixed by offsetting the coordinates a bit). However, due to this coordinate system, such an image or bitmap would have to be diamond shaped - and since these structures are square shaped, this would cause a lot of headaches even if I hack something together. Is there anything I'm missing that could fix this? I recall seeing a forum post regarding this in the unity forums but I can no longer find the link. Is writing a set of coordinate translators the best solution here? If you guys think it would be helpful, I can post code and images of my problem.

    Read the article

  • How should I expand Jenkins to help me release? [closed]

    - by Amy Worrall
    Pushing new Sparkle releases of our internal apps is a pain. I have to make the build, make the release notes file, sign the .zip with the private key, and add a new entry to the appcast file tying everything together. I'd love it if Jenkins could help: use the commit messages for the release notes, and automatically do the rest of it. Should I be looking at writing a new Jenkins plugin, or using shell scripting, or is there something already that will do what I want? (A quick Google didn't find anything.)

    Read the article

  • C# XNA render an entire frame to a texture2d

    - by redcodefinal
    I asked a question here: C# XNA Make rendered screen a texture2d But, I ended up not getting the exact result I was looking for since I didn't ask the question right. In a game I am writing, I render an extremely large city out of objects, this can cause lag when moving the camera to view things that are off screen. I need a way to render then ENTIRE city, even the stuff that is off screen, and make it into a Texture2D. The answer I chose for the last one didn't work entirely right because it only gets what is on screen, not what is off.

    Read the article

  • specifying an object type at runtime

    - by lapin
    I've written a Vbo template class to work with opengl. I'd like to set the type from a config file at runtime. e.g. <vbo type="bump_vt" ... /> Vbo* pVbo = new Vbo(bump_vt, ...); Is there some way I can do this without a large if else block e.g. if( sType.compareTo("bump_vt") == 0 ) Vbo* pVbo = new Vbo(bump_vt, ...); else if ... I'm writing for multiple platforms in c++. thanks

    Read the article

  • Commenting/In-Code Documentation Styles

    - by Maxpm
    This might be a stupid question, but it's been in the back of my head for a while and I can't find a decent answer anywhere else. I have a teacher who says we should explicitly list each parameter with a description, even if there's only one. This leads to a lot of repetition: double MyFunction(const int MyParam); // Function: MyFunction // Summary: Does stuff with MyParam. // Input: int MyParam - The number to do stuff with. // Output: MyParam with stuff done to it. When writing in-code documentation, how detailed are you?

    Read the article

  • query in codeIgniter style

    - by troy
    I have below query: SET @sql = NULL ; SELECT GROUP_CONCAT( DISTINCT CONCAT( 'select latitude,longitude,max(serverTime) as serverTime,', deviceID, ' AS device from d', deviceID, '_gps' ) SEPARATOR ' UNION ALL ' ) INTO @sql FROM devices WHERE accountID =2; PREPARE stmt FROM @sql ; EXECUTE stmt; Can someone help me to write the above query in codeIgniter style.... ANd another thing is :What is the difference between writing the query in 1 and 2 formats 1. $query = $this->db->query('YOUR QUERY HERE'); 2. $this->db->select("..."); $this->db->from(); $this->db->where(); Will it have any effect on performance if we use 2nd style... Thank You

    Read the article

< Previous Page | 178 179 180 181 182 183 184 185 186 187 188 189  | Next Page >