General :: Kernel Programming - Convert Timespec To Datetime

Dec 29, 2010

I'm changing some syscalls functions into kernel 2.6.36.2

So i'm doing this :

Code:

But i have a output like this : Date 1293619251

How can i convert inode->i_atime into D:M:Y h:m Format?? or just simply D:M:Y

View 1 Replies


ADVERTISEMENT

General :: Simple Script To Convert Datetime Format To UTC Format?

Oct 9, 2009

just wondering is there a simple script to convert datetime to UTC format. I have been searching different forums but most answers are for converting UTC to datetime. For example what is a simple command/script to convert todays datetime to UTC format i.e. '2009-10-09 11:47:59'.

View 10 Replies View Related

Programming :: Formatting A Datetime String - In G++ ?

Jul 10, 2011

I copied and tested a piece of simple formatting a datetime string code from book, c++ cookbook, page 201, Chapter5 section2, Example5-4. but it wont compile in my g++ 4.5.2(on ubuntu 10.04, kernel2.6.35-25)

Example 5-4 formatting a datetime string

Using namespace std;

View 1 Replies View Related

Programming :: ImportError: No Module Named Mx.DateTime.ISO

Sep 9, 2010

In Python 2.6.5, I could import from mx.DateTime.ISO import ParseDateTimeUTC With 2.7 I cannot.Here is the error. My module util_lib contains the import noted above.

File "util_lib.py", line 46, in <module>
from mx.DateTime.ISO import ParseDateTimeUTC
ImportError: No module named mx.DateTime.ISO

What changes do I need to make, to import on pre-2.7 and 2.7?

View 2 Replies View Related

Programming :: Parsing Datetime Domain Names

Oct 25, 2010

I have spent lots of time trying to figure out how to parse the domain part of this file but am stuck.

How should this be approached:

Code:

Code:

The domains need to be parse at a maximum for 4 levels then the remainder will be put the last field.

View 3 Replies View Related

Programming :: Removing Duplicates With Offset - Datetime

Oct 20, 2010

I have a column of datetime entries which I sorted to removed duplicate entries.

I have still lots of entries which are adjacent to each other by 1 second.

How would I go about removing any entries which have an offset of the previous or after entry by 1 second?

Code:

View 5 Replies View Related

Programming :: Convert Macro Defined Functions From Kernel In Visual C++?

Jun 27, 2009

I am dealing with some Linux kernel code, which define most its functions with Macros.The trouble I am having is to use those code in user space in Windows.

For example, I have a function defined like this:

#define list_for_each_entry_safe(pos, n, head, member)
for (pos = list_entry((head)->next, typeid(*pos), member),
n = list_entry(pos->member.next, typeid(*pos), member);
&pos->member != (head);
pos = n, n = list_entry(n->member.next, typeid(*n), member))

And in user space code, I call it in this way:

list_for_each_entry_safe( pcre_item, tmp,
&(((pcre_list_head_t *)(hr.value))->head), list)
{
// My code to handle each element in the list
}

This is working like a charm in Linux, but I got errors in Windows:

It reminds me missing ';' after 'list_for_each_entry_safe( pcre_item, tmp,
&(((pcre_list_head_t *)(hr.value))->head), list)'.

Does this kind of linux code not working in Windows at all? (Linux is in GCC C stand and VC is ANSI C) I prefer not to convert them to normal functions but keep it the way if it could be working under windows by some tricks.

View 5 Replies View Related

Programming :: Match Datetime By The Minute (not An Exact Match By The Second)

Oct 21, 2010

I have the following query:

Code:
$sql="SELECT table1.datetime, table1.user_id, table2.ip, FROM table1,table2 WHERE id='$id' AND (table1.id = table2.id AND table1.datetime = table2.datetime)";

In table2 the datetime fields are about 1 to 2 seconds off due to the source of the data, which I cannot change.

Is it possible via a query match table1.datetime & table2.datetime by HH:MM (ie. to the minute instead of to the second)?

View 1 Replies View Related

Programming :: Datetime Format From MM-DD-YYYY HH:MM:SS To YYYY-MM-DD HH:MM:SS

Oct 13, 2010

I need to manipulate a column in a log file from the following format:

Prior to importing to a mysql database.

Unfortunately, I am not able to configure the device which is sending the logs to use the correct standard datetime format.

