Programming :: Simulate Dijsktra's Algorithm Using Network Animator Of Ns2?

May 3, 2011

I need to simulate dijsktra's algorithm using network animator of ns2. how to write a tcl script for my code. This tcl script runs the dijsktra code and simulates its running on network animator.

View 1 Replies


ADVERTISEMENT

Programming :: Simulate A Serial Protocol In User Space Program To Test Reception Algorithm?

Jul 28, 2010

I want to simulate a serial protocol in user space program to test reception algorithm. The protocol is similar to UART protocol but frame format is different. The duration of 1 bit is 114,46 us. In my main function I'm creating two threads. Tx for simulating transmitting data and Rx for reception data. For measure time I use create_timer() function and signals. Each thread has its own timer and signal handler. Tx timer uses SIGUSR1 and Rx timer uses SIGUSR2. Tx thread sets the global variable and Rx reads it.

The timers are set to sample with 114,46 us period. When they reach this value signal handler should set the flag. Flag is check in thread and some operation are made. When I set the timers period for longer time (100 ms) everything works fine but when I change it to default value (114,46 us) the Rx thread doesn't receive the proper data. I am wondering if the 114,46 timer period is possible to simulate in user space? Whether the time will give me the proper resolution ? Theoretically it should provide 1 ns resolution.

View 3 Replies View Related

Programming :: Implementation Of RSA Algorithm In C / C++

Aug 2, 2010

Can I know the implemention of RSA(Encryption and decryption) algorithm in C / C++.

View 1 Replies View Related

Programming :: MD5 Algorithm Implementation

Apr 27, 2011

I have a copy of the MD5 algorithm and I'm taking a look at the source. It's pretty interesting but there are a few things that I'm curious about and I was wondering if anyone a bit more intuitive than I could help me out.The function declarations in the MD5 files are a bit unfamiliar to me. There is a macro used called PROTO_LIST, which I'm still not sure as to what this thing is doing exactly, but it's littered everywhere throughout the source.The signature here isn't too unfamiliar to me with the exception of the position of the PROTO_LIST macro. So here is a function with an unnamed argument of type MD5_CTX*.To me, this resembles an initializer list found in C++ with constructors but I certainly don't think that is the case here. So my questions about this are (1) how is this legal code in C and (2) what functionality has the PROTO_LIST macro provided for the function?

View 3 Replies View Related

Programming :: Simulate Unix Kernel In C++ ?

Jun 2, 2010

How simulate unix kernel in c++..or give me a link....

View 2 Replies View Related

Debian Programming :: How To Simulate Script Execution

Aug 7, 2015

I'm trying to save the output of the script I wanna run but for some reason I cant manage to do it with "script.sh > Output_4.txt"

The thing is that the script was already run and it extracted some directories so when I try to run it again (to save the log to a Output_4.txt) bash says (see screen-capture) and of course the log's empty!!!!

View 2 Replies View Related

Programming :: Which Is Scheduling Algorithm Which Will Make Thread O?

May 4, 2011

I have a timer thread, and when it expires, it sets a flag. The only problem is, if any higher priority thread comes in between, then the timer is not expired in real time.Thus i want to set a highest priority to my thread. Now, i know 2 algos, which can make my thread in real time are: SCHED_FIFO and SCHED_RR.

So, here are my queries: 1) Which scheduling algo is best suited for this purpose? 2) Is it guaranted to work in real time if i use that algo (you suggest in 1) and set the max_priority by getting the maximum settable priority for that particular algorithm using, int sched_get_priority_max(int policy);

View 2 Replies View Related

Programming :: Algorithm For Binary Frequency Search?

Jul 16, 2010

I've got a bit of an obscure question for you to test your brains a wee bit. I'm trying to implement a search program to find areas of high density in a binary string.

E.g.

Code:

[0001001010
0001110001
0000001000
1001000010
0101100100]

Where density is the number of 1's / number of digits with a maximum number of digits being the current number in a buffer (in this example 50). So for the example the density for the whole buffer is 15/50. But the density of Buffer[14..20]=[1110001]=4/7. So if looking for areas of density = 1/3 it would find the longest sequences of density over 1/3.So in the example. Buffer[4..9]=[100101]=3/6=1/2 which is above 1/3 but it is within the Buffer[4..48]=[100101000011100010000001000100100001001011001]=15/45=1/3

View 5 Replies View Related

Programming :: Self Configurable Diagnosis Algorithm / Tcl Script?

Sep 13, 2010

I have an algorithm guys called "Self Configurable Diagnosis Algorithm" but i don't have program for this.help me regarding that program and which type of Tcl script will be better suitable for that.

View 3 Replies View Related

Programming :: Template Algorithm For Std::vector And Std::string?

Sep 8, 2010

I have two functions:

Quote:

void func1(std::string &s)
{
s.clear();
}

[code]....

Is there a way to create one template function for both vector and string that would clear them?

View 4 Replies View Related

Programming :: Simulate Key Strokes Events In Other Processes In System?

Feb 3, 2011

I have a program that receive user input.
I want to run this program automatically without user interaction, and in order to do that I need to simulate key events.
How can I do such a thing?

The program I am running is partly java and partly shell.

The shell part is easily done by using:
./prog.sh <parameters (Parameters being a file containing parameters)
But the java doesn't work similarly.

View 7 Replies View Related

Software :: Simulate A Wireless Network Where All Nodes Broadcast Packets?

Apr 7, 2011

I want to simulate a wireless network where all nodes broadcast packets

View 3 Replies View Related

Programming :: Algorithm For Finding The Shortest Path Between Geocoordinates?

Jun 27, 2011

AStar works on the basis of straight lines, AFAIK. In my case, we have geocoordinates and I can get the straight line distance between the waypoints. But I am wondering how approximate will the route calculated on this basis be? The actual distance "by road", which actually matters can be different.

Example. Assuming A and B are on the same plane, and will be equidistant from the goal point, if we consider a straight line between A and the goal point and, B and the goal point. The distance "by road" between A and the goal point may be greater or lesser than B. But because the AStar works on the basis of straight lines, it will return both the routes as the shortest. If yes, then which algo should be considered , if we want the results on the basis of actual distance in Km/m?

View 1 Replies View Related

Programming :: Encryption And Decryption Program In Java And Using RSA Algorithm?

Feb 25, 2011

i need a program for Encryption and Decryption using RSA algorithm in JAVA ..

View 9 Replies View Related

Programming :: Fixed Base Windowing Exponentiation Algorithm?

May 2, 2009

i try to understand this algorithm but i cann't. [URL] I encounter problem understand the algorithm of fixed base windowing exponentiation algorithm ? What is fixed base in the first place ? How this algorithm works ?

View 5 Replies View Related

OpenSUSE Network :: Persist TCP Congestion Control Algorithm Change?

Jan 27, 2011

OpenSuSE 11.3 (but this is not likely a distro specific issue)Kernel 2.6.34.7, but likely applies to a number of previousAm close to launching a more extensive webpage describing in detail why and how this configuration is important, but I'm missing up to date information on how to persist the config. By default, changing the TCP Congestion Control algorithm only modifies the current system session. Docs I've read recommend that the command resetting the algorithm be written to Code:/etc/rc.d/rc.dAm confused with all the different config files, but I suspect either an existing file should be modified or an additional file should be modified in

Code:
/etc/rc.d/rc5.d/
Question:

[code]....

View 9 Replies View Related

Programming :: Algorithm - File System Block Number For Immediate Read

May 20, 2010

algorithm:breada
input: file system block number for immediate read
file system block number for asynchronous read
output:buffer containing data for immediate read {
if(first block not in cache) {
get buffer for first block
if(buffer data not valid)
initiate disk read }
if(second block not in cache) {
get buffer for second block)
if(buffer data valid) //line 1
release buffer else
initiate disk read //line 2 }
if(first block was originally in cache) //line 3 {
read first block
return buffer }
sleep (event first buffer contains valid data)
return buffer }

Here is an algorithm for block read algorithm. I have problem in
line 1: If buffer data is valid why is it releasing the buffer?
line 2: If buffer data valid why is it initiating disk read. It should have read directly from buffer?
line 3: It should be the first condition as if it is there in cache then it should return it without delay?

View 5 Replies View Related

Programming :: C Language Data Structure/ Algorithm Info Requested

Apr 2, 2010

Does anyone know of a C Language Data Structure Tutorial? I have not been able to find anything much to speak of myself.

View 4 Replies View Related

Programming :: Processor Priority Level For Algorithm For Buffer Allocation

Jan 9, 2010

The algorithm for reading and writing disk blocks use the algorithm getblk to allocate buffers from the pool. In the algorithm getblk, if the kernel removes a buffer from the free list, it must raise the processor priority level to block out interrupts before checking the free list. Why ?Where can i find the C implementation of the above algorithm for buffer allocation in the linux source code ?

View 1 Replies View Related

General :: Open And Run Pivot Stick Figure Animator?

Dec 14, 2010

open and run pivot stick figure animator?

View 1 Replies View Related

Fedora :: How To Simulate A Webcam

Mar 27, 2010

I do not have a webcam yet, but would like to set certain video files I have to be played as my 'streaming video content' from a 'virtual' webcam.

View 6 Replies View Related

Fedora :: New Update - Could Not Do Simulate

Jun 26, 2010

Could not do simulate: nautilus-sendto-2.28.4-1.fc13.i686 requires libedataserver-1.2.so.11
gnome-panel-2.30.0-1.fc13.i686 requires libedataserver-1.2.so.11
empathy-2.30.1.1-1.fc13.i686 requires libedataserver-1.2.so.11 : Success - empty transaction

View 14 Replies View Related

Fedora :: Add / Remove Software - Could Not Do Simulate

Sep 2, 2010

How to get rid of the following error I've been receiving from Yum. I'm fairly new to Fedora. The following message appears when Add/Remove Software is launched. It also pops up periodically in the notification window.

could not do simulate: Traceback (most recent call last):
File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 3270, in __init__
self.repos.confirm_func = self._repo_gpg_confirm
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 823, in <lambda>
repos = property(fget=lambda self: self._getRepos(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 551, in _getRepos
prerepoconf = self.prerepoconf
AttributeError: 'PackageKitYumBase' object has no attribute 'prerepoconf'

View 1 Replies View Related

Networking :: Simulate Mobile Agents With NS2?

Jan 7, 2011

how to simulate mobile agents with NS2 (docs , code ......)

View 2 Replies View Related

Software :: Simulate Serial Device With Pty's ?

Sep 21, 2009

I wrote software which access and reads a serial device. I would like to test this software on my computer without loop-wiring or without a second computer.

How could I use pty's to simulate a serial device?

Actually I would like to temporary replace the /dev/ttyS1 file by one end of the pty. How could I do this? Is there a command to create a pty pair?

View 4 Replies View Related

Debian Multimedia :: How To Simulate The Enter Key In X Windows

Dec 16, 2014

When I drink tea, the water splashed on my keyboard. It didn't cause any problems until a few mins ago. Now my Enter and right hand side shift key don't function any more (The new line in this text is copied from other thread).

So I would like to know how can I simulate an enter key press so that e.g. a command can be executed in terminal. Because I have some source code uncommitted, I want them at least get committed first.

View 2 Replies View Related

Fedora Servers :: Simulate A VH Through A Localhost With A Dynamic IP?

Nov 16, 2010

For backup and pre-functionality purposes, I need to simulate a VirtualHost in my Fedora (14) machine. I found some interesting links to carry out that process but with an IP fix.So, how can I simulate a VH through a localhost with a dynamic IP?

View 2 Replies View Related

General :: Simulate Ack By Using Grep With The Right Combination Of Options?

Aug 25, 2011

I have ack-grep installed on my local machine, and find it indispensable for quickly 'acking' through a codebase when debugging. However, on my cheap shared hosting, there is no ack-grep. One of the testimonials on betterthangrep.com mentions a

Rube Goldberg mess of find/grep/xargs which sounds like what I need, but coming from the opposite direction.

View 2 Replies View Related

Ubuntu :: Simulate Bad Block Or Sector On Drive?

Feb 15, 2010

I want to simulate a bad block or sector on a drive or even a virtual drive image to test my data recovery distro. I wish I would have bookmarked when I read about it before. It was some type of low level command, I remember something about scsi subsystem or kernel thingabob.

View 3 Replies View Related

Ubuntu :: Simulate Keypress Via Keyboard Shortcut?

Feb 21, 2011

I have a G15v1. After going through hoops and loops to get it working only to discover that you only needed to install g15daemon through the Ubuntu Software Center, I found myself with one big problem. I migrated from windows just now, and there, I had my macro keys(the extra ones) bound to CTRL+W, CTRL+T and to a simulated mouse-wheel scroll so I could navigate the web more easily. How would I go about doing that? I figured, if I used the System->Preferences->Keyboard Shortcuts thingy and bound my key, in my case XF86Launch5, to a command similar to "simulate keypress CTRL+W"(I know it's totally wrong, just to give you an idea), I might be able to get it working again. Only problem is, I can't find anything like that. Any of you has any clue about it? I googled but I only find C++/Java/coding related results, which are not exactly what I need to do.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved