|
Hi Alll
Please Anybody have code or knowledge about this question please send me give solution.
thanking you for supporting me.
Pankaj Tak
|
|
|
|
|
Not enough information. What printer and attached to what machine? Are you talking about a network printer the IIS server can see? Are you talKing about pages per job or total pages that have gone through the queue? Or are you talking about the must of pages the printer has put through during it's lifetime?
|
|
|
|
|
Sir Thanking you for reply me.
I am talking about the printer attached with computer.
when printer print the pages per day through our attached printer.i want to count the how many pages print on that day.
e.g if 350 pages print on that day.I want to count just numbers of pages print on day using asp.net with C#. so sir please guide me how to solve this problem.please provide me Code for that program.
I am waiting for your positive Reply sir.
Thanking You So much for helping me.
|
|
|
|
|
Thanks for reply me.
I am talking about computer attach to printer then we print pages from particular printer in a day. I just want that everyday printer that attach to the system(windows 7) count the numbers of pages that day only.I want everyday how many pages print from Printer thats only Sir.
Using asp.net With C#
Thanking you
I waiting your reply sir
|
|
|
|
|
ASP.NET code runs entirely on a web server, not the client machine. You cannot do what you want in a web application. Well, not unless the server is hosting all of the printers you want stats on.
|
|
|
|
|
its not possible in asp.net ?
|
|
|
|
|
What did I just say??
If you're talking about the printers attached to the clients machine, NO IT'S NOT POSSIBLE IN ASP.NET.
ASP.NET code runs ENTIRELY on the server, not the client. ASP.NET code has no way to get at the devices attached to a client computer. It can ONLY use the stuff attached to the server.
|
|
|
|
|
its is possible only server not client machine?
How can I made for server machine using asp.net using C# please guide me.
Thanking you support me.
|
|
|
|
|
|
how to check arithmetic ,logical, trigonometric and gromatric
values in nested switching ..
i mean how to use nested switch for the above operators
when i press l it us some logical operation \
and when i press a give some arithmetic operation and so on....
|
|
|
|
|
You are approaching this from the wrong direction. You first need to define your problem and then break it up into the separate parts necessary for a solution. Only then can you decide whether you need any switch statements, let alone nested ones.
Use the best guess
|
|
|
|
|
Can't be solved using a "switch"; this is where we traditionally use the parser-pattern.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Are you looking for something like this,
string Operator = GetOperator();
switch (Operator)
{
case "Sin":
case "Cos":
case "Tan":
{
// do something
switch (Operator)
{
case "Sin":
break;
case "Cos":
break;
case "Tan":
break;
default:
break;
}
break;
}
case "+":
case "-":
case "*":
case "/":
{
// do something
switch (Operator)
{
case "+":
break;
case "-":
break;
default:
break;
}
break;
}
default:
break;
}
|
|
|
|
|
It doesn't matter. Nested selects will not solve the problem he's ultimately trying to solve.
|
|
|
|
|
i many time call method with the help of thread like
static void Main( string[] args )
{
Thread t = new Thread( MyFunction );
t.Start();
}
static void MyFunction()
{
//code goes here
}
and some time i use ThreadPool class also like
System.Threading.ThreadPool.QueueUserWorkItem(delegate {
MyFunction();
}, null);
but i do not understand what is the difference between calling any method with the help of thread class or ThreadPool class
so i am looking a good discussion about what is the difference between Thread & ThreadPool class.also need to know when we should use Thread class to call a method and when ThreadPool class to call any method ? if possible discuss also with sample code with sample situation.
another very important question is that if i start multiple thread then my application performance will become low or bad ? if yes then tell me why...?
now also tell me what is BackgroundWorker class and how it is different from Thread & ThreadPool class. how far i heard that BackgroundWorker class also create a separate thread to run any method. so please discuss how it is different from Thread & ThreadPool class and when one should go for BackgroundWorker class.
here is small sample code of BackgroundWorker
private void button1_Click(object sender, EventArgs e)
{
BackgroundWorker bw = new BackgroundWorker();
// this allows our worker to report progress during work
bw.WorkerReportsProgress = true;
// what to do in the background thread
bw.DoWork += new DoWorkEventHandler(
delegate(object o, DoWorkEventArgs args)
{
BackgroundWorker b = o as BackgroundWorker;
// do some simple processing for 10 seconds
for (int i = 1; i <= 10; i++)
{
// report the progress in percent
b.ReportProgress(i * 10);
Thread.Sleep(1000);
}
});
// what to do when progress changed (update the progress bar for example)
bw.ProgressChanged += new ProgressChangedEventHandler(
delegate(object o, ProgressChangedEventArgs args)
{
label1.Text = string.Format("{0}% Completed", args.ProgressPercentage);
});
// what to do when worker completes its task (notify the user)
bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
delegate(object o, RunWorkerCompletedEventArgs args)
{
label1.Text = "Finished!";
});
bw.RunWorkerAsync();
}
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: with the help of thread class or ThreadPool class
The threadpool holds pre-created threads; those always come in handy when programming UI-tasks to do async processing. They're background-threads, and get recycled to the pool when finished. Background-thread get destroyed automatic when your app closes.
If you need something more complex, you'd create your own[^].
Tridip Bhattacharjee wrote: another very important question is that if i start multiple thread then my application performance will become low or bad ?
It doesn't make execution "faster", it creates a new execution-path, one that "might" run on a different CPU (if you have multiple). You'll already need them if you want a nice responsive UI.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Also, spinning up a thread is an expensive operation. Using one out of the threadpool saves you the execution creating one yourself.
|
|
|
|
|
Use a BackgroundWorker if you need to switch between the thread and your UI.
Use threads for long running processes that would be running in the background.
|
|
|
|
|
I've created a small VS 2012 c# project that eventually does a divide-by-zero. I catch the exception and then do a call to MiniDumpWriteDump and it successfully creates a dump file.
Obviously I have the pdb and source files.
What I'd like to do now is load the minidump into VS and then examine it so I can get familiar with how to read it etc. As I understand, the minidump file should be able to display exactly what was going on and using the debugger, I could look at the stack trace and display variables? Double-clicking the minidump file opens it in VS 2012 but I'm really left with the puzzle, what now? Has anyone loaded a dump file before and looked at it in VS?
I've searched for answers but the term minidump is so ubiquitous that it's really not easy to what's relevant to VS and what isn't. I'm led to believe that if I have the dump file and the pdb files and the source then I should be able to see an exact snapshot of went turned tits-up. I just don't really know what's the best way to load it and change any settings to use it. If I can get it working on a simple divide-by-zero app then I can use them in our production app which'll help us deal with fatal problems reported by our users.
TIA.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
PHS241 wrote: Double-clicking the minidump file opens it in VS 2012 but I'm really left with the puzzle, what now?
Now you set the location of the debug-symbols. I got it working using VS2010 and .NET 4, so you should be able to achieve the same.
I followed this[^] tutorial.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks Eddy. I had a quick squizz at the link and I've bookmarked it and I'll read it later on.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
I have a simple question but for someone like me who is not familiar with c# is giving a bit of trouble. I am making a basic script in c# for a bot in a videogame (TERA). What I want is to avoid attacking static immortal debuffs when my character approaches to them. A simple script without nothing would be like this:
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace SimpleCombat
{
public class EntryPoint : ZurasBot.Addons.ICombat
{
public override string Name
{
get
{
return "Shell";
}
}
public override void OnLoad()
{
}
public override void OnUnload()
{
}
public override void Settings()
{
}
public override void OnBotStart()
{
}
public override void OnBotStop()
{
}
public override void Patrolling()
{
}
public override Boolean Pull(MyTERA.Helpers.ObjectManager.TERAObject Object)
{
return true;
}
public override Boolean Combat(MyTERA.Helpers.ObjectManager.TERAObject Object)
{
return true;
}
public override void PostCombat()
{
}
}
}
The question is: How/where do I declare/define the pullfunction? What I have to add is this:
if (Object.S1NPCDataController.Name == "name1") return false;
"name1" being the name of the static immortal debuff. Anyone could help me? It is important to me since I am helping a friend to level up his character so he can play with the rest of us! I would really appreciate any help you could give me, it would mean a lot to me! Thank you very much for your help, I hope I can find a solution! Have a nice weekend!
|
|
|
|
|
You'd be better off asking in the forums for the game. You're question has everything to do with the SDK for the game, not C#.
It's VERY unlikely any of the regulars here have written anything for that game.
|
|
|
|
|
Well I don't know the scripting for the game. But if that what you posted is the default BotScript than I would say it should be placed in the "Pull" or "Combat" Method.
ex.:
public override Boolean Pull(MyTERA.Helpers.ObjectManager.TERAObject Object)
{
if(Object != null && Object.S1NPCDataController != null)
return Object.S1NPCDataController.Name != "name1";
return true;
}
|
|
|
|
|
how use nested switch in c#
|
|
|
|