|
How can i compare two strings using Soundex in c#.
Thanks,
Krishna
|
|
|
|
|
A quick search of Code Project would have found you this[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
hello,
I have developed an desktop app and i am printing barcodes at some stages. I am having issue printing the & sign. As the barcode font does'nt read this character. On furthur search i come to know there are 43 characters that the barcode font accepts and the & sign in not included in this list of 43 characters. Any ideas how can i make use of & sign and print its barcode..?
Thanks in Advance,
Asfand
|
|
|
|
|
Asfand wrote: On furthur search i come to know there are 43 characters that the barcode font accepts and the & sign in not included in this list of 43 characters. Any ideas how can i make use of & sign and print its barcode..?
If it's not there, then you can't use it. Adding it would be impossible, as all other barcode-scanners wouldn't know about the new character.
What type of barcode[^] are you using to encode your information?
I are Troll
|
|
|
|
|
You can only print symbols which are within the character set for any particular barcode. The simpler codes support only numerics, and so forth, in order to compact the physical size of the printed code. Try switching to EAN128 (or code128) which supports a better range of characters: See Here[^] That site also gives some detail on other barcode formats.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
maybe replace & by and then?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
modified on Thursday, May 27, 2010 9:45 AM
|
|
|
|
|
|
|
i am not able to achieve this task in C#, i m new to this , please help
|
|
|
|
|
Use a Singleton-like approach. Make the constructor private and add a static method. In this method return a new instance of the class when a static counter is less than 3 (starting with 0). Then increment the counter.
If the counter is >2 do what ever you like to do if the third instance is delivered.
Small example:
<br />
public class MyRestrictedClass<br />
{<br />
private static int instanceCounter = 0;<br />
private MyRestrictedClass()<br />
{<br />
}<br />
<br />
public MyRestrictedClass GetNextInstance()<br />
{<br />
if(instanceCounter<=2)<br />
{<br />
instanceCounter++;<br />
return new MyRestrictedClass();<br />
}<br />
throw new Exception("Maximum number of instances exceeded.");<br />
}<br />
}<br />
Best regards
Jens
When in trouble,
when in doubt,
run in circles,
scream and shout
modified on Thursday, May 27, 2010 3:18 AM
|
|
|
|
|
thank u Jens,, i m facing another problem in Socket programing in Vb.Net, i had developed a Server which recieve data from clients and forward to others, it was a multi threading application but now it stuck up , it was developed using a VB Winsock wrapper, now i want to develop it using .Net sockets, can u help me in this
|
|
|
|
|
Hi all,
In my application I am creating a word document using a default template doc and later adding dynamic content, this is working fine. My problem is now i am askd to create multiple copies of the same document as single document, for example in my word document i have one page with some content, based on the number of copies, the same page should be repeated in the same document and as single document (strictly as single document only, i tried by creating multiple documents and finally merging all the doc as single, this solution was rejected). To say when we take print out, we specify number of copies, so that we get that number of hard copies, i want the same logic. Binarywriter/streamwriter is not helping me, because my document contains images, please help me to solve this. Give me some URL or samples.
Kindly execuse if i am not clear in my point.
Thanks in advance.
Know is Drop, Unknown is Ocean
|
|
|
|
|
Exelioindia wrote: Give me some URL or samples.
A sample on manipulating Word using C# can be found here[^]. You can find the Microsoft Word Developer Center here[^].
I are Troll
|
|
|
|
|
hi everyone,
I want to change look of controls of window forms for .net framework.
Please suggest me , is there any dll file or any other open source tools that can change look of controls...
Thanx in advance..
|
|
|
|
|
Yep. Rewrite them and render them yourself. Or, use WPF to write your own controls. Or, buy a third party control library where they've done this for you. Or, you have to use themes at the system level to change the look of the controls, but probably not as nicely as a third party library.
|
|
|
|
|
Thanx for reply.PLease can u tell me which third party library I should use. Or can u give me some third party libraries list.
Thanx
|
|
|
|
|
Have a look at the code here to see what you would need to write just to customize the borders of a form.
My signature "sucks" today
|
|
|
|
|
Have a look at
http://www.componentsource.com[^]
And look either for component suites that contain specialized versions of the most used components OR look for components that let you "skin" the standard .NET components
Good luck
|
|
|
|
|
If none of the answers here are what you are looking for, then please be more specific: What look are you looking for? What do you want you controls to look like?
Don't start a new thread just because you don't like the answers here...
|
|
|
|
|
Actually I am using .netFramework 2.0 and VS 2005.
Now I want to change look of controls of window applications.
So I need any tool or any other application which help me.
What u has suggested me , I am not getting. I need something like WPF but my framework is 2.0.
|
|
|
|
|
How to zip/Unzip a *.Wav file ?
|
|
|
|
|
like any other file, why would .WAV be any different?
use a utility, a library, WinZip with its command line extension, System.IO.Packaging.ZipPackage (.NET >=3.0)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Well, I guess the point actually is that a zipped wave (i.e. PCM wave) file often has almost the same size as the original file. Consequently, you need "compression" by some codec (speex, mp3, ...) to reduce the size while not loosing to much of the sound quality.
|
|
|
|
|
ZIP is a lossless compression utility by design; you can use it to backup/transport/restore any data you want while preserving each and every bit of the original data.
If you want a high compression ratio and accept data loss, then use something else and don't call it ZIP as it isn't ZIP, by its own definition. So your subject line should be "audio compression", and that would attract other people's attention.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
hi
my code is:
static ReaderWriterLockSlim rw = new ReaderWriterLockSlim();
static Random rand = new Random();
Thread[] AThreadReader, AThreadWriter;
Thread ThreadReaderCreator;
string sDataBase;
Boolean bWriterMustAlive;
string[] asReaderDataBase = new string[10];
private void btnRun_Click(object sender, EventArgs e)
{
AThreadWriter = new Thread[Int16.Parse(txtBNMWriters.Text)];
bWriterMustAlive = true;
for (int i = 0; i < Int16.Parse(txtBNMWriters.Text); i++)
{
AThreadWriter[i] = new Thread(fThreadWriter);
AThreadWriter[i].Name = i.ToString();
AThreadWriter[i].IsBackground = true;
AThreadWriter[i].Start();
}
ThreadReaderCreator = new Thread(fThreadCreator);
ThreadReaderCreator.IsBackground = true;
ThreadReaderCreator.Start();
}
void fThreadCreator()
{
Random r = new Random();
AThreadReader = new Thread[Int16.Parse(txtBNMReaders.Text)];
for (int i = 0; i < Int16.Parse(txtBNMReaders.Text); i++)
{
int IloopLength = Int16.Parse(txtBLowerBCReaders.Text) + r.Next(Int16.Parse(txtBUpperBCReaders.Text) - Int16.Parse(txtBLowerBCReaders.Text));
for (int j = 0; j < IloopLength; j++) ;
AThreadReader[i] = new Thread(fThreadReader);
AThreadReader[i].Name = i.ToString();
AThreadReader[i].IsBackground = true;
AThreadReader[i].Start();
}
}
void fThreadWriter()
{
Random r = new Random();
int ID = Int16.Parse(Thread.CurrentThread.Name);
int news = ID;
while (bWriterMustAlive)
{
int IloopLength = Int16.Parse(txtBLowerBCWriters.Text) + r.Next(Int16.Parse(txtBUpperBCWriters.Text) - Int16.Parse(txtBLowerBCReaders.Text));
for (int i = 0; i < IloopLength; i++) ;
sDataBase = "";
for (int i = 0; i < Int16.Parse(txtBNumbersInString.Text); i++)
{
while (true)
{
rw.EnterWriteLock();
sDataBase += news.ToString() + " ";
rw.ExitWriteLock();
}
}
news += Int16.Parse(txtBNMWriters.Text);
}
}
void fThreadReader()
{
int ID = Int16.Parse(Thread.CurrentThread.Name);
changeAmountOfProgressBar(ID+1);
for (int i = 0; i < sDataBase.Length; i++)
{
asReaderDataBase[ID] += sDataBase[i];
}
if (ID == Int16.Parse(txtBNMReaders.Text) - 1)
{
bWriterMustAlive = false;
}
}
but I can,t Slove Readers Writers Problem
what is the Prblem?
|
|
|
|