Programming :: Regarding The 16 Bit Enumeration In C Lang?

Mar 22, 2011

enum argu {
send = 0x0001
, receive = 0x0002
};

what is the meaning of the 0x0001 and 2.

View 8 Replies


ADVERTISEMENT

Programming :: Implementing Hamming Code In C Lang?

Sep 12, 2010

implementing hamming code in c: Calculating the Hamming Code The key to the Hamming Code is the use of extra parity bits to allow the identification of a single error. Create the code word as follows:

Mark all bit positions that are powers of two as parity bits. (positions 1, 2, 4, 8, 16, 32, 64, etc.)
All other bit positions are for the data to be encoded. (positions 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, etc.)

[code]....

View 2 Replies View Related

Programming :: Making Dynamic Memory As 64kB Aligned In C Lang?

Aug 17, 2010

I doing malloc and getting the chunk of dynamic memory. Now I want it to align that memory to 64KB. This means that the address of the memory starts from 64KB or multiple of 64KB.

View 3 Replies View Related

Programming :: Replacing The File In .Jar - Java.lang.NoClassDefFoundError Exception At Main Class

Jul 21, 2010

working on a script to update .Jar file, I have tried jar xf to unpack and jar cf to repack it is giving me java.lang.NoClassDefFoundError exception at main class. I also tried jar uf, which is also not working for me Basically my jar file requires to update date, which i do from "winrar" Manual it works fine, but now to remove "Donkey work", i want to make an script which does this all automatically, and the last stage is to update jar file which is not happening.

View 1 Replies View Related

Ubuntu Installation :: How To Change Drive Enumeration Order

Apr 12, 2011

I am installing Ubuntu Server 10.04 LTS on a new server that has 21 hard drives. My OS/boot drive is plugged into a SATA port on the motherboard, and the other 20 drives are plugged into cheap 4 port SATA adapter cards plugged into the PCIe slots on the motherboard.

When I first get to the part of the installer where I set up partitions and such, it is enumerating my disks in a somewhat weird order. The first 4 disks sda, sdb, sdc and sdd are disks connected to one of the SATA controllers, then sde is my smaller OS disk. Is there any way to force the small OS disk to be sda before I continue setting up my RAID? It's not a huge deal, but I'd like to have the system drive be sda, as it is in all my other systems. This is the 3rd system I've built like this, but it's the first time I've run into this issue (newer motherboard than the last one).

If possible I'd like to use the menu system in the installer to setup the RAID, as typing all those disk names manually into an mdadm config manually is going to be a huge pain. That precludes me from just unplugging the extra drives until after I get the base OS installed and working.

View 1 Replies View Related

CentOS 5 Networking :: Reboots Causes Unpredictable Enumeration Of Ethernet Drivers Causes Eth0 To Be Random?

Mar 20, 2009

I have several systems experiencing this issue, but the "worst case" system at the moment is a system where there are 2 dual-port PCI-X e1000 cards, and two on-board e1000e PCI-express card.What happens is maddening. If the /etc/sysconfig/hwconf is removed, and kudzu is not run, and the 6 interfaces each have a corresponding script:

/etc/sysconfig/network-script/ifcfg-eth0
/etc/sysconfig/network-script/ifcfg-eth1
/etc/sysconfig/network-script/ifcfg-eth2[code]...

Now what happens defies explanation. The only way I can be sure to make the e1000e first-listed-in-pci-order e1000e device always eth0 is to remake the initrd and add e1000e to the initrd.If I do not do that, eth0 might be the onboard night, it can also be the first port on either of the dual port cards.So eth0, eth2 and eth4 all take turns being eth0. This was not an issue in the EL-5.1 timeframe. This is certainly new to the EL-5.2 timeframe and thus far is not possible to control because the system does not load eth0's driver alias in order, and the enumeration of the PCI devices causes what seems to be random labeling of the first interface.

This is a particular problem in that identical hardware systems will come up with different eth0 interfaces , and on a single system, without the /etc/sysconfig/hwconf (which calls "eth0" something different from what was originally in the /etc/sysconfig/network-scripts/ifcfg-eth0 HWADDR directive).I need as little auto-magic as possible, I can live with PCI-bus order and driver load order is the order ethernet devices appear in, I cannot use the software in a state where what is "eth0" is randomly determined and the only way I can nail it down is to run kudzu, generate a hwconf AND brand the network interfaces in the network-scripts with HWADDR. I've been using EL since 6.2 and this is the first time I've ever encountered a situation where the enumeration rules (which are ancient at this point) over-ridden by something.

Version-Release number of selected component (if applicable): EL-5.2 series.The random enumeration of PCI devices and the subsequent assigning of eth0 to a random NIC is not on every reboot, and does not seem tied to a power off scenario vs a simple reset or warm reboot. Over the course of 0 reboots , eth0 should have moved between 2-3 times.Packages that seem relevant.

View 19 Replies View Related

Ubuntu :: LANG Variable Keeps Getting Overruled In 11.04?

May 3, 2011

ince Ubuntu 11.04 the "LANG" environment variable keeps getting overruled somewhere. The result is that the date notation in the indicator area and the GRUB boot menu is in a different language compared to the rest.At login I have selected the language en_GB, the same language is at the top in the "Language support" dialog. However, I have set my "Regional format" to "nl_NL".When I check "env" in the terminal LANG is set to "nl_NL" as well.I tried forcing it to "en_GB" by adding "LANG=en_GB" in "/etc/environment" but this did not help.

View 6 Replies View Related

Ubuntu Servers :: Write Php Lang In Nano?

Jul 8, 2010

I have been install LAMP ok. ware i want to write php lang in nano , vi or vim. how to host the website

View 1 Replies View Related

General :: Created On Making C Programing Lang?

Feb 11, 2011

problem created on making c programing lang.

View 1 Replies View Related

OpenSUSE Install :: Difference Between Addon-lang.iso And Livecd.iso?

Oct 16, 2010

openSUSE-11.3-Addon-Lang-i586.iso and openSUSE-11.3-GNOME-LiveCD-i686.iso

Index of /distribution/11.3/iso

And what is openSUSE-11.3-Addon-NonOss-BiArch-i586-x86_64.iso ?

View 1 Replies View Related

Software :: Firefox Java.lang.SecurityException Error?

Jan 14, 2010

I use Fedora 10.When I use Firefox , the following message appear with the dialog box.java.lang.SecurityException:Changing the SecurityManager is not allowed.:I click OK button.How can I do for it.

View 1 Replies View Related

OpenSUSE Install :: Bundle-lang-gnome 2233 Update Fails?

Jun 26, 2010

The automatic updater cannot install bundle-lang-gnome 2233: "A protected system package cannot be removed" ("Ein geschtztes System-Paket kann nicht entfernt werden.")Detail info: "Subprocess failed. Error: RPM failed: error: package bundle-lang-gnome-extras-de-11.2-19.21.1.noarch is not installed"

View 1 Replies View Related

OpenSUSE :: Java App Error: "java.lang.NullPointerException"

Feb 23, 2011

i try to open a java app, the launch proceeds as far as the final stages, but then stops to do the final sequences showing the error msg listed above.

View 3 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







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