Search Results

Search found 12660 results on 507 pages for 'programming pearls'.

Page 127/507 | < Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >

  • How to understand the programming of an operating system

    - by piemesons
    Hello, I want to learn the operating system. How it works. I don't want to make my own operating system. I just want to learn how it works. As I can find out source code of any open source OS. But how to start. Like starting from the first elementary kernel (whatever it is). Somebody suggested I try to implement Linux from scratch etc. Please guide me in a proper way. I want to know about the proper path to follow. I am ready to invest three to four years just to understand the basics. I have good fundamentals of C, C++, PHP, OOP and compiler design.

    Read the article

  • What is PHP like as a programming language?

    - by seanlinmt
    I am not really familiar with PHP, but I get the impression that it is like JavaScript (syntax-wise). What are the benefits of a dynamically typed language, when compared to a strongly typed language like C# or Java, and how would this help in the context of web development? What would make a dynamically typed language so attractive? Or, does the popularity of PHP have more to do with it being free? Okay, I think I better give a little more background to get more meaningful answers, because I am not wanting a flame war. I come from a C background, and when I moved into C# and Visual Studio. Having code completion, integration with an SQL database, huge existing class libraries and easy to access documentation, as well as new tools such as LINQ and ReSharper was like heaven. I didn't enjoy JavaScript before JQuery, but now I love it as well. Recently, I ported a PHP project over to C# and I used Zend to help me debug and understand more while porting - instead of maintaining two code streams. That also cut down on the cost of the server and maintenance. Getting into PHP would be nice. I think that Visual Studio has spoiled me - but again Eclipse is also equally spoiling. It would be nice to have an answer from someone who has experience developing both under PHP and .NET.

    Read the article

  • [C] Programming problem: Storing values of an array in one variable

    - by OldMacDonald
    Hello, I am trying to use md5 code to calculate checksums of file. Now the given function prints out the (previously calculated) checksum on screen, but I want to store it in a variable, to be able to compare it later on. I guess the main problem is that I want to store the content of an array in one variable. How can I manage that? Probably this is a very stupid question, but maybe somone can help. Below is the function to print out the value. I want to modify it to store the result in one variable. static void MDPrint (mdContext) MD5_CTX *mdContext; { int i; for (i = 0; i < 16; i++) { printf ("%02x", mdContext->digest[i]); } // end of for } // end of function For reasons of completeness the used struct: /* typedef a 32 bit type */ typedef unsigned long int UINT4; /* Data structure for MD5 (Message Digest) computation */ typedef struct { UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ UINT4 buf[4]; /* scratch buffer */ unsigned char in[64]; /* input buffer */ unsigned char digest[16]; /* actual digest after MD5Final call */ } MD5_CTX; and the used function to calculate the checksum: static int MDFile (filename) char *filename; { FILE *inFile = fopen (filename, "rb"); MD5_CTX mdContext; int bytes; unsigned char data[1024]; if (inFile == NULL) { printf ("%s can't be opened.\n", filename); return -1; } // end of if MD5Init (&mdContext); while ((bytes = fread (data, 1, 1024, inFile)) != 0) MD5Update (&mdContext, data, bytes); MD5Final (&mdContext); MDPrint (&mdContext); printf (" %s\n", filename); fclose (inFile); return 0; }

    Read the article

  • Programming in a noisy office [closed]

    - by John Isaacks
    Can anyone recommend any techniques or advice for working in a noisy office? I know some people wear headphones and listen to music but I prefer silence. I work in a room with 4 others, there are no walls between us, we just each have our own desk. There is usually always someone talking, or on the phone, or on the intercom. Has anyone else had to deal with this? What did you do? What would you recommend?

    Read the article

  • HTML5 Canvas and Game Programming

    - by LemonBeagle
    I hope this isn't too open ended. I'm wondering if there is a better (more battery-friendly) way of doing this -- I have a small HTML 5 game, drawn in a canvas (let's say 500x500). I have some objects whose positions I update every 50ms or so. My current implementation re-draws the entire canvas every 50ms. I can't imagine that being very good for battery life on mobile platforms. Is there a better way to do this? This must be a common pattern with games. EDIT: as requested, here are some more updates: Right now, the objects are geometric primitives drawn via arcs and lines. I'm not opposed to making these small png/jpg/gif files instead of that'd help out. These are small graphics -- just 15x15 or so. As the game progresses, more and more of the screen changes at a time. However, at the start, the screen changes relatively slowly (the objects randomly moved a few pixels every 50ms).

    Read the article

  • Programming language for opengl screenshot software

    - by mandril
    I need to develop a multiplatform software that takes screenshots from opengl games without affecting the game in performance, it will run in the background and will add a watermark to my screenshots. What language should i use? I thought of Perl / Python. Anyone can point me out something to start? Thanks!

    Read the article

  • 'Good' programming form in maintaining / updating / accessing files by entry

    - by zhermes
    Basic Question: If I'm storying/modifying data, should I access elements of a file by index hard-coded index, i.e. targetFile.getElement(5); via a hardcoded identifier (internally translated into index), i.e. target.getElementWithID("Desired Element"), or with some intermediate DESIRED_ELEMENT = 5; ... target.getElement(DESIRED_ELEMENT), etc. Background: My program (c++) stores data in lots of different 'dataFile's. I also keep a list of all of the data-files in another file---a 'listFile'---which also stores some of each one's properties (see below, but i.e. what it's name is, how many lines of information it has etc.). There is an object which manages the data files and the list file, call it a 'fileKeeper'. The entries of a listFile look something like: filename , contents name , number of lines , some more numbers ... Its definitely possible that I may add / remove fields from this list --- but in general, they'll stay static. Right now, I have a constant string array which holds the identification of each element in each entry, something like: const string fileKeeper::idKeys[] = { "FileName" , "Contents" , "NumLines" ... }; const int fileKeeper::idKeysNum = 6; // 6 - for example I'm trying to manage this stuff in 'good' programatic form. Thus, when I want to retrieve the number of lines in a file (for example), instead of having a method which just retrieves the '3'rd element... Instead I do something like: string desiredID = "NumLines"; int desiredIndex = indexForID(desiredID); string desiredElement = elementForIndex(desiredIndex); where the function indexForID() goes through the entries of idKeys until it finds desiredID then returns the index it corresponds to. And elementForIndex(index) actually goes into the listFile to retrieve the index'th element of the comma-delimited string. Problem: This still seems pretty ugly / poor-form. Is there a way I should be doing this? If not, what are some general ways in which this is usually done? Thanks!

    Read the article

  • C# recursive programming with lists

    - by David Torrey
    I am working on a program where each item can hold an array of items (i'm making a menu, which has a tree-like structure) currently i have the items as a list, instead of an array, but I don't feel like I'm using it to its full potential to simplify code. I chose a list over a standard array because the interface (.add, .remove, etc...) makes a lot of sense. I have code to search through the structure and return the path of the name (i.e. Item.subitem.subsubitem.subsubsubitem). Below is my code: public class Item { //public Item[] subitem; <-- Array of Items public List<Item> subitem; // <-- List of Items public Color itemColor = Color.FromArgb(50,50,200); public Rectangle itemSize = new Rectangle(0,0,64,64); public Bitmap itemBitmap = null; public string itemName; public string LocateItem(string searchName) { string tItemName = null; //if the item name matches the search parameter, send it up) if (itemName == searchName) { return itemName; } if (subitem != null) { //spiral down a level foreach (Item tSearchItem in subitem) { tItemName = tSearchItem.LocateItem(searchName); if (tItemName != null) break; //exit for if item was found } } //do name logic (use index numbers) //if LocateItem of the subitems returned nothing and the current item is not a match, return null (not found) if (tItemName == null && itemName != searchName) { return null; } //if it's not the item being searched for and the search item was found, change the string and return it up if (tItemName != null && itemName != searchName) { tItemName.Insert(0, itemName + "."); //insert the parent name on the left --> TopItem.SubItem.SubSubItem.SubSubSubItem return tItemName; } //default not found return null; } } My question is if there is an easier way to do this with lists? I've been going back and forth in my head as to whether I should use lists or just an array. The only reason I have a list is so that I don't have to make code to resize the array each time I add or remove an item.

    Read the article

  • Programming Java professionally

    - by user299925
    Just seeking some advice. By profession I am primarily a front-end programmer working with ajax technologies (currently I use php as my backend language of choice). As of lately I've been looking at Java as a very good OOP language to learn and just wanted to know if you guys have any advice as to what's the best way to learn the language and achieve proficency that may some day lead to mastery.

    Read the article

  • Wordpress and Dynamic Programming Php

    - by user1675146
    I have geography pages for two types of business listings. Each page goes from state, county, city, but I need to have the same geography shared between two types of business. My two business types are dentist and chiropractors. I am trying to have a permalink structure like this: enter code here xyz.com/dentist/alabama enter code here xyz.com/dentist/alabama/polk-county/ enter code here xyz.com/chiropractors/alabama/ enter code here xyz.com/chiropractors/alabama/polk-county/ I originally was going to load the geography as pages and subpages, but with that method I cannot get the permalink separated by the type chiropractor and dentist. So now I have created a custom post type one for chiropractor and one for dentist which give me the permalink xyz.com/dentist and xyz.com/chiropractor. My question is now how to handle my category geography page. I was wondering if in wordpress it is possible to create a shell page such as xyz.com/dentist/[state]/ and then through php dynamically build a page for each state? So where it shows [state] it will be replaced with the actual state such as alabama, california etc when that specific page is viewed. But the shell page is just 1 page in the database. If so could someone give me a basic explanation on how to instruct a programmer to do this? Thank you.

    Read the article

  • Different sizes of same strings - Telnet programming

    - by tommyogp
    Hi all, I have been trying to create an iphone app sending telnet command. However what puzzling me is that the sizes of certain strings are so much different, particularly when they include \n or \r. I listed out a few examples. Please assist. const char *a = "play 25\n"; int sizeBitA1 = sizeof(a); // 8 units int sizeBitA2 = sizeof("play 25\n"); // 9 units const char *b = "\r\n"; int sizeBitB1 = sizeof(b); // 8 units int sizeBitB2 = sizeof("\r\n"); // 3 units

    Read the article

  • Legalities of programming companion Android apps

    - by honeal
    I'm interested in creating companion apps to several current Android apps and was curious if there is a legal issue with using their name and/or icons from the app. Like the companion app being called Angry Birds Companion or something and you were to use a picture of the level or one of the characters, etc (I'm simply pulling from thin air so don't judge the idea, just the question, please). I know there are Strategy guides to video games that use icons and names, but I'm assuming they have prior consent. Does anyone have any factual input on this?

    Read the article

  • Make FalseClass behave like TrueClass with meta programming

    - by Edvinas Bartkus
    This is theoretical question: is it possible to change FalseClass behavior to act like TrueClass? It is possible to override to_s, xor, &, | behavior but that is not enough. If you like Test Driven Development, follow my colleague's suggestion: puts "false is new true!" if false puts "never happens" if true Asserts won't work, would it? Is it possible to pass the test successfully?

    Read the article

  • How to enable `geom_text` to recognize `aes` in QPLOT (R programming)

    - by neversaint
    I have a data that looks like this ensg mirna_hgc time value perc id ENSG00000211521 MIR665 x 89 2.07612456747405 1 ENSG00000207787 MIR98 x 73 1.73010380622837 2 ... ENSG00000207827 MIR30A y 99 21.4532871972318 288 ENSG00000207757 MIR93 y 94 1.73010380622837 289 What I'm trying to do is to create a facet plot with label on top of it. The label can be easily called from the perc column. Using this code: dat.m <- read.delim("http://dpaste.com/1271039/plain/",header=TRUE,sep=" ") qplot(value, data=dat.m,facets=time~.,binwidth=1,main="")+ xlab("Value")+ ylab("Count")+ theme(legend.position="none")+ stat_bin(aes(value,label=sprintf("%.01f",perc)),geom="text") But it gave me this error: Error: geom_text requires the following missing aesthetics: label What I'm trying to do is to generate this plot:

    Read the article

< Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >