|
Yes. But keyboard and mouse will be work.
Thanking you
|
|
|
|
|
|
thank you sir.I want to show on Windows balloon tool tip and the taskbar notification area when the software is running.Please Help
Thanking you
|
|
|
|
|
Eh, what software?
Is this a new question or related to blocking USB ports?
|
|
|
|
|
yes its related to USB port.I implement the software it work in windows platform. I want to run this software in Linux platform.Is it possible?
Thanking You,
Regards
Debapriyo Saha
|
|
|
|
|
I have no idea, but you do have a browser on your computer, right?
Then follow these steps and you will find the answer.
1. Start your browser.
2. Select your favorite search engine, like Google or Bing or whatever.
3. Copy this string "block USB ports linux" into the search field.
4. Press Enter or click the search button.
5. Select one of the links that will appear.
6. Read about the subject.
7. Solve the problem.
8. Done.
|
|
|
|
|
If you just want to disable/enable all USB ports you can use this code. Note, you must have administrator privileges to change the registry.
Microsoft.Win32.Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord);
Microsoft.Win32.Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR", "Start", 3, Microsoft.Win32.RegistryValueKind.DWord);
Read More : code for USB Blocking in c#[^]
Please up vote if it helped you
Thanks And Regards
Sibeesh
|
|
|
|
|
I am having a no of word files .Each word file have some common heading.I want to retrieve the content under the common heading from all files.
For example for a no of resumes have the same heading like objective,qualification etc.I want to list the content under these particular heading using c#
Anybody know please help me to solve
|
|
|
|
|
|
Here is my code. I Get the printticket from print job. I Need Printjob informations like copycount, media size, media type, duplex printing and other details. But I can default values from the printticket like copycount is always 1 and sometime no. of pages in job also comes 0. Now struggle with this problem. I Need Help to solve this problem.
PrintServer myPrintServer = new PrintServer(@"\\MyMachine");
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
if (pq.QueueStatus != PrintQueueStatus.Error)
{
foreach (PrintSystemJobInfo job in pq.GetPrintJobInfoCollection())
{
if (bNewJob == true)
{
PrintTicket pt = job.HostingPrintQueue.CurrentJobSettings.CurrentPrintTicket;
UpdateText("Current Copies : " + pt.CopyCount.Value.ToString());
UpdateText("Default Copies : " + dpt.CopyCount.Value.ToString());
UpdateText("User Copies : " + upt.CopyCount.Value.ToString());
UpdateText("Full Name :" + job.HostingPrintQueue.FullName.ToString());
UpdateText("Job ID : " + job.JobIdentifier.ToString());
UpdateText("Job Name : " + job.JobName.ToString());
DateTime dt = job.TimeJobSubmitted;
UpdateText("Submitter :" + job.Submitter.ToString());
UpdateText("Date:"+dt.Day.ToString()+"/"+dt.Month.ToString()+"/"+ dt.Year.ToString());
UpdateText("Hosted Server :" + job.HostingPrintServer.Name.ToString());
UpdateText("No of Pages :" + job.NumberOfPages.ToString());
}
}
}
}
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
While this project I'm on is MVC, this question isn't specific to MVC, so I felt like this was the right place. Anyhow, we are using the Repository pattern for data access. One particular entity type, e.g. SharedObj, has several other entity types that the SharedObj entity can be tied to. Each is an IEnumerable, like this:
public class SharedObj
{
IEnumerable<Obj1> Obj1s;
IEnumerable<Obj2> Obj2s;
IEnumerable<Obj3> Obj3s;
}
So when we add a child object to one of those collections of SharedObj, we have a method like this:
public void AddObj(ObjType objType, int objId)
{
switch (objType)
{
case ObjType.Obj1:
entity.Obj1s.Add(GetRepository<Obj1>().GetByID(objId);
break;
case ObjType.Obj2:
entity.Obj2s.Add(GetRepository<Obj2>().GetByID(objId);
break;
case ObjType.Obj3:
entity.Obj3s.Add(GetRepository<Obj3>().GetByID(objId);
break;
}
}
"ObjType" is an enumeration of object types. The "GetRepository" method calls "DependencyResolver.Current.GetService<irepository<t>>();" and we use Unity for dependency injection.
Is there a way to make a more generic "Add" call based on the supplied "ObjType"? Or is this the only concept that can be applied in order to achieve what we're doing?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Map an Action to the enum in a dictionary and execute the appropriate entry when you need to use it.
|
|
|
|
|
Similar to what Pete said; I'd prefer to use a Dictionary<type,List<whatever>>
And I think that having AddObj perform GetRepository and GetByID violates the Single Responsibility Principle.
By passing in the object, you could probably also leverage generics and simplify things even more.
|
|
|
|
|
Hello,
i need integrate any bill acceptor in my c# application. Can you help me please? Do you know if exist any library in c#?
Beste Regards.
|
|
|
|
|
You mean like PayPal or something? Where are you stuck? You'll have to contact whatever vendor you want to work with and get their SDK documentation.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Do you know any bill aceptor model that i can buy that have a sdk in c#?
i have't find a sdk in c# but only in visual c o java.
I need urgently to acept bill in my c# program.
thanks
|
|
|
|
|
I don't know of any products that will integrate with multiple payment processors, although there probably are some.
If you want to use PayPal then refer to https://developer.paypal.com/docs/api/[^]
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi every one.
I want to create all rhythmic figures in music. I have an array for durations:
public static double[] duration_fltarray = new double[7];
duration_fltarray[0] = 1;
duration_fltarray[1] = 0.5;
duration_fltarray[2] = 0.25;
duration_fltarray[3] = 0.125;
duration_fltarray[4] = 0.625;
duration_fltarray[5] = 0.3125;
duration_fltarray[6] = 0.15625;
This array shows music times: 1 - 1/2 - 1/4 - 1/8 and so on.
I think it should be written by recursive function, because I couldn't do it by while and for loop.
Now, I need all sorted figures that sum of them are equal 1. For example:
1
1/2 - 1/2
1/2 - 1/4 - 1/4
1/4 - 1/2 - 1/4
1/4 - 1/4 - 1/2
1/4 - 1/4 - 1/4 - 1/4
1/8 - 1/2 - 1/4 - 1/8
1/8 - 1/2 - 1/8 - 1/4
1/8 - 1/2 - 1/8 - 1/8 - 1/8
...
Of course, number of figures will be too many more if we add 1/16 and 1/32 and ... .
I can print them in a web page(response.write) or in a c console; it's not important. But the algorithm should be as simple as possible.
Thank you all.
|
|
|
|
|
Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I think write my code truly, but it doesn't works.
|
|
|
|
|
OK. But how can anyone help you?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Sounds like homework. And I think your implementation so far is going to cause trouble -- particularly due to the use of floating-point values (integers will suffice). And I definitely wouldn't use recursion.
I'd also like to pass along a hint. Rather than starting from 1/1 and splitting, consider starting from 1/16 - 1/16 ... and work up to 16/16 (or 32/32 , whatever).
I have finished an implementation that uses an enumeration to define the values and returns an IEnumerable of Lists of the values; it's pretty slick and not much code. What do you have so far?
Edit: Due to poor performance when considering 1/32 and 1/64, I may look into a stack-based approach rather than the brute-force iterative approach.
Comparisons between the iterative and stack implementations:
// 1/4
6 rhythms found in 00:00:00.0000072
6 rhythms found in 00:00:00.0000057
// 1/4, with dots
8 rhythms found in 00:00:00.0000121
8 rhythms found in 00:00:00.0000064
// 1/8
56 rhythms found in 00:00:00.0015299
56 rhythms found in 00:00:00.0008122
// 1/8, with dots
114 rhythms found in 00:00:00.0015542
114 rhythms found in 00:00:00.0008210
// 1/16
5272 rhythms found in 00:00:00.0055043
5272 rhythms found in 00:00:00.0024528
// 1/16, with dots
24098 rhythms found in 00:00:00.0125192
24098 rhythms found in 00:00:00.0074718
So it looks like the stack-based algorithm generally takes about half the time as the iterative version.
I still haven't performed a full run on 1/32 or 1/64.
modified 30-Sep-14 13:36pm.
|
|
|
|
|
PIEBALDconsult wrote: I have finished an implementation that uses an enumeration to define the values and returns an IEnumerable of Lists of the values; it's pretty slick And wilt Thou share Thy shining-glory-code with mere mortals, here, below, on the darkling plain ?
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
Please stand by for a Friday Programming Challenge...
|
|
|
|
|
Thank you for your answer.
1- How do I able to use 1/4(0.25) with integer?
2- I got what you said; good idea.
Of course, usually people start music with simple duration such as 1.
Could you please guide me more? I tried too much.
|
|
|
|