Programming :: Theoretical Reduction Of O(n^3) To O(n) In Certain Cases

Jun 23, 2010

An arbitrary matrix can be solved using Gauss-Jordan elimination with O(n^3) complexity. A tridiagonal matrix (i.e. a special type of matrix) can be solved using Gauss-Jordan with O(n) complexity. That is, a for an arbitrary matrix, Gauss-Jordan is a cumbersome algorithm, but for a tridiagonal matrix, the algorithm can be expressed as a loop and a simple formula. If I were writing, for example, a compiler or some optimization program, is there a way to test the problem to see if it has become less complex, so I can express the algorithm more simply?

View 2 Replies


ADVERTISEMENT

Programming :: Theoretical Limit On Message Queue Sizes ?

Jun 4, 2010

Following function obtains the system-maintained structure for a message queue:

Code:

And following function simply resizes a message queue to a user-defined value, namely, "size":

Code:

My question is if there is a theoretical limit on user-defined message queue sizes.

To put in other words, is it possible to increase the default message queue size to any user-defined value as long as that certain value does not exceed the size of system's physical memory ?

I use 64-bit Ubuntu 9.04.

View 2 Replies View Related

Programming :: Do Not Miss Any Cases While Making The Test Case Doc?

Jul 28, 2010

Few months back I learnt a *few* concepts about bits/bytes and started writing a program for bit packing in C++. Now that program has grown upto 600 lines and I am still working on it. Yesterday I realized I missed some special cases due to which the program was malfunctioning. Now I have modified the program and it is working properly but I think If I would have designed all the possible test cases before writing the code, I would have finished the program long ago.

I. What is proper way to design the test cases before coding?

II. How should I make sure that I do not miss any cases while making the test case doc. ?

III. Does writing test cases prior to coding solve messy code issues or should I consider something else ?

View 8 Replies View Related

Ubuntu Multimedia :: Wmv,avi Etc Video Size Reduction?

Jan 4, 2011

is there software for ubuntu 10.10 along the lines of windoze movie maker, that is able to reduce a wmv etc from 50 mib to 5mib ?

View 6 Replies View Related

Ubuntu Servers :: Can't Get Near Theoretical Network Maximum Speed

Mar 10, 2010

With three 1.5TB, 7200RPM drives in RAID0, they thrash. And yet the network out, 4 gigabit ports LAG'd together to create a single 4 gigabit connection, can't even push a single gigabit a second.

Here's what I've done so far:

I've enabled jumbo frames on the bond: ifconfig bond0 mtu 9000

Tweaked SAMBA performance:

Tweaked hdparm:

I haven't enabled jumbo frames on the switch but I'm almost sure that won't help me much after trying all this.

I'm running out of ideas here guys. The clients connected are pulling down images in both Ghost and WIM (ImageX) format. Large files too, upwards of 12 gigabytes.

View 6 Replies View Related

Ubuntu Multimedia :: Ffmpeg : Avi To Mp4 - Syntax And Reduction In File Size?

Mar 14, 2011

I'm using a basic ffmpeg command to convert some avis into mp4 : file01.avi - 544x416, 368MB

Code:
$ ffmpeg -i file01.avi -vb 750k -s 432x336 file01.vb750.432x336.mp4

After conversion :
file01.vb750.432x336.mp4 - 432x336, 302Mb.

If I alter the output file dimensions to 352x272 I then get a file size of 301MB, which is just 1MB less than the file of dimensions 432x336 ? I had expected size to be 30-40MB lower. I do not want to compromise quality by reducing the bitrate to below 750 kb/s so how can I alter the ffmpeg command syntax to get a considerably smaller file size with video dimensions 352x272 ? I would like to use the default codecs and avoid x264 for the mean time.

View 9 Replies View Related

Debian :: Can't Disable Power Manager In Some Cases

Oct 25, 2010

I am having a weird problem where if I don't touch the mouse or keyboard after logging on, the power manager settings are being ignored. I disabled turning off the display and screen saver from the Gnome utilities, but after about 20 minutes my screen blanks and my wireless network connection gets disconnected. This is on an HTPC, so I'm usually not near the mouse or keyboard, and unfortunately button presses from the remote control don't count. Media players like MPlayer will prevent the screen from blanking, but if I'm listening to music (where the music is served over the network from another computer), this means that the screen will go blank and the music playback will freeze as the network connection is lost. If I touch the keyboard just after booting it doesn't blank the screen or disconnect my wireless, but when I forget it's very disruptive.

I am running Debian Testing (Squeeze) with a Gnome desktop environment. I'm using gdm3 to log in, but I have it set up to automatically log me on. (I use gdm on my desktop, also with Squeeze, with it configured to show login screen instead of automatically logging me on and it still displays that behavior) I have attempted the following to resolve this issue to no avail:

Disable DPMS for my screen and monitor in /etc/X11/Xorg.conf Set all the timeouts for blanking, power down, etc. to 0 in /etc/X11/Xorg.conf Flat out disabling the DPMS extension. (so it's still blanking, even if it's not actually turning on power saving mode) Putting "xset s off" in ~/.xinitrc Disabling powersave with setterm in ~/.xinitrc
Removing gnome-screensaver and gnome-power-manager from the startup items.

Edit: Actually, the wireless issue seems to not be related. It disconnected again, and after some searching with the error message I saw in dmesg, it looks like others have been having the same issue. It seems to have been coincidental that it was acting up when I was testing the screen blanking issue, and hasn't given me as much trouble lately, so it seemed like it was correlated.

View 3 Replies View Related

General :: IF Statement - Not Getting Equal Results From All Cases

Jun 6, 2011

I'm a bit stuck with IF statement. There is the code:
#!/bin/bash
# Variables
VAR1=test
VAR2="echo $VAR1"

# Case 1
echo Case 1
if [ test == test ]; then
echo "equal"
else
echo "not equal"
fi;
echo ""

# Case 2
echo Case 2
if [ "VAR1" == test ]; then
echo "equal"
else
echo "not equal"
fi;
echo ""

# Case 3
echo Case 3
if [ "VAR2" == test ]; then
echo "equal"
else
echo "not equal"
fi;
echo ""

When executed, why case "2" and "3" differs from case "1"? Where am I wrong and how to solve this trouble? (my aim is to get "equal" from all cases).

View 2 Replies View Related

Ubuntu Networking :: Wireless Won't Connect In Specific Cases?

Jan 6, 2011

Most of the time my wireless works very well, connecting lightning-fast on boot with AC power. However here are two problems that I have noticed to-date: 1. Wireless will not connect if I boot on battery power. It won't connect even if I plug in the AC cable and do a reboot. Only solution is to reset the router (unplug power cable, wait, plug power cable). 2. Wireless will not connect after a Suspend, whether battery power or AC. Again, only solution is to reset the router. Another computer, running Windows XP, do not have connection problems (yes, wireless). It is quite strange, maybe some power management settings are interfering with networking? I have both laptop-mode-tools and pm-utils (re-rolled) installed.

View 2 Replies View Related

Ubuntu Networking :: Use Cases For Static Ip Address For Clients Or Servers?

May 23, 2010

what are use cases for static ip address for clients or servers.

View 3 Replies View Related

OpenSUSE Multimedia :: Configure Suse To Send Audio To A Receiver In Some Cases?

Sep 10, 2010

I'm been struggling to find a way to configure suse to send audio to a receiver in some cases. Details: - Did a fresh install - Using an old SoundBlaster card (which worked in my previous version of openSuse) - I do have digital out, but only for Amarok (start menu -> configure desktop -> multimedia -> prefer "SB Live! Platinum [CT4760P], Multichannel Capture/PT Playback (IEC958 (S/PDIF) Digital Audio Output") and Kaffeine (.kde4/share/apps/kaffeine/xine-config -> set "audio.output.speaker_arrangement:Pass Through").
- I have analog sound on firefox and "test volume" on Administrator Settings -> Sound, but just can't find a way to configure those to digital passthrough (tried to copy "audio.output.speaker_arrangement:Pass Through" to .config/kde.org/Phonon-Xine.xine.conf but didn't work)

