Programming :: Data Structures Using STL?

May 19, 2010

Anyone know some links where i can find about data structures using STL ?

View 4 Replies


ADVERTISEMENT

Programming :: JNI - How To Pass STL Structures

Jun 17, 2011

I hace some code C/C++ STL, which i need to use for android, using SDK-NDK-JNI.my problem is that i need to pass some STL structures across JNI, I can't pack/unpack data into basic types or arrays of basic types, doing my own simple streaming between the two layers.My application need to pass a pointer to a STL structure which is updated by eachuser interaction wonder if it is possible using NDK-JNI ?Other option is "native activity" but it also needs JNI in some way ... and passing the STL structures wille a requirement, yet.I only can package data into an own streaming if there is a second (concurrent) application running (implementing the STLfunctionality). Is it possible ?

View 1 Replies View Related

Programming :: Structures And String Arrays, C?

Apr 18, 2011

I am working on a project that needs to use structures and I'm pretty sure string arrays. First I declare my structures and they must be exactly like this.

typedef struct
{
int hour;

[code]....

View 4 Replies View Related

Programming :: Running Commands In Control Structures?

Apr 25, 2011

how to run a linux commands in shell programming using control structures.

View 1 Replies View Related

Programming :: C++: Assignment Operator Copy All The Members Also For Structures Containing STL Objects?

Sep 26, 2010

does the assignment operator copy all the members also for structures containing STL objects strings,vectors,vectors of vectors...)? I did try it on my platform,and it works that way (copying all the fields),but i was wondering if it is a standard behavior or not.

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

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

CentOS 5 :: Kernel Debugging (structures) At Runtime

Dec 3, 2009

I'm trying to do some kenel debugging (at runtime). For very basic debugging, I've inserted some printk() statements in my customized kernel source. Now I would like to do a full-dump of some data structures (struct sk_buff, ...) in different functions (e.g. netif_rx(), ip_rcv(), __udp4_lib_rcv(), ...), and what kind of locks are required to prevent "overlapping" of dumped data)?

View 1 Replies View Related

Ubuntu :: Unable To Access File Structures After Update

Jul 16, 2010

I just ran the update manager and am now unable to access any of my files. Additionally I can not run the software center or run apt-get from the terminal. Luckily my web browsers and email client are still working.

I first ran the update a few days ago, but for some reason, about 30 or so packages wouldn't download, so update manager installed all but those ~30 packages. Afterwards everything seemed fine, except the clock was broken on my desktop, which corrected itself after two reboots.

Since that time the only major change I've made to the system is to rollback my version of gcc to 4.3.0 from 4.4.3. This was done in hopes that the older version of gcc would read a header file in some software I need to get installed (apparently ubuntu doesn't like locale.h). However, doing so did help.

Today when I got into work I thought I would see if I couldn't finish the update before trying some different versions of gcc, so I ran the update manager again. This time it downloaded the remaining ~30 packages and installed them, no problem. It wasn't until I ran apt-get that I noticed that all the icons on my desktop had disappeared.

below is the error I get from running apt-get

Code:
chris@chris-laptop:~$ sudo apt-get install build-essential
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libapt-pkg-libc6.10-6.so.4.8)

View 7 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 :: C++: Getting And Handling Web Data?

Jan 29, 2010

I'm just starting out on a project relating to web search, to be done in C++. Which library should I use to help with downloading web pages into memory so that I can process them? The big thing is I want to be able to download the pages into variables/structures without actually putting them onto the hard disk.I googled and saw libcurl, but I was confused by some of the examples and wondering if this was really what I wanted.

View 2 Replies View Related

Programming :: Get The Data From A Tag In XML File?

Dec 3, 2008

have a tag in XML file in unix like this <EmailAddress>abc@gmail.com</EmailAddress> this tag is there for multiple times in the xml file and the data is in continuous line like below State>UN</State><Zip/><CompanyName/><EmailAddress>FDF@gmail.COM</EmailAddress><PromoType>UNKNOWN</PromoType></Promotion></PromotionList<State>UN</State><Zip/><CompanyName/><EmailAddress>zd4946@gmail.com</EmailAddress>I have to check the data in between bold tags is valid or not ... means have to check whether its a email address or not and have to find the length of the attribute means tag ...script is in kshsorry if its already asked...i checked but i didnt get Exatly matching result for my requirement

View 7 Replies View Related

Programming :: Passing Data Between Php And C

Aug 21, 2010

I'm trying to work out the best way to achieve the following.

1)php page that grabs data from a local database. (not a problem)

2)It then needs to send this data to a c program/service running on a remote server. (I probably need it to be able to handle 4+ million reocrds in an array)

3) The c service then needs to process the data and send it back to the initial php script that called it. i was hoping this could be in a an array like structure of some kind. 4)update the db with the results.

I was thinking of using gsoap to write a simple c soap service that php can communicate with. Would this be the right way of doing this or would something like sockets in php be a better way of sending this volume of data as an array or struct to linux c socket if thats even possible.

View 3 Replies View Related

Programming :: Read Data From A Socket?

Aug 24, 2010

I need to read data from a socket but it should be always listening because data arrives continuously .. I thought something like this would do it but it doesn't work .... I already set the socket options before