View 4 Replies View Related

Programming :: Convert The Int To A String Using Stringstream Then Convert The String To A Char?

Mar 26, 2011

Do I have the convert the int to a string using stringstream then convert the string to a char? or is there a more direct way?Also is there a way to tell the length of a int?

View 5 Replies View Related

General :: Using Convert From Imagemagick Package To Convert Multiple Jpg Files?

Jul 18, 2010

I'm trying to use convert, I have installed the imagemagick. I use this line:convert *.jpg test.pdf but I'm only able to convert to pdf 1 single jpg file, not multiple files at once. When there's more than one file, I get the following error: Segmentation fault

View 5 Replies View Related

Slackware :: Current: Perl 5.14.0 - DateTime

May 28, 2011

I updated to current, which includes perl 5.14.0. In updating to the latest DateTime module (0.70) via cpan, I receive this:

Code:

Lots of them. The same error occurs when 'make test'ing manually from the DateTime tarball. I see that DateTime 0.70 has been reported to be OK with 5.14.0 on linux (in fact, there are no fails for it). I uninstalled perl, removed all the perl5 directories, reinstalled it, upgraded all the default modules. DateTime still fails like this. Maybe current's perl has been compiled with different options?

View 14 Replies View Related

CentOS 5 :: Modifying Repo File To Convert Kernel

Jul 9, 2010

I am trying to convert from using the base centos kernel to centosplus kernel. I have modified the CentoOS-Base.repo file to do this, including ensuring that I have excluded the kernel kernel-devel etc from base and updates. However when I do a yum update there is nothing to update. I have noted that my current kernel is kernel-2.6.18-194.8.1 whereas the current centosplus kernel seems to be 2.6.18-194.3.1. I presume that the problem is that the plus kernel is not as recent as the base kernel. Is this correct? What is the best way of converting to the centosplus kernel in these circumstances?

View 2 Replies View Related

Ubuntu :: Command / Script To Rename Files In Datetime Order?

Jun 1, 2010

I'm trying to rename all files in a folder as such:

1.jpg
2.jpg
3.jpg

Renaming them is no problem, the problem I have is, they need to be in order of the datetime that they were taken, so that the 1.jpg would be the oldest file there. The difference in filetimes is going to be very small, around 3 or 4 tenths of a second.

The reason I need to do this is that I have another script (not quite finished yet), that takes the next three files in a loop and applies qtpfsgui to them to output an HDR image to another folder, then move on to 4,5 & 6, and: repeat.

View 9 Replies View Related

General :: Kernel Programming For BSD Or Linux?

Jul 20, 2010

I have recently been getting into kernel development and was wondering whether the Linux kernel or BSD kernel would be easiest for newbies (such as myself). Does anyone know? I am really considering BSD because it seems to me to have the best documentation.

View 2 Replies View Related

General :: Developing A Project In C Kernel Programming?

Mar 11, 2010

I am a Master's student.I am a newbie to Linux. I am interested in doing a term project in C kernel programming. I need help in developing a project in which I can use C kernel programming .

View 2 Replies View Related

Programming :: Convert Xls To Csv Using Php?

Apr 26, 2011

I want to load data into mysql database,I am having a xls file want to convert it into csv file to do it.I am running the script on apache server,was able to convert and I could see the output file,when I execute the php script in command line,but when I run it on the browser the file is not saved..??? .Whether something has to be configured on apache

View 1 Replies View Related

Programming :: Netlink Sockets In Kernel And Ethernet Driver - Kernel Crash

Aug 31, 2010

I write the network driver. Transmission of packets in user space I do through netlink socket`s. In user space there is a handling of packets and their transmission on other device (however, it isn't important).

Problem in that any time, packets through the driver in system, and is reverse, are transferred normally. But then there comes the moment when the kernel crash. If to look in syslog it seems to me that comes deadlock. Also I think that it is related with netlink socket`s.

I can't find the information on that anywhere how correctly to use netlink socket`s in kernel space. Can at you will any a reason into the account of synchronization of sockets and the driver in kernel space?

I can give the driver code if it is necessary.

View 2 Replies View Related

Programming :: Convert Map From Python 2.x To 3.x

Apr 6, 2010

I have an existing line of code from a P2 script that I cannot find a solution to converting to P3:

Code:
for i, x in map(None, list1, list2):
I have found the information about converting the simple case:
map(None,x) becomes list(x)

But my googling was unable to find a solution when more than one iterable exists.

View 2 Replies View Related

Programming :: Convert String To Int ?

Jul 6, 2010

Iam trying to check a value less than or equals 0.The value iam getting is after doing grep a file . but its throwing error .

Code:

When i execute this it throws

Code:

View 8 Replies View Related

Programming :: Convert Urb To Skbuff?

Nov 30, 2010

I am trying to write a kernel module which is the combination of the usb driver and a network driver, now whenever the data is recieved by the usb driver it will be in struct urb, but the data that is required by the net driver is sk_buff, now how do i convert a urb to sk_buff, i found something similar is being done in the phonet protocol, but i couldnt understand, howexactly this is being done. Can someone explain this code.

drivers/net/usb/cdc-phonet.c
Code:
static void rx_complete(struct urb *req)
{
struct net_device *dev = req->context;
struct usbpn_dev *pnd = netdev_priv(dev);

[Code]....

View 1 Replies View Related

Programming :: How To Convert DLL To SO File

Jul 27, 2010

I have the source code for the dll file, and I want to convert it to .so file.the dll file has declared some functions like this in the .c file
declspec (dllexport) etc.
I want to use this program in linux(open suse). How to do it? Is it through Wine? Then how to do it exactly.

View 1 Replies View Related

Programming :: Convert String To Int Array?

May 9, 2010

I've searched around and can't find out how to convert a string ( like "12345" ) into an int array ( x[ 5 ] = { 1, 2, 3, 4, 5 } ; ).

View 4 Replies View Related

Programming :: Convert Gigabyte To Byte?

Nov 24, 2010

I'm learning C and trying to write a program to convert gigabyte into byte. It will take 50% of the value given and then convert that value into byte. But the problem is the output goes into minus / negative value. Like, if I enter 22, I get output: -2147483648.

Code:

#include <stdio.h>
#include <math.h>
main (int argc, char* argv[])
{

[Code]....

View 5 Replies View Related

Programming :: Convert Awk Alternative In C Program?

Jan 14, 2010

I wrote a bash script a few months ago and now I want to convert it to a C program. However, i used awk a lot in my script, and I don't know what to use in place of awk. The awk calls are simple, like string splitting and math, but I don't know of any replacement for the string splitting function. Are there any C libraries that include some sort of string splitting function?

View 4 Replies View Related

Programming :: Convert Some .flac Files Into .mp3?

Jun 20, 2011

I need to convert some .flac files into .mp3.

I found this script:

#!/bin/bash
FLAC=$1
MP3="${FLAC%.flac}.mp3"
[ -r "$FLAC" ] || { echo can not read file "$FLAC" >&1 ; exit 1 ; } ;
metaflac --export-tags-to=- "$FLAC" | sed 's/=(.*)/="1"/' >tmp.tmp

[Code].....

And I need it to run it from outside of a directory for several directories.

I need to run it from /dir for /dir/dire*

View 4 Replies View Related

Programming :: Done To Convert Html Pages To Pdf ?

Jan 1, 2011

Im new to linux Iam pursuing bachelors in computer science engineering.... my final year project is to develop a "html to pdf converter using linux"... i have some basic knowledge of commands used in unix

1) Where can i get the basic idea about the existing converters... their pros and cons...
.... programming...

2) Any kind of material or source where i can get basic idea of programming used for converting html pages that are linked into a single pdf..

View 1 Replies View Related

Programming :: Convert Columns To Rows

Aug 10, 2009

I bet this is a Perl one-liner (or very simple python script).I have a tab separated files in which each row looks like:Unique_Eight_Character_Sequence [3 tabs] data1~moredata1~moredata1 [3 tabs] data2~ moredata2~ moredata2 ... dataN~.The output file should have each column converted into a row (with the unique character sequence copied in for the first column), and then each "~" replaced by a comma.

View 14 Replies View Related

Programming :: Convert From DD/MM/YYYY To YYYYMMDD?

Jun 6, 2011

How does one convert from DD/MM/YYYY to YYYYMMDD?

Code:
06/06/2011
06/06/2011

to

Code:
20110606
20110606

View 6 Replies View Related

Programming :: Convert String To Long ?

Jul 2, 2010

convert string to long ?

View 4 Replies View Related







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