40 Archived Topics

Remove Filter
Member Avatar for tgreer

I'm revisiting a topic previously discussed in this thread: [url="http://www.daniweb.com/techtalkforums/thread23030.html"]http://www.daniweb.com/techtalkforums/thread23030.html[/url] The basic issue is this: when using a [b]StreamReader[/b], and [b]ReadLine[/b], to process a text file, you cannot determine where you are "at" within a file. This is because [b]StreamReader[/b] doesn't actually read from a FILE, it reads from a …

Member Avatar for Cesc_1
0
9K
Member Avatar for tgreer

I have a C# Class Library which I want to use as a COM object in VBScript. I'm using Visual Studio C# 2010 Express. Here's the class code: [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace PB_GUID { class PB_GUID_Encode { private Guid _myGuid; private string …

Member Avatar for tgreer
0
198
Member Avatar for tgreer

Since it's been about three years since I had to write any XSLT, I'd like some assistance with the code below. [CODE]<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:for-each select="/WatchConfig/ProcessList/Process/Node"> <xsl:if test="Plugin = 'PWScript'"> <xsl:text> </xsl:text> <xsl:value-of select="Config" disable-output-escaping="yes" /> <xsl:text> ************************************************************************ </xsl:text> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>[/CODE] …

0
177
Member Avatar for tgreer

Does C# have a conditional compiler directive for debug mode? I have code that I want to run only if I'm debugging.

Member Avatar for nathon
0
315
Member Avatar for tgreer

I'm having the same problem described in this, unresolved, thread on MS ANSWERS: [url]http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/mouse-scrolling-stuck-with-wireless-mouse-windows/ad41e351-d5f3-4a31-98f3-018e81dd3e9e[/url] I have a MS Wireless Laser Mouse 6000 v2.0. Windows 7 Professional 64-bit. Most dropdown controls and scrollbars will behave as if the mouse button is being held down. I should note the keyboard will often …

Member Avatar for dee101g
0
240
Member Avatar for tgreer

I'm coding a project in C#, VS2010, using SQL Express 2008 as the data source. Whenever any other application connects to the database (such as Management Studio), the next time my C# application runs, it cannot access the database. The error is "Operating system error 32". Unable to open the …

Member Avatar for Momerath
0
130
Member Avatar for tgreer

Windows Form Application, C#, in VS2010 Express. I get the "Object reference not set to an instance of an object." error with the line of code below, when I attempt to close the Form. [CODE]Int32 myID = Convert.ToInt32(((DataRowView)projectBindingSource.Current).Row.ItemArray[0]);[/CODE] This is a simple form with two data-bound controls. The record has …

Member Avatar for tgreer
0
167
Member Avatar for tgreer

I'm working with C#, and Adobe Acrobat 6.0 Professional. Acrobat exposes a COM Automation server with a few top-level objects. It's easy enough to create instances of those objects, by getting their Type via the .GetTypeFromProgID() method, and then using Activator.CreateInstance(). [code] // Create an Acrobat Application object Type AcrobatAppType; …

Member Avatar for jordonsc
0
2K
Member Avatar for tgreer

First, sorry for posting this here, but I couldn't find a VBScript forum on Daniweb (which I find surprising). I'm working with binary data in several different projects. Below is an example of code that works to retrieve a static map image (PNG) from Google: [CODE]strFileURL = "http://maps.google.com/maps/api/staticmap?markers=2200+S+Western+Ave+Lisle+IL&zoom=14&size=400x400&sensor=false" Set objXMLHTTP …

Member Avatar for tgreer
0
771
Member Avatar for tgreer

I'm having a problem with a dynamic LinkButton. For a result returned from a database query, I create two LinkButtons, dynamically. One is "Update" and the other is "Delete". I store Update or Delete in the .CommandName property. I store the identity value (the primary key) of the database record …

Member Avatar for bhavu4u
0
463
Member Avatar for tgreer

For one of my customers, I have to develop applications that communicate with each other via fixed-width files. In other words, they have developed a file format that is "generic" to a lot of operations. If I write a new utility, it is expected that the utility will be able …

Member Avatar for Geekitygeek
0
276
Member Avatar for tgreer

Recently, I noticed some strangeness on my home wireless network. Sometimes the speed would be slower than normal, I couldn't print to my printer, and some of my more advanced router settings (for port forwarding, firewall, etc.) would seem to be "lost". As it turns out, my laptop was attaching …

Member Avatar for DaveSW
0
373
Member Avatar for tgreer

