|
I usually use a soft /dev/null for storing, but thinking about it, it might be better having it hardware accelerated. I will have to do some benchmarking...
|
|
|
|
|
Person secondPerson = LlPerson.First.Next.Value;
The above code assumes you are using the built-in linked list. LinkedList doesn't have a "GetInstance()" static method, as you seem to be using in your example. With the .Net LinkedList, you'd initialize it this way:
LinkedList<Person> llPerson = new LinkedList<Person>();
|
|
|
|
|
Hi,
I created setup and deployment to my project and would like to provide license agreement for the installation. Please guide me. Thanks in advance
|
|
|
|
|
|
|
thank you
|
|
|
|
|
|
|
hi! i have a simple AND gate circuit and i have to attach it with pc and control it through coding in c#. first of all i have to chk the serial port through which i have connected the circuit with pc. i dont knw how to control the working of AND gate with coding. means what should i do that if i clk the btn the LED attach on the circuit turn ON?
hope the question is clear
|
|
|
|
|
No, the details of the question aren't clear at all. This is what I can tell you:
- use SerialPort class to open up the right serial port;
- do not use the data lines (transmit, receive), use some of the control lines;
- available inputs are CD (CDHolding), CTS (CtsHolding), DSR (DsrHolding);
- available outputs are DTR (DtrEnable), RTS (RtsEnable);
- you can simply get or set their state by accessing the corresponding properties (mentioned above, within parentheses).
BTW1: for an LED you would need a series resistor, limiting the current to some 10 to 20 mA. Start with 330 or 470 ohm assuming the power supply voltage is 3.3 or 5V.
BTW2: assuming you're talking about some TTL or CMOS AND gate, you need an external voltage as well; however you probably don't really need a gate at all, and could take advantage of RS232C ports typically being able to sink and source 10mA (and more) on their control pins directly. As RS232C voltages may go up to 15V, you should start with a 1K ohm resistor here.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
|
hmm i have seen this article but it seemed to b very difficult m beginner... but from this code i have selected some piece of code to light the LED. but not sure if it is ok or not.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Threading;
using System.Timers;
namespace LED
{
public partial class Form1 : Form
{
public int i = 0, j = 0, adress = 888;
public Form1()
{
InitializeComponent();
Reset_LEDs();
}
private void Reset_LEDs()
{
PortAccess.Output(adress, 0);
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
int value = 0;
value += (int)Math.Pow(2, 0);
LoadNewPict_D0();
PortAccess.Output(adress, value);
}
}
}
what is LoadNewPict_D0(); function doing? will this piece of code ON the LED?
thanks 4 help
|
|
|
|
|
aeman wrote: value += (int)Math.Pow(2, 0);
Isn't that just 1 ?
aeman wrote: LoadNewPict_D0();
I think that's what's altering the images on the form he has, you don't really need it.
|
|
|
|
|
PIEBALDconsult wrote: Isn't that just 1 ?
Theoretically, yes. With all the rounding errors in floating-point math, who knows, it could be slightly less and get truncated to zero...
Why make things simple when you can make them look highly scientific?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
at this time m chking with only 1 LED.
|
|
|
|
|
You might want to look into the shift-left operator anyway.
|
|
|
|
|
|
PIEBALDconsult wrote: Parallel Port
what is this parallel port you speak of?
is it that big connector I think I once saw in the Science Museum?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
No, no, parallel connectors are actually rather petite, a mere twenty-five pins.
|
|
|
|
|
This better way of getting 1.
value += (int)(Math.Pow(Math.Sin(3.2), 2) + Math.Pow(Math.Cos(3.2), 2) + (8 / Math.Floor(8.7)) - 1);
|
|
|
|
|
Hi,
I've a university issued laptop with windows 7 on it. When I click on "windows" button it show my name as one of the system folder, but there is no path for it. It is above the "My Document" folder, in fact everyone in the university has same folder with their name [obviously]. I want to make an program that could extract the name of this folder when its it run on a particular system. And computer name, account name or name of Environment.getFolderName(SpecialFolder.Personal) all are different from this folder. I do not know where is this folder even stored.
CHECK THIS LINK FOR AN IMAGE
http://dl.dropbox.com/u/10120092/Untitled.png[^]
SHIVAM
|
|
|
|
|
There isn't a direct way, this however should give what you want:
string s=Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
s=s.SubString(0, s.Length-8);
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Shivam (/Luc);
You can access this folder with the SpecialFolder UserProfile ;
String s = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
|
|
|
|
Only if using .NET framework V4
|
|
|
|
|
Well the OP did not make reference to any .Net version, i don't know what he is using
[at least he knows now it exists in later frameworks!)
|
|
|
|