|
hi,
i am feeling a poblem. can anyone help me in blocking a packet on the network. so we check the paket and then route it if it is valid or drop it.
so the problem is to sniff snd blok packet.
Thanks.
|
|
|
|
|
You don't know much about network traffic, do you?
Sniffers only look at what's passing by, they don't intercept and block anything...
What your looking for is a router! Unless your machine is physically in the path of the network packets, meaning that ALL network traffic on that segment passes THROUGH your machine (not aorund or passes by it), there's nothing you can do to block anything.
BTW, this is already implemented in the form of Windows Routing and Remote Access...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there something faster than .|[\r\n] in Regular Expressions ?
|
|
|
|
|
|
|
I want to match multiple-line comments from /* to */ so I use:
Regex regex = new Regex("/\\*(.|[\r\n])*?\\*/");
|
|
|
|
|
|
|
Hi there,
The following code generates the CS0122 "System.IO.FileStream.FileStream() is inancessible due to its protection level."
What am I doing wrong?
Thanks,
Akos
>>>>>>>>>>
The code:
using System;
using System.IO;
namespace MyStreamReader
{
///
/// Summary description for MyStreamReader.
///
public class MyStreamReader : System.IO.FileStream
{
public MyStreamReader()
{
//
// TODO: Add constructor logic here
//
}
}
}
|
|
|
|
|
the mistake in your code is that you are trying to use the default contructor of the filestream class. But this constructor isn't accessible. A solution to this problem is just using another constructor of the filestream class. You can call other constructors via the base synonym(as you can see in the following code).
class b : System.IO.FileStream
{
public b(string str): base(str,FileMode.OpenOrCreate)
{
}
}
|
|
|
|
|
Beauty! Thanks Hooray!
Akos
|
|
|
|
|
when i use the method Mesh.clean(...), throw a exception of System.NullReferenceException. this is my code:
private void LoadMesh(string file)
{
ExtendedMaterial[] mtrl;
GraphicsStream adj=null;
// Load our mesh
mesh = Mesh.FromFile(file, MeshFlags.Managed, device, out adj, out mtrl);
// If we have any materials, store them
if ((mtrl != null) && (mtrl.Length > 0))
{
meshMaterials = new Material[mtrl.Length];
meshTextures = new Texture[mtrl.Length];
// Store each material and texture
for (int i = 0; i < mtrl.Length; i++)
{
meshMaterials[i] = mtrl[i].Material3D;
if ((mtrl[i].TextureFilename != null) && (mtrl[i].TextureFilename != string.Empty))
{
// We have a texture, try to load it
meshTextures[i] = TextureLoader.FromFile(device, @"..\..\" + mtrl[i].TextureFilename);
}
}
}
// Clean our main mesh
Mesh tempMesh = Mesh.Clean(CleanType.Simplification ,mesh, adj, adj );
// Replace our existing mesh with this one
mesh.Dispose();
mesh = tempMesh; //when run here, throw a exception
}
i have no idea that what can i do.
|
|
|
|
|
I've been trying to write a quiz program using windows forms. I've been searching around for examples and can't find anything. Everything I read or find is only text related. How can you include an image in a dataset or datatable??
Could someone please write a basic program with 2 multiple choice questions containing some text and an image. Perhaps you could email me the source code or something. Maybe use a xml file or txt file to contain the quiz data.
An example question could be:
What type of fruit is in the picture?
Choice A = Apple
Choice B = Orange
Choice C = Pear
Choice D = Carrot
Any help with this would be really appreciated!
|
|
|
|
|
Do you want to put images into your database, or could you use an array as your data source ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Using an array for the data source which could be used to then load the image from a bmp or jpeg file.
Thanks..
|
|
|
|
|
Then why can't you do what I suggested to you days ago ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Couldn't figure out how or where to add the code as I didn't understand how to use the code with the question code.
|
|
|
|
|
Why didn't you ask ? Will you abandon the next worthwhile solution if you can't get it right away ?
The idea is to keep a list of images, and points where they appear on the screen, in a structure with the text. To 'draw' each question, dump the text and then iterate through the images, drawing them in the right place. This will need tweaking if they area they are drawn on can change in size, to scale image location.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hello i am trying to write some characters to an xml file in strings that arent good in an xml file specificly & i realize you can replace this with &
and i read about the function HtmlEncode on msdn
my question is were do i find this function or is it set someplace in my xmltextwriter object
please help me out
|
|
|
|
|
as far as I know does the xmlwriter nothing like this - because xml supports different encodings it is not neccessary to htmlEncode the string.
But if you wish to use the HtmlEncode function you can use it the following way.
string str = System.Web.HttpUtility.HtmlEncode("bye");
To have access to the System.Web Namespace you need to add a new reference (System.Web.dll) to your project.
|
|
|
|
|
hooray wrote:
because xml supports different encodings it is not neccessary to htmlEncode the string.
Let me correct you, HtmlEncode has nothing to do with "different encodings" ( here I assume you mean UTF, ASCII etc) but problem is that at least characters < > & etc. has special meaning in XML, and they cannot be in XML document in literal form. You have to either wrap 'em into CDATA or "enocde/escape" them as character enties - e.g. &, <... HtmlEncode does exactly this kind of "encoding".
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
yeah - that right.Thanks for the correction.
that was my mistake because I only thought of the language specific umlauts.
|
|
|
|
|
Is it possible to create a custom event/event hander?
Like say, call my EventHanlder when the even of a variable changing.
int i=0;
If the value of i changes, Can I make an event handler for it?
/\ |_ E X E GG
|
|
|
|
|
The only way to do this AFAIK is to turn i into a property, and then firing an event in the setter.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
So, yes! I have to go to google now and find out what AFAIK is, finally....
/\ |_ E X E GG
|
|
|
|