Code: char databuf[1024];
int datalen = sizeof(databuf);
if(read(sd, databuf, datalen) < 0)
{

[Code]....

View 9 Replies View Related

General :: Data Type In Programming?

Jun 14, 2010

I declared a variable as int data type which was a placeholder for a resulttatus (meaning, based on the result status that variable varies from 0/1/2/3. It can contain only these four values).data type is 4 byte integer in C#. But I can declare this variable as which represents a 1 byte integer. Since that variable contains only 1 or 2 or 3 or 4, declaring the variable asis wastage of memory space.Before declaring any variable we need to just think of the memory space needed for that variable, our requirement,

View 6 Replies View Related

Programming :: Access CD Audio Data?

May 13, 2011

I'm looking for a way to access the raw data on a CD.I have a small program that I'm using to play raw PCM data pushed into stdin.I'd assumed that I could just use:play-pcm < /dev/cdromBut this isn't producing any data.Will I need to do this programatically or is there a simple way for me to grab raw data from an audio cd in the same way I might do so for a data cd?

View 2 Replies View Related

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

Programming :: C++: Extracting Data From A NESTED STL Map?

Feb 8, 2011

Code for insertion of data:

Code:

#include <map>
#include <iostream>
int main ()

[code]....

I don't know how to fetch the data from the nested map here.

View 5 Replies View Related

Programming :: Communication Data Between Different Process

Nov 22, 2010

I would like to send struct data from process A to process B but I dont known what is the best way. I have read about IPC, but there are a lot of ways to do it.

View 2 Replies View Related

Programming :: Cut Column An Edit Data?

Mar 26, 2011

Mar 26 12:32:53 name sshd[3261]: 192.168.1.14Mar 27 12:42:53 name sshd[3262]: 192.168.1.14
how to make this data in output as:

"Mar 26 12:32:53","name","sshd","192.168.1.14"
"Mar 27 12:42:53","name","sshd","192.168.1.14"

View 6 Replies View Related

Programming :: Data Directory In Automake ?

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

Programming :: Data Transfer Between Threads?

Dec 14, 2010

In posix multi threading, how to send thread1 local data to thread2...?

View 3 Replies View Related

Programming :: Get Data Of A Windows System?

May 7, 2010

get data(like CPU Usage, Memory Usage) of a windows system through my Linux server.Because I want to monitor all the systems that are in my network. How to get data from a windows system into linux ?

View 8 Replies View Related

Programming :: Getting Table Data From Web Pages?

Jul 18, 2011

I am writing a program and I need to be able to grab data from web pages.The data I am looking for is on wiki pages with basic tables.A simple example would be like grabbing all of the episode data from a TV show of something similar.

View 5 Replies View Related

Programming :: Getting The Name Of The Process That Sent Data To A Pipe?

Feb 16, 2011

I am trying to automate some directory naming when we're manually running some scripts and are using tee to direct the output to a file (log). Right now this is what we do

Code:

./some_script.sh 2>&1 | tee /home/user/some_dir/logs/manual/some_script_20110216_1628.log

As a matter of laziness and keeping the log files consistently named, I'd like to create a function to pipe it to so that it's doing all the naming How I envision the command running

Code:

./some_script.sh 2>&1 | myfunc

And what the logfile name should look like (and in the right directory)

Code:

some_script_20110216-1628.log

I was thinking of adding a function to our profile to handle this. Just in testing I was trying to stream line right on the command line, but I'm having some difficulty in getting the name of the script that is pushing data over the pipe. Here is what I've tried

Code:

./some_script.sh 2>&1 | tee $(cd ../logs/manual; pwd)/$0_$(date +%Y%m%d)-$(date +%H%M).log

but that created a file named

"bash_20110216-1628.log"

View 3 Replies View Related

Programming :: How To Detect Compressible Data

Apr 13, 2011

I am working on a project that takes multiple blocks of memory that are no more than 1500 bytes in side and tries to compress them. Currently I just compress them and compare the old length to the new length. If the new length is smaller it copies the compressed data into the original datas memory space.The problem I have is when lots of these blocks of memory do not compress well its huge amounts of wasted CPU.

View 6 Replies View Related

Programming :: How To Create Bitmap From Raw Data In GTK?

Apr 3, 2010

The only API i have found for something like this is gdk_bitmap_create_from_data. But it requires XPM data, not raw. So, how can i make a bitmap from raw 'char[x*y/8]'?

View 3 Replies View Related

Programming :: Insert Data In A Nested STL Map?

Dec 13, 2010

Following is the declaration:

Code:
std :: map <QString, std :: vector <std :: pair <QString, QString> > > configFileDataVector; How should I insert data in it? All the examples which I have looked up in Google are of plain maps!

I tried this, but it failed:

[Code]...

View 4 Replies View Related

Programming :: Use Expect To Get Data From Telnet?

May 21, 2011

I'm trying to use expect to get data from telnet

Here's my code :

Code:
set equipment [lindex $argv 0]
set trunk [lindex $argv 1]
set fraction [lindex $argv 2]

[Code]....

so in bold letter not send in 1 line, but i want sent it to 1 line

View 2 Replies View Related

Programming :: Where To Rsync Rollback Data

Apr 14, 2011

I've been given an old rsync script to update some data files on a few different servers... I am trying to understand what directory on the server it gets it's files as the way it seems to refer to the data on the server is:
data_source='random-server.fqdominan.net::Firstlogic'
Not sure what the "::Firstlogic" part with the two :: means.

Here is the entire script:
Code:
#!/bin/sh
# Begin user-configurable options #
# Who can run this script
authorized_user='appdtools'
# From where we rsync the update data
data_source='random-server.fqdominan.net::Firstlogic'
# From where we rsync the rollback data
rollback_data_source='random-server.fqdominan.net::Firstlogic_rollback'
# Where updates will go
data_target='/Firstlogic/postware/dirs'
# How to do the rsync .....

# Here is where we do the "work".
splash# Check user and print warning
if [ "${rsync_test}" == "-n" ]; then
update_address_data# Test the monthly update
else
stop_address# Stop the address standardizer
update_address_data# Load the monthly update
clean_logs# Empty the old log files
start_address# Start the address standardizer
fi

I have not tested this script yet but evidentialy it used to work. I just need to find out where to stick the files on random-server.fqdomain.net to test it out. The server it points to no longer has the files on them...

View 2 Replies View Related







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