Programming :: Adding Different Data Types?

Jun 9, 2011

i am searching for a table that gives info about the result of operations (+ , - , * , /) on data types

i mean if we * int by another int, the result should be assign in long so no overflow happens.

something like that.

like what will be the result of mult unsigned int by signed it , is there tables for such operations.

View 6 Replies


ADVERTISEMENT

Programming :: Conflicting Type Declarations Between Sys/types.h And Linux/types.h

Sep 12, 2010

I'm trying to use "netlink" to get ip address of a Linux box. But the linux/types.h included from "linux/rtnetlink.h" introduced many conflicting type declarations with "sys/types.h".

#include <rtnetlink.h>
#include <sys/types.h>
#include <sys/socket.h>
int main (int argc, char *argv[])
{
return 0;
}

The program will demonstrate such type conflicts.

View 3 Replies View Related

Programming :: Volatile Sig_atomic_t Int Terminazione=0 - Error "two Or More Data Types In Declaration Specifier"

Jul 16, 2010

I need to have a global variable PHP Code: volatile sig_atomic_t int Terminazione=0; but I get the error error: two or more data types in declaration specifier even if I have included signal.h.

View 2 Replies View Related

Programming :: Adding Number And String To Each Line In Data File

Apr 10, 2010

I have a very large data file, with 3 numbers in each line, ex. 3 4 5 ; 6 7 8.I want to add two numbers (0 and 1) at the end of every line, and a string at the beginning of the line. Does anyone know a efficient way to do so?

View 7 Replies View Related

Software :: Setting Data Types In OpenOffice Calc?

Mar 3, 2010

you are using Calc to hold data, and you have a column of surnames. You enter True and it turns into TRUE: OO has decided you wanted a Boolean. Similarly, you enter a date as 12 Jan 09: it may appear in that format, but you can't search for Jan 09, only for 01/09. Is there any way one can set the data type of a cell as text, or prevent OO from carrying out unwanted type conversions? I suspect the answer will be no; I can't find anything in the pages, and I suspect the developers would say I should be using Base. Well, I don't want to use Base: I want my data displayed spread-sheet style There is a solution: to insert non-breaking spaces in dates and after words like "true", but it would be nice if the problem could be fixed just once.

View 5 Replies View Related

Server :: Technology For Detecting Types Of Traffic And Allowing To Run Multiple Types?

Apr 9, 2011

I would like port 80 to have a small daemon running on it that detects HTTP traffic and sends a small redirect response, and any other traffic begins streaming data from my VPN daemon. I was wondering if this has already been made, or any kind of technology for detecting types of traffic and allowing you to run multiple types of servers on the same port.

View 4 Replies View Related

Programming :: What Are Types Of API's?

Jul 15, 2010

What are the different types of API's in linux?How can we predict the kind of API we are using?And what are API layers related to?Are API's and system calls ,both are same?

View 5 Replies View Related

Programming :: Why Redefine Basic Types In C

Jun 24, 2010

I guess I'm just a noob, but I notice that some C libraries (and even some C++ ones) tend to redefine the basic types with their own naming convention.

For example, OpenGL redefines the basic types:
Code: from GL/gl.h
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef signed char GLbyte;
typedef short GLshort;
typedef int GLint;
[Code].....

View 3 Replies View Related

Programming :: Parser Symbols With Different Types

Nov 27, 2010

I decided to try making a programming language again after my last unsuccessful attempt, so now I figured how to write a good AST and it works great when the nodes are hard-coded into a test program. But to make a language out of it, I need a parser to build the tree according to an input file. I ran into a problem here:

YACC input file:
Code:
%{
#include "nodes/allnodes.h"
#include "Node.h"
int vars[26];
%}

%token SEMICOLON INTEGER VARIABLE IF WHILE DO OPAREN CPAREN OBRACE CBRACE
%right ASSIGN
%left NE
%left PLUS MINUS
%left TIMES DIVIDE
%% .....

As you might see, each nonterminal creates a Node* object and uses it as its value. The problem is that the literal tokens, however, don't return Node*'s and I don't know what to do. I would like to be able to convert literal tokens to nodes in the Lex file (which would avoid the problem), but the problem is with the assignment operator, which takes a Node* for the right-hand side and a variable name (not a Variable Node, because they just evaluate the the variable's value and you can't change the variable with them) for the left hand side.

View 14 Replies View Related

Programming :: Wrapping Around Functions With Different Return Types?

Feb 1, 2010

I have functions which return different data like: int, char*, double...

I also have a list of datatypes (INTEGER, TEXT, REAL...) which can be returned.

I need to map a datatype with function, which purpose is to return it. Therefore, when I determine a datatype, I would like to call the required function without doing switch all the time.

My idea is to have an array of structs like this:

Code:
struct type_func_map
{
int type;
void (*func_wrapper_int)(void); //void (*func_wrapper_text)(void); void (*func_wrapper_real)(void);
};

[Code].....

View 10 Replies View Related

Programming :: Keep Getting These Areatest2.c:46: Error: Conflicting Types For Error_area?

Feb 24, 2011

#define TRIP 6
#include <stdio.h>
char error_area(char area_code, char S, char M, char L,char N,char P, char K, char R, char

[code].....

View 2 Replies View Related

Programming :: Error: New Types May Not Be Defined In A Return Type?

Oct 12, 2010

The first line of this struct:

Code:
struct custom_int {
typedef int big_int;

[code]...

View 4 Replies View Related

Programming :: Find Sys/types.h File / Library Files?

Mar 24, 2009

can anyone provide me with the path where i can find the library files. stdio.h, sys/types.h.......

View 4 Replies View Related

Ubuntu :: Adding Data To A CD/DVD Already Containing Information?

May 13, 2011

I know that you can add data to disks already holding informationusing apps for windows without blanking the entire disk first. Unfortunately I haven't found a way to accomplish this with BraseroDisk Burner. Am I overlooking something, or do you have to use acompletely different application in order to do this in Ubuntu?

View 1 Replies View Related

Ubuntu :: Grsync - Filtering File Types / Getting Only Some File Types Getting Included And Not Others?

Sep 1, 2011

I'm using Grsync and I want to be able to plug in any drive into my laptop and run rsync on it to back up all the user documents on there to another external hdd and to exclude everything else. Working on the principle that user documents don't always appear where we'd expect I want rsync to look through the whole drive and filter what it backs up by file type. I am only having partial success, however.

I am using the 'filter' option in the 'additional options' box. I am using the command
Code:
filter='merge /home/tim/Desktop/filter'
and I am attaching the filter file I have written. (I have added the .txt extention to upload it).

I have tested this script on my home folder and here's what's going wrong. Rsync will copy the entire directory structure regardless of whether there are any files to be copied over in those directories. I am also getting only some file types getting included and not others. .odt and .ods files are copied, for instance, but not .doc or .rtf.

View 3 Replies View Related

Debian :: Adding Backup Data Crashed The System?

May 12, 2011

I installed a fresh version of squeeze, with kde, and it worked fine. After I untarred my backup /home and /etc, things came to a standstill. I got a final ERROR code after /home. After a restart I got a 'fix your system' warning requiring a Control-D, which I couldn't type. I had used tar -xzvpPf ...... If I had included a -w, which asks for confirmation before overwriting data, could I have prevented this problem.

View 1 Replies View Related

Programming :: Get Data From Serial Port Function Read() Blocks When Data Not Available?

Jun 11, 2009

I am using read() in c++ to get data from a serial port. However, if no data is available on the serial port the function blocks until dta arrives.Example code:

//------------------------------------------------------------
char m_readBuffer[255] = {0};
char* p_curChar = m_readBuffer;

[code]...

View 1 Replies View Related

OpenSUSE :: Adding - Mounting New Drive & Recovering Corrupt Data

Mar 4, 2010

I have a Hard Drive that has a corrupted file system and i have tried the usual MS Windows fixes, chkdsk and a number of recovery tools inc Dos recovery tools and failed.

The Drive is an MS Windows drive with an NTFS file system.

chkdsk scans and after several hours fixing numerous problems eventually gives up and fails to complete.

The directory "My Documents" contains several GB of data and displays that this is true. When trying to access the directory, access is denied because its corrupt. Using Windows and Dos recovery tools i can view the contents of the directory sometimes! but cannot copy out any of the data, the applications return messages saying no can do basically.

I would like to try to use Linux to recover the data.

Problem number one is i have never tried to add a hard drive to an existing Linux system before, how do i go about adding a new drive?

The 2nd problem is, is there a Linux application that i can use to attempt to repair and recover the corrupt data on this drive or more specifically in the "My Documents" directory.

View 7 Replies View Related

Ubuntu Multimedia :: Adding Data Files To A Multisession CD Using Brasero?

Jan 7, 2010

I tried the above using an existing multisession CD where data files were previously burned in a different pc using K3b. However, when the burning was completed successfully, the CD could not be read at all. I repeated the process with a blank CD choosing to leave it open in order to add more data later. All went well and the CD was readable but when I tried to add data to the same CD I got the message

Quote:

Appending new files to a multisession disc is not advised.

Already burnt files will be invisible (though still readable). Do you want to continue anyway?

I opted not to continue despite the temptation to see how invisible files can be read.

To sum it up, I find this turn of events absolutely appalling given that Brasero is the default software for CD burning in my system (Xubuntu 9.10). Can anyone tell me how to resolve this glaring shortcoming of Brasero so as to keep all my data files easily accessible in multisession CDs?

View 3 Replies View Related

Programming :: Data Directory In Automake - Data Is Always Read-only ?

May 9, 2010

I have some data files that should be distributed with my program. Using dist_pkgdata_DATA in Makefile.am, I get these files installed to /usr/local/data/share/package-name. The problem is that data is read-only, and my program needs to modify it. Playing with dist_sharedstate_DATA, dist_localstate_DATA, dist-data_DATA varibles, I got different installation directories, like /usr/local/com, usr/local/var, but data is always read-only.

How can I distribute modifiable data files with my package? I need some common directory for all users, or maybe local data in a user directory.

View 1 Replies View Related

Ubuntu :: Safely Resize A Partition Like Adding The Extra Space Without Touching The Existing Data?

Jul 9, 2011

I have a BIG extended partition. It's at about 750Gb. Aside from that, I have 2 unallocated spaces, one at 240Gb and one at 5Gb. I want to make one of my storage drives bigger, and so that I can take advantage of all the space I have. (Those 250Gb have been unused for ages. I want to use them for my growing libraries.) So I wonder: would it be safe to put these smaller "chunks" into the extended partition, and still have a working systen? I don't want to mess it all up.

Also, can I safely resize a partition, like adding the extra space, without touching the existing data? I'm not exactly sure how the resize/move function in GParted works. Will it wipe and extend or only extend it by adding it? It would be nice to have these questions answered. Also, if it's to any help, this is my partition table as of now:

[Code]....

As for the first entries, they're unallocated. They're the primary drives, but they don't exist. I'm actually considering to move my partitions out of the extended one, because I only have 3 partitions that I use and will ever use. But if the extended partition is not a problem, I will just keep it this way.

I'd imagine that I first extend the extended partition to consume the unallocated space, and then I move it all to the end of the partition, and then resize sda7 to consume it, and get a 750Gb partition. Can this be done without loss of data?

View 9 Replies View Related

Programming :: Object To Represent An Object Of Different Types?

Mar 1, 2010

Only ones I can think of seem overly complex, and I'm sure there is a simple solution I am overlooking. I have a class, it has a member who is an object. This object needs to be able to represent an object of different types.

[code]...

Where "surface" could be several different types, which will be set during execution. Hope this is clear enough. I have tried using templates but am getting "data member cannot be a member template". Either I have incorrect syntax, or am not implementing it right. another solution would have one class containing definitions of all possible shapes, But this would take up extra memory. Other solutions I thought of seem too round-about, and seems there is a simpler solution that I have overlooked.

View 8 Replies View Related

Programming :: Convert The String Data Type To Other Primitive Data Type?

Mar 4, 2011

I am trying to generic way to convert the string datatype to other primitive data type. To achieve, i used Template . But i getting error and couldn't resolve the issue and error reported is also clueless.

Code
====
#include <vector>
#include <iostream>
#include <string>

[Code].....

View 7 Replies View Related

Programming :: Adding Two Arrays?

Mar 1, 2010

I have a problem on a program,the problem take a very long time when i try to add two big arrays element by elementI know that matlab make adding vectors more faster than adding element by element but I don't know how!!!do any body knew how matlab make vectors operations more faster than element by element???I want to make my calculation more faster because the program is very big

View 8 Replies View Related

Programming :: Adding User Through The Script?

Jun 6, 2010

Im trying to create the following script...I want to create an interactive script that prompts the user for the following:

user name
user home directory
user login shell
user comment

the script then needs to read those variables that are entered by the user and actually create the user account. and of course, would like the script to display what user account was just created so that i know in fact the script worked successful.

View 2 Replies View Related

Programming :: Adding Directory To The Path?

Apr 2, 2009

I have made the installation of Qt4 in my Fedora/MacBookPro. It also got a first compiling and running a simple program. The point is that for the compiler to run I need to point out every time where the bin is located, as that:

$ /home/threader/kinetic/bin/qmake -project

I have tried the following, but it still doesn't work:

# script
#-----------------------------------------------------------#
# /etc/bashrc or /home/threader/.bash_profile
# config to Qt compiler

[code]....

View 5 Replies View Related

Programming :: Adding Further Function On Sh Script?

Apr 10, 2010

I use following script:-

Code:

#!/bin/sh
# cd Linbread
TODAY=`date +"%m%d"`
DATA=`grep $TODAY linbread.dat`

[code]....

sound file .wav and background .gif are available. Please advise what shall I add to the script to do the job as expected.

View 1 Replies View Related

Programming :: Adding Gtk Libraries To Eclipse Using C

Jan 30, 2010

So I decided to take my first steps into programming with C + gtk. So far I have doneI loaded eclipse and ensured I had the cdt package Created a new C/C++ project called "play" Added a new source file called "Playfullsrc.c" Added the following to paths and symbols (output of the command: pkg-config --cflags gtk+-2.0)

Code:
/usr/include/gtk-2.0
/usr/lib/gtk-2.0/include
/usr/include/atk-1.0
/usr/include/cairo
/usr/include/pango-1.0
/usr/include/pixman-1
/usr/include/freetype2
[Code]....

added "/usr/lib/libgtk-x11-2.0.so" to GCC C Linker Libaries (I have cheacked and this file exists) When I build the project I get the error message "cannot find -l/usr/lib/libgtk-x11-2.0.soplayline 0C/C++ Problem" I have been following this tutorial: [URL]

View 2 Replies View Related

Programming :: Adding Third Colum And Normalizing?

Dec 18, 2010

I have a file for plotting contour graph in gnuplot.The data in the fine as below:Quote:

1 1 3
1 2 7
1 3 6

[code]....

View 9 Replies View Related

Programming :: Adding Mod-Perl And Using Apache ASP?

Sep 16, 2010

I have a debian lenny machine that I am trying to add mod_perl to and use apache asp on. I have had a range of failures on it. Is ther a way I can build apache2 with mod_perl in it? Instead of separate. Apache2 is built with some modules built in by default, how can I make mod_perl one of them?

View 1 Replies View Related







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