[Code]...

View 5 Replies View Related

Ubuntu :: Bashrc Script Occasionally Cases -bash - Too Many Arguments Error

Mar 24, 2011

I have a .bashrc script to shorten the length of my shell path and occasionally I get the error:

Code:

I've tracked it down to this line

Code:

But can't seem to find anything wrong with it.

View 2 Replies View Related

Programming :: 3D Programming - Difference Between JOGL And C++ OpenGL Programming?

Aug 27, 2010

I am interested in learning 3D programming. The thing is, I would hate to put too much effort to learn something that doesn't have future and is dying. My favorite language at the time is Java. My goal is professional programming.

So I have several questions:
1. Should I learn JOGL or start learning C++ and do C++ openGL programming?
2. Is there a big difference between JOGL and C++ openGL programming?
3. Is it worth to learn openGL? Does it have a future?
4. Is it a big difference between openGL and directX coding?
5. If choosing Java, then JOGL or LWJGL?

Why and what is the main difference between them?

View 4 Replies View Related

Programming :: Groovy Scripting - An Object-oriented Programming Language For The Java Platform ?

Mar 7, 2010

Groovy is an object-oriented programming language for the Java platform. I do not have experience in Java, only perl and shell scripts. Recently I have been asked to maintain a software written in groovy (also to make enhancements). So can I learn groovy without knowing java language. or isit I have to learn java before venturing into groovy.

View 1 Replies View Related

Programming :: Searching For Video Or Screen Cast Which Shows Device Driver Programming?

May 30, 2010

I did searched you tube but my results were not great.I have 2 books on KernelProgramming.I feel I need if some where I can get a video tutorial which can help me to understand how to develop a Linux Device driver that will be great.I had a look at Greg Kroah Hartmans video lecture of developing patches on ......I have been reading books and a lot of stuff.So I wish if I could get a video lecture that would be better

View 1 Replies View Related

Programming :: Timer In Socket Programming - Wait For X Sec After Read() And Then Disconnect The Client Connection

Mar 8, 2011

I have a server listening on incoming client connections. Once the client establishes SSL connection with the server, the server waits on read() from the client. Only Client can disconnect the connection. I want to have a timer in the server program to wait for x secs after read() and then disconnect the Client connection.

View 3 Replies View Related

Programming :: Totem Python Plugin Programming: Any Signal For Video Mouse Click?

Feb 9, 2011

I want that I click with the mouse on the video, it paused.I notice that there is "BaconVideoWidget" which I guess is the video rendering widget but it don't have signal named "clicked":

Code:
vd = totem_object.get_video_widget()
vd.connect("clicked", vd.hide)

[code]....

View 3 Replies View Related

Programming :: Socket And Timer Programming - Server Doesn't Execute Any Msg Which Client Sent

May 16, 2011

i have a server program which accept multiple client connection and am using polling. like every 2 secs it will look to client whether any data is received after it binded. i have used setitimer but there is runtime error i got.. the server accept all client connection but doesn't execute any msg which client sent.

#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netdb.h>
#include<unistd.h>
#include<pthread.h>
#include<string.h>
[Code]....

View 1 Replies View Related

Programming :: Headers From Richard Stevens Network Programming Book Not Installing

Oct 27, 2010

I am learning network programming via a book of Richard Stevens.The sample source codes are given here
http://www.unpbook.com/unpv13e.tar.gz
I downloaded and unzipped the file in /usr/src folder.As per the instructions given in README of downloaded archive I did.

View 5 Replies View Related

Programming :: Unix Programming - Single Thread Server Can Support Exactly 2 Clients At Once

Sep 28, 2010

A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit

View 4 Replies View Related

Programming :: Unable To Find Description Of Alsa's Programming Language

Dec 19, 2008

I am unable to find a description of alsa's programing language, this sort of stuff:

[Code]...

I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.

View 2 Replies View Related