I have a love-hate relationship with Palm. First, the love: for starters, Palm-based PDAs do everything I want a PDA to do. Just give me the basics, such as a nice contact list, memo/notepad, a to-do list, etc. Palm has always done that, and that's all it really needed to …

Member Avatar for Dani
0
245
Member Avatar for tgreer

Last August, Business 2.0 magazine published an article that speculated Google was considering building a U.S. broadband network capable of targeting specific advertising to users, based on the location of their WiFi. The so-called "Google.net"" or "Google WiFi" caused much speculation, however, the company remained close-lipped. Tuesday, Google finally made …

Member Avatar for tgreer
0
227
Member Avatar for tgreer

Web Developer. Webmaster. Web Designer. What do these terms mean? Which one are you? In fact, these terms have been used and misused so much that they are in danger of losing any distinct meaning. This article attempts to define and defend these labels and their meanings. "Webmaster" in particular …

Member Avatar for hollystyles
0
259
Member Avatar for tgreer

McAfee, Inc., a leader in intrusion prevention, announced that its security services group, Foundstone Professional Services, will release a whitepaper on Microsoft ASP.NET Forms Authentication and "cookie replay" attacks. The whitepaper will be located at [url]http://www.foundstone.com/index.htm?subnav=resources/navigation.htm&subcontent=/resources/whitepapers.htm[/url]. In response, Microsoft authored an MSDN article: [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;900111[/url]. What is a "cookie replay" attack? …

0
187
Member Avatar for tgreer

I'll admit it right up front: I'm an old guy, and this is a "kids these days" rant. Pull up your pants, comb your hair, and for Pete's sake, learn to type! I'm referring to what is variously known as "txt lingo", "txt msg spk", or my own term: laziness. …

Member Avatar for Scottg1989
0
333
Member Avatar for tgreer

Hi. I'm having some difficulty with a project that involves working with very large binary files. These are PCL files, where the decimal character "12" represents a Form Feed, but only if it's not embedded within a string of binary data. In other words, I'm looking for decimal "12", then …

Member Avatar for bpazhoor
1
1K
Member Avatar for tgreer

Hello, this is not a Web Development question, but this is the only XML forum on Daniweb. I need to copy a specific number of nodes in an XSLT transform. For example, I need to copy the first 5 <student> nodes, with all child nodes and attribute nodes, even though …

Member Avatar for tgreer
0
2K
Member Avatar for tgreer

I've posted a new article on my site, dealing with how to integrate JavaScript and ASP.NET. It's a "beginner level" article. [url]http://www.tgreer.com/aspnet_html_03.html[/url]

Member Avatar for SheSaidImaPregy
0
215
Member Avatar for tgreer

I'm struggling with XSLT. I need to copy an entire xml file to a new xml file. The input and output should be identical except for the addition of some extra tags around certain elements. Consider the two versions: [code="xml"] <?xml version="1.0"?> <document> <header> <general> <version>1.14.2</version> <form>/XX/ATL_ZI_D007_PURCHASE</form> <language>EN</language> <device>PRINTER</device> </general> …

Member Avatar for jwenting
0
179
Member Avatar for tgreer

I'm writing a utility program. In fact, the program will be a Console application that will contain many static methods, each method being a specific utility. The application will take two command line arguments: filename, and utility name. Of course I want to run the method specified on the file …

Member Avatar for iamthwee
0
175
Member Avatar for tgreer

I have an existing, perfectly functional, wireless network at home. The router is a NetGear WGT624v2. I understand SSIDs, WEP and WPA security, etc. I also work at home, and my company has provided me with a laptop and router/firewall, a CISCO PIX 501. My current configuration: [code] Cable Modem …

Member Avatar for tgreer
0
242
Member Avatar for tgreer

As usual, the examples I find for this either don't work, or don't apply. I want to store, essentially, a text file, within my app.config file, and access it programmatically. Here's a simplified version: [code] <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="PostScript" [COLOR=Red]type=""[/COLOR] /> </configSections> <appSettings> <!-- User application …

Member Avatar for tgreer
0
314
Member Avatar for tgreer

Does anyone have a good example of how to use this method? All of the MSDN examples I could find are useless because: [LIST=1] [*]they show a hard-coded size for the byte array [*]they show writing the output to the Console[/LIST] Ridiculous. I have a file that contains some binary …

Member Avatar for _r0ckbaer
0
208
Member Avatar for tgreer

[B]Brief Summary[/B] I've written a Windows Service. It uses Process.Start() to launch a Console Application. The console application performs a File.Copy(), to copy a file from the local file system to a network share. [COLOR=Red]Problem: [/COLOR] The file copy fails. I get an exception that tells me "part of the …

