reading

What is the single most influential book every programmer should read?

If you could go back in time and tell yourself to read a specific book at the beginning of your career as a developer, which book would it be? I expect this list to be varied and to cover a wide range of things. For me, the book would be Code Complete. After reading that book, I was able to get out of the immediate task mindset and begi...

How do you actually read source code?

Reading source code is a good way to improve as a programmer, but I've never seen a great explanation of how to do it. We often read textbooks & novels linearly, perhaps taking notes along the way. What do you do when trying to understand how a program works? Try the user-facing version of the program with your own inputs Read the API ...

Reading changes in a file in real-time using .NET

I have a .csv file that is frequently updated (about 20 to 30 times per minute). I want to insert the newly added lines to a database as soon as they are written to the file. The FileSystemWatcher class listens to the file system change notifications and can raise an event whenever there is a change in a specified file. The problem is t...

passing or reading .net cookie in php page

Hi I am trying to find a way to read the cookie that i generated in .net web application to read that on the php page because i want the users to login once but they should be able to view .net and php pages ,until the cookie expires user should not need to login in again , but both .net and php web applications are on different servers ...

How can I read an Http response stream twice in C#?

I am trying to read an Http response stream twice via the following: HttpWebResponse response = (HttpWebResponse)request.GetResponse(); stream = response.GetResponseStream(); RssReader reader = new RssReader(stream); do { element = reader.Read(); if (element is RssChannel) { feed.Channels.Add((RssChannel)element); } } while ...

How do you make time to read technical books?

I have always wondered how people make time to read technical books. Because after working for 8-10 hrs a day (sometimes even 12 hrs) first thing I want to do is to keep myself away from the technical details. Even if I try to read the technical books, I can't put my 100% in to it (with out that reading is of no use, I believe). I read a...

Tech Books you have but never read

Let's be honest. Many of us have books that were bought thinking "I might need this some day". That day has never come. Or maybe you spent $50+ on the book but only used it a few times. Or you bought it thinking it was the current technological trend. Post your list of books that you have but have never read, let alone used for a proj...

Inserting of file into an html page using Javascript?

I'm currently trying to read text from a file and append it to a element in my html page using the DOM and Javascript. I can't get the text to format though. I've tried using innerHtml but isn't formating at all( no line breaks ). Here is the javascript: http = new XMLHttpRequest(); http.open("GET",FILE,false); http.send(); documen...

Socket reading data asynchronously with special message terminator

I have to connect via tcp to a server that terminates responses with 0x4 instead of the standard 0x0. I want to keep things simple and use a synchronous send/receive from the socket class. The send works but the receive blocks indefinitely because the server does not terminate messages with 0x0. I cannot synchronously read to the first 0...

Embedding a binary file inside a class library

Hi, Is it possible to embed a custom binary file inside a C# class library and then at runtime read it with a binary reader? I'm guessing it might be possible through resources. Many thanks ...

Required reading for a soon-to-be web developer

I am about to start working with web development after doing (non-web) server and client development for about ten years. I'm not looking for info on any particular framework, library or about TCP/IP. What I am looking for is reading (dead tree or online) that will help me understand the different challenges and terminology that is ne...

Unable to read in C# an XML file opened in Word

Currently I have a C# application that reads an XML file. But if this XML file is opened in word and then my application reads the same XML file, I get an IO Exception. All I need to do is read the file. Here is a small code snippet; public Object Load() { try { using (FileStream fs = new FileStream( filePath, File...

Oddity with PHP tail -n 1 returning multiple results

I had this question... answered and very nice it was too. But, oddity has emerged whereby if the log file has a unique last line, (i.e. the first few words are different to the preceeding lines) it correctly returns that last line with tail -n 1 "file" but if the last few lines are similar to the the last line, it returns all the lines t...

reading integers from binary file in python

Hi there... I don't know if the question title is correctly set. I'm trying to read a BMP file in python. I know the first two bytes indicate the bmp firm. Next 4 bytes are the file size. When I excecute: fin = open("hi.bmp", "rb") firm = fin.read(2) file_size = int(fin.read(4)) I get ValueError: invalid literal for int() wit...

How to read a technical book to remember most of it?

There are many technical books that become thinker and thicker and the pressure from the technical society is more and more to read them and remember many concepts described in them. But it's so hard to do it. I have only a few hour a week to read them and when I reach the middle of the book I forgot most of what I've read at the beginni...

Reading data from file into array of structs C++

I have a sample txt file and want to read the contents of the file into an array of structs. My persons.txt file contains 5 arbitrary nos one on each line. 7 6 4 3 2 My program looks like this: #include <iostream> #include <fstream> using namespace std; struct PersonId { typedef PersonId* ptr; PersonId(); int fId; }; ...

How to read a text file upto certain position in C?

I am passing a string as an argument to my program and extracting its position in a text file. Can we read a text file only upto this certain position in C?? If yes, then please tell me how. ...

Reading one or more to understand ?

I love coding and designing applications but there is something annoying me so much. Some times I can't focus and understand what I am reading when learning new code or a new subject or whatever and that really annoys me because It causes me to read again and again and again which really puts me off and frustrate me. Does something like...

What's the quickest (code execution) way to execute an XML reading?

I have to read the XML: <items> <item> <prop1>value1</prop1> <prop2>value2</prop2> <prop3>value3</prop3> </item> <item> <prop1>value1</prop1> <prop2>value2</prop2> <prop3>value3</prop3> </item> </items> And put the values into a List<CLASS>. Some options: Use XMLSerializer to dese...

Reading label Data from MVC view using Model binders

We are having MVC view where user can select few fields. I want to read the data from the view. Currently using model binders i am able to read only the changeable data (from text box) into the object. How do i read the data held in label in the view using model binders? ...