Programming :: Choice Of Programming Solutions For Collated Document Repository?

Feb 18, 2011

We have documents on multiple workstations and want to collate them into a single repository to provide text search and download. So far we have implemented rsync to copy files from each workstation under a directory for each workstation on a server (incidentally providing a backup) and have set up text search using Xapian with Omega; users access it via a web browser. Still to do is to set up a system to copy files from each workstation's area on the server to the repository.

Many files are duplicated. In these cases we want to preserve the names but keep a single copy of the file;hard links can be used for that.For each file to be copied from a workstation's area into the collated area we need to check whether it is a duplicate (file size and, if same, MD5 sum) and if so, create a hard link to the original rather than create a copy.A system to detect and replace duplicates in the collated area has been written using ruby and postgresql but the developer cannot commit to continuing this work. It does mean we have a postgresql database populated with "fingerprints" of files in the collated area.My first priority is to get the system working; in the longer term whatever is developed must be maintainable; I do not yet know which language skills are available locally.

I am fluent in bash and competent with awk. Ruby looks nice but I have started to learn python and do think it prudent to learn both at the same time. Python's postgresql capabilities are not settled but may be fine for the simple usage required.What to do? A bash solution would run very slowly but could be developed quickly. Language knowledge aside, I have found it difficult to install ruby on the server (CentOS 5.5;installed rvm but "gem" still not installed; seems a very complex system with its own package management).

View 7 Replies View Related

Programming :: Socket Programming While Displaying Received Message In File

May 11, 2011

i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....

Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....

now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..

View 2 Replies View Related

Programming :: C++ Programming With Simple RTAI Functions Outputing Words?

Apr 11, 2011

I need help as I am not proficient with Linux C++ Programming. There are two parts which I need to do in the coding provided below.

1. Produce the program so it can output the word "Hey there!" and wait two minute and print the word "See you later!".

2. Produce the program that will output the text "Cool" every 20 seconds by setting a periodic task.

Quote:
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
int init_module(void)
{
printk("Hey there!

[Code]...

View 3 Replies View Related

Programming :: Programming Languages For Project Euler / Additional Ideas?

Jun 28, 2009

I've been working in the real world for a year making some money to go back and finish my masters, and now I'm coming to the end of my contract and am realising how little i remember and how small my scope has become; i basically do shell scripts and perl these days, and its making me uneasy. So instead of bitching about it , I'm going to endevor to complete Project Euler Using randomly generated programming languages for each problem, selected from

And post the fruits of my attempts at my blog (shameless plug) aswell as opening up my svn repository when I'm done. (altho i need to ask in another thread about svn permissions....)To my shame i havent ever touched C#, JavaScript, Ruby or Python, so all in all its going to be very interesting how much i screw up.Anyone have any additional ideas, or languages I'm missing or such? I was considering TCL or Haskell or Erlang at a strech, but i dont know how useful these three would be.

View 14 Replies View Related

Programming :: Use Socket Programming In Order To Implement Chatting Feature?

Aug 25, 2010

how to use socket programming in order to implement chatting feature

View 5 Replies View Related

Programming :: Termios Programming - Without Removing Carriage Return / Enter Key

Jun 30, 2010

I trying to write a UART(interfacing of serial devices) to linux machine but after I execute the following code to receive data I need to enter key (carriage return).... but I don't want to remove carriage return/enter key

[Code]....

View 13 Replies View Related

Programming :: Unix Programming - Single Process That Does Not Start Up Any Other Threads

Sep 28, 2010

i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.

View 3 Replies View Related

Programming :: Arrays In The C Programming Language Are Pointers To The First Element Of The Array?

Mar 27, 2010

I wonder why arrays in the C programming language are pointers to the first element of the array, not the first element of the array itself?

View 14 Replies View Related

Programming :: Design An Audio Chat Programming In Ubuntu

Apr 8, 2010

I want to design an audio chat programming in Ubuntu.So how shall I proceed? Any help on this please?I am complete novice in this topic. Currently my aim is to capture audio from microphone.

View 1 Replies View Related







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