Member Avatar for tgreer
0
391
Member Avatar for tgreer

Has ASP.NET 2.0 introduced a simplified data control for displaying parent/child data? Imagine a HelpDesk application, where you want to display all the "open tickets". I can see how you'd use a GridView for that. However, each row in the resulting table should have the ability to, when clicked/selected show …

Member Avatar for BoggyBoy
0
429
Member Avatar for tgreer

I've developed a few ASP.NET applications in the past, develop C# windows apps all the time, but am just now developing my first ASP.NET 2.0 app. I'm having a nightmare getting a database connected. Everything is on my local machine, including IIS Visual Studio 2005 Professional Latest .NET Framework 2.0 …

Member Avatar for campkev
0
179
Member Avatar for tgreer

How would I go about making this entire class Serializable? What code would I add to a second constructor that would restore state/values from the XML file (de-serialize)? [code] using System; using System.Collections.Generic; using System.Text; namespace tgreer { public class indexer { private Dictionary<string, Int32> _documents; private Dictionary<string, Int32> _pages; …

Member Avatar for tgreer
0
478
Member Avatar for tgreer

I run an industry-specific, highly-targeted forum. I'm using a standard ad-rotator, where I can track/charge for clicks, impressions, or duration. I think I could charge a bit more that average because the site is so specific to an industry, nearly every member would be a qualified prospect. That said, what …

Member Avatar for Lonny
0
128
Member Avatar for tgreer

Doesn't C# support EBCDIC encoding? I'm working on a project that involves parsing Xerox Metacode print streams, encoded as variable-byte EBCDIC records. The print stream data itself is in ASCII, but the record headers and control records are in EBCDIC. I read the records in as byte arrays. I know …

Member Avatar for tgreer
0
583
Member Avatar for tgreer

Consider the following code snippet: [code]counter = 0; workOperations = new String [OPERATIONS.Count,2]; foreach ( System.Array o in OPERATIONS) { workOperations[counter,0] = (string) o.GetValue(0,0); workOperations[counter,1] = (string) o.GetValue(0,1); counter++; } ps.Operations = workOperations;[/code] There has got to be a better way to do this! The issue is, the [b]ps.Operations[/b] property …

Member Avatar for tgreer
0
202
Member Avatar for tgreer

With all the recent news and attention to the latest Google products, I've found myself becoming increasingly paranoid about Google. Have things started to take a creepy turn, or is it just my imagination? For example, the Google Library Project, and the Google Print Project. Who gave Google the right …

Member Avatar for tgreer
0
110
Member Avatar for tgreer

I run a couple of low-volume, niche-specific sites. I run ads on them, from that big search engine company. I was recently told that my account was terminated for "invalid clicks", with no further details. I can only speculate that someone overenthusiastically clicked many, many ads. Searching the web a …

Member Avatar for pulse
0
204
Member Avatar for tgreer

This is for a site concept I'm working on. Can multiple AdSense publishers exist on a single page? For example, imagine a site that I run, on which YOU contribute. If you contribute an article, I want the article page to have MY Google Ads at the top, and YOUR …

Member Avatar for tgreer
0
98
Member Avatar for tgreer

I just got a new laptop. It has dual Intel Pentium P4 2.8G processors installed. I'm running Windows XP Professional. My question is, does XP really use two processors? How? At what point are both processors being used? Under heavy load? At all times? Is there a way to assign …

Member Avatar for jwshepherd
0
214
Member Avatar for tgreer

I've often wanted a true blog/forum hybrid. I know exactly what I want, until I try to describe it! I think I basically want a forum, but one that doesn't look so rigidly structured as a forum. Also, I want something a bit more user-oriented, than topic-oriented. I'd like a …

Member Avatar for CharlesECHO
0
112
Member Avatar for tgreer

Let's see if I can completely strike-out, with a third unanswered post: I would like to know how to store binary data in the app.config file for a C# application. These are basically text strings, but they do include one or two "binary" characters, such as decimal 12. I need …

Member Avatar for Iron_Cross
0
187
Member Avatar for tgreer

Since nobody answered the thread on Binary File IO, I took a different approach. Now I'm having another problem. As I process a very large (>2GB) binary file, I store the byte position at certain points. Then, I reposition the file as needed. I store the byte positions in a …

Member Avatar for alpha_foobar
0
357
Member Avatar for tgreer

I've been hacking away at WordPress to get the style the way I want. My main task has been to convert their vertical menu tower into horizontal dropdown. It's working fine except for one problem. The blog software creates a calendar as a table. The table, the entire menu in …

0
123

The End.