|
|
i create a account software using c# dot 2010 & SQL server 2005,i deiced when crate a company after that create a database with table after that use database.
|
|
|
|
|
What do you mean "best way"? I'ts not that hard. SQL servers let you manage them through SQL commands. You simply execute those commands the same way you would any other query against a database. Create a Connection object, a Command object with the appropriate SQL command to create your database, tables, indexes, or whatever... and call ExecuteNonQuery on the Command object. Do this for each command you need and there's your database.
|
|
|
|
|
|
Hi
I want print my rdlc report without view. I trying create metafile and print but I don't know hot to create metafile multiple data table source to rdlc report please help me my project in vb.net 2010
|
|
|
|
|
Regards to all,
I'm writing an application in C# language (VS2008) that runs in a device with Windows Embedded Compact 7, so it uses Compact Framwork and not the full .NET framework.
I need to implement something similar to a screensaver and to do this I need a timer to count time and I need to reset it anytime the user do anything.
My problem is that I don't know how to detect easily user activity.
The application has many pages, buttons, textboxes, tables so I can't put a timer reset in any control.
I think there must be a clever way to do this, maybe some Application event but I don't know.
Anyone can help me?
Thanks in advance.
Steve
|
|
|
|
|
Not quite sure what you want; but in regular Windows, you open a form that covers the screen. Simply catch any input on that form (keydown, mousemove) to check for user-activity.
If you need detect activity without an overlaying form, you would need to hook each control.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for your reply, Eddy.
I think you have understood what I need.
The screen saver will be a simple form that will pop up (ShowDialog) and cover anything.
To close the "screensaver" I will catch any input on that form as you suggest.
The problem is to start the screen saver.
I can't (or I don't know how to) open a form that cover the screen but is transparent to user, I mean it lets the user interact with the application.
To hook each control is really the only way?
Thanks.
Steve
|
|
|
|
|
Look here: Detect user inactivity (systemwide)[^]
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
|
Hi all,
I did successful to calculate Average of a datatable's column by used:
aNewVal = dt.Compute("Sum(Total)", "EmpID = 5")
Do we have a similar command for calculate geomatric mean please? (In VB.net/C#)
Could you please show me a way to calculate calculate a geomean for a datatable column?
Thank you verymuch.
|
|
|
|
|
Member 9527531 wrote: I did successful to calculate Average of a datatable's column by used:
aNewVal = dt.Compute("Sum(Total)", "EmpID = 5")
You've calculated the sum of the values, not the average. To calculate the average (arithmetic mean), you'd need to use Avg(Total) instead.
Member 9527531 wrote: Do we have a similar command for calculate geomatric mean please? (In VB.net/C#)
There's nothing built-in - see the list of supported expressions on MSDN[^] - so you'll have to roll your own.
Using the arithmetic mean of logarithms[^] and a spot of LINQ, it's quite simple to calculate the geometric mean:
IEnumerable<double> values = dt.AsEnumerable().Where(r => r.Field<int>("EmpID") == 5).Select(r => r.Field<double>("Total"));
double geometricMean = Math.Exp(values.Select(Math.Log).Average());
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Could any one give me a similar LINQ code to calculate GEOMEAN for my code (in VB) please? (My code was for Average)
My code for calculating Average is
Dim MyVal as Double = mySourceTable.Compute("Avg(" & aSumColumn & ")", (aGroupByColumn & " = 'abc' AND " + amYearColumn & " = '2009'"))
Because I don't family with LINQ so I tried to modify the code to
Dim values As IEnumerable(of double) = dtGroup.AsEnumerable().Where(r => r.Field<int>(aGroupByColumn & " = 'abc' AND " + amYearColumn & " = '2009'")).Select(r => r.Field<double>("Total"))
Dim geometricMean = Math.Exp(values.Select(Math.Log).Average())
Absolutely, the modified code above can not be run.
I did not use LINQ before and I also did not use C#. Please give me the LINQ to calculate GEOMEAN in VB.
Help me please.
Many thank
SELECT exp(avg(log(Ind)))
FROM TabInd
Calculating geometric mean (GEOMEAN) with SQL.[^]
modified 5-Sep-16 3:51am.
|
|
|
|
|
I have a vb.net app (.net 4) which writes serial data (no more than 10 bytes, via System.IO.Ports.SerialPort) and there seems to be a delay in the send. An external device tells me to do something. It takes my program about 15ms to process this request and send the result back to the host. The host is timing me to see how long it takes. I can guarantee that I am sending the serial string within the 15ms, but the host doesn’t get it for 80ms and some times as much as 150ms! What external force is causing this delay? I was original using a USB to serial adapter but have since switched to a PCIe card and am getting the same results.
|
|
|
|
|
Please dont post the same question in multiple forums - you posted it in another forum - once is enough
|
|
|
|
|
Thanks for the suggestion, but it seemed pretty logical to post in both places. And, the fact that I got good information from both posts, furthers that logic.
|
|
|
|
|
A very rare occurrence, I assure you.
Most of the time, you get conflicting answers and the people on one post don't know about the other. It turns into a nightmare and pisses people off, especially the original poster.
|
|
|
|
|
Note taken. Thank you Dave.
|
|
|
|
|
Member 8153852 wrote: What external force is causing this delay? None, it is caused by the design of Windows. See here[^].
You application is not the only one running, and you cannot guarantee your call will be within 80 or 150ms, as Windows is not a realtime-OS. That way other applications (like from some companies that like to preload their reader) cannot use up all resources.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I used the asp.net login control to create the user login screen:
<asp:login id="lgn" runat="server">
But, how do I make it functional so that valid logins work? Do I have to add JavaScript code or C# code conditions to make this functional?
|
|
|
|
|
Please use the ASP.NET forum for ASP.NET questions.
|
|
|
|
|
|
many developer criticize the asp.net. I don't know they hated due to brand name of Microsoft or performance asp.net?.
|
|
|
|
|
This is a debate question. It's not really suitable for a forum like this. You might want to try the Lounge instead.
|
|
|
|
|
Ask it under ASP.NET forums, they would say "ASP.NET is the best!". Ask it under PHP forums, they would say "ASP.NET is the worst!"
So it just doesn't make any sense at all as the choice is yours to make. You can surely Google for it and ask about the features and services provided by each of the framework. You will get the idea yourself.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|