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


ADVERTISEMENT

Programming :: Bash Output With Timestamp Removing Duplicates

Nov 20, 2010

I'm writing a bash script to auto run on boot in Tinycore.

This is a watered down version.

Code:

I need it to either not add the time stamp if the awk finds a duplicate or write over the time with the new time if awk finds a duplicate.

BTW this is all pretty much cut-and-paste scripting so please feel free to comment if you know a more elegant way.

View 3 Replies View Related

Ubuntu :: Script For Removing Duplicates?

Oct 24, 2010

Although having used Ubuntu for a good couple of years, I'm still a total beginner when it comes to scripting. However, what I need to do should be fairly straightforward:

Importing images from my digital camera, both RAW "originals" and JPG "copies" end up in the same folder. I typically flip through the JPG:s in Image Viewer and remove those that I'm not interested in. Now, this leaves me with the tedious job of going though all the RAW files in the folder manually to get rid of those too! It sure would be wonderful to get Ubuntu to do the work for me...

The script would simply need to go though all the RAW files in a folder one by one, check for a corresponding JPG file - and if there isn't one, remove the RAW file. How could I accomplish that?

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

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

Programming :: Getting Current Time Zone Offset?

Jun 18, 2010

I'm looking for a function (prefer POSIX, but Linux specific would do if it has to) to get the current timezone offset. For my location, eastern USA, that should be -14400 when daylight time is in effect, and -18000 otherwise.

View 1 Replies View Related

Programming :: Calculate The Blade Offset In Python?

Dec 30, 2010

I'm using pyqt3 for my app and am lost on even how to attempt this task... On a vinyl cutter to have the blade pivot it must be offset from the center of the shaft it's on so say for example a .25mm offset would leave a .25mm unwanted vinyl attachment when the cutting is done. I somehow have to average or extrapolate that .25mm xy coordinate and add it to the hpgl plot file as a PUx,y; command? I have enclosed a simple sample file that has three images in it. In the corresponding hpgl file everything between the PU commands that are starting with PD are the code for that image (star for eg the pu to move to next image and then all PD for the next image and so on, so once the formula or procedure is figured out it can be applied to as many images there are in the file. Placing the new command at the head of each image PD group. Since there are absolute and relative cutters I enclosed the same exact plot for both types as the coordinates on relative can be negative numbers. Only PU and PD commands and a ";" as a command delimiter as sometimes many commands are on one line.The offset variable will come from a spinbox but .25 is good for an example.

View 14 Replies View Related

Programming :: Notice: Uninitialized String Offset: 1 In [PHP]?

Nov 8, 2010

This code is giving me the above said error, this code was written by me 2 years back, can't remember the cause of error at this moment, please help !

Code:
function remove_spaces($input,$i)
{

[code]....

View 8 Replies View Related

Programming :: Getting Weekend Out Duplicates From A List Of Servers?

Dec 26, 2010

I have a list of about 425 servers that are mostly redundant. I need to weed out the duplicate names so that I have a count of only the unique server hostnames. What is a good command to do this?

View 3 Replies View Related

Programming :: Getting An Undefined Offset For The Associative Arrays [28-46] In Format

Dec 8, 2010

i'm getting an undefined offset for the associative arrays [28-46] in this format.

[Code]....

i have read that i can prevent the notices by doing the following, but it's not working for me

PHP Code:

[Code]....

View 5 Replies View Related

Programming :: Bash: Combine Arrays & Delete Duplicates?

May 23, 2011

I would like to combine two arrays and delete duplicates that might occur. I tried to solve it like this:

Code:
combined=( "${results1[@]}" "${results2[@]}" )
printf "${combined[@]}" | sort -n | uniq
Example:
result1 (4 elements):

[Code]....

In my code printf seems to have a problem with elements that have the same letters but a space inbetween. For instance "new foo", "newfoo" are the same for printf

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 :: 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

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

Programming :: Removing Things From A List?

Jun 8, 2010

I am doing something for a class, and i have to list all the files in the users home directory, and i did a ls -F so the directories have a / after them but i don't know how to remove them because i just want the files not the directories

when I run the command i get
Desktop/
"file"

i need the Desktop/ to go away

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

Programming :: Bash Removing String From File?

Aug 7, 2010

I am trying to remove everything before my string code...

View 9 Replies View Related

Programming :: Removing Symbols From Binary Executable File

Aug 21, 2010

Arm-linux-strip for removing the symbols from binary executable file after compilation. What exactly the symbols means.

View 1 Replies View Related

Debian Multimedia :: Removing Epiphany Without Removing Half The System?

May 31, 2011

I know a bunch of commands and I am comfortable using the terminal, I even set a powerpc server but I can't figure out how to remove epiphany on this new computer I'm setting up. I didn't install anything with tasksel. I installed gnome and xorg afterwards... I load it up and 'startx' just fine. then I check around for the programs that were installed. I lik'em gimp, lot's of utilities. gedit. anyway I find epiphany, which I have already established that I dislike, I immediately go to the root terminal (another nice program that comes with gnome) and type apt-get remove epiphany-browser-data the output says it will be deleting gnome... however I have researched and found these are simpy meta packages that don't really matter.... however under the section that states all the packages that will be removed by autoremove there is a huge list... I doubt these packages are safe to remove. how to remove epiphany without removing a huge amount of probably needed software

View 14 Replies View Related

Ubuntu Installation :: Removing Evolution From Synaptic Vs Just Removing The Applet

Feb 27, 2011

what i did was, remove evolution mail from synaptic, what i wanted to do was just remove the indicator applet from the task bar. i read a bunch of bad stuff about removing evolution from synaptic vs just removing the applet.

im worried. did i break anything or put my security at risk. after, i used a command (older) (sudo apt-get install ubuntu-desktop)to install ubuntu desktop. because i thought that it would fix evolution. then i went to synaptic and installed a package called evolution. i rechecked evolution in applications menu. however, i notice that i have both a checkable evolution and two evolution icons. nothing 'seems' broken. im not sure if it ever was. and evolution calender pops up as normal, as does the the installed plain evolution. they both seems to be an exact copy of the other.

all i really wanted to do was remove the indicator applet. did i make a serious mistake. since ive had ubuntu, ive reformatted a lot because i was worried i made a mistake of some kind. however now im into the more "make a mistake and fix it stage' as im pretty happy with my current desktop and have worked hard to customize it. the command, sudo apt-get remove indicator-messages removed the mail icon. i still am worried that i broke something, or put my security at risk. also, now i have two mail icons. evolution mail and calendar, and another just called evolution.

View 1 Replies View Related

Fedora :: Removing Notifications And Safely Removing Drives?

Aug 25, 2010

These should be my last pleas for help with regard to Fedora 13. I've been unable to turn off the notifications that appear in the top right corner, despite a decent amount of searching on google. I can't remove any notifications package without removing a bunch of important software along with it. Also, F13 refuses to "Safely Remove" either of my external disks. I have to yank out the usb cord, touching wood each time.

View 5 Replies View Related

Programming :: Libxml2: Removing Output On Stdout/stderr - Element CA Does Not Carry Attribute Maxlength

Jul 26, 2010

I'm using libxml2 to handle/manipulate some XML files. In order to check the consistency of a XML file, I have a DTD and I'm using the xmlValidateDtd method to compute the check.

However, when an error occures during the check (for example an attribute is missing in a XML tag), then libxml2 writes the error on the stdout/stderr. For exemple:

Code:

/home/XML/FreeFour.xml:18: element CA: validity error : Element CA does not carry attribute maxlength

The method return the right result (true or false depending on the check result), but occurring errors are written on the stdout/stderr, and I actually don't want that.

View 4 Replies View Related

Programming :: Removing Left Recursion - Construct An AST From It By Executing A Piece Of Code For Every Nonterminal Matched?

Apr 7, 2011

I'm still a but confused about the standard way of removing it for left-associative operators: [URL] Especially about how to construct an AST from it by executing a peice of code for every nonterminal matched. And I'm still not totally convinced that it will be left-associative, I just barely understand it. Also, how would you remove left-recursion for something like this:

Code:
expr ::= expr "(" param_list ")"
| other stuff...?

View 8 Replies View Related

Server :: Ntp Offset Value Too High

May 19, 2011

i have a problem here whereby some 20 over servers in my network is having regular Offset values. The configured threshold is 55, but whenever it exceeds 55, i have alerts coming in. My questions are;

1)how do i find out what is causing the Offset value to be high?

2)i have workaround in mind, that is to create a cronjob to restart the ntp daily, or hourly - is this workaround an acceptable practice?

My main concern is to find out what is causing the frequent offset spike/increase. real example from my servers:

[Code]....

View 3 Replies View Related

Software :: Keep The Duplicates Not Remove Them

Jan 17, 2011

Open office Calc all the googles i can read all have removing the duplicates from the spreadsheet. I want to do the exact opposite. I want to keep the dupes and remove the others.

View 1 Replies View Related

Fedora :: Picture Offset To Right For 5 Mm On Screen

Jan 16, 2010

Problem: In Fedora 7 picture offset about 5 mm to righ on screen. I solved this with xvidtune and insert modeline in xorg.conf. In section Monitor..... I'm not sure. Why I can't use this trick in Fedora 12?

View 3 Replies View Related

OpenSUSE :: 11.2 - NTP Large Offset And Jitter

Oct 16, 2010

SuSE 11.2 = 2.6.31, ntpd 4.2.4p7. My offset and jitter are large compared to what I see on the internet. I have also been trying to use a GPS+PPS but that doesn't seem to matter one way or the other. They usually start out with offset and jitter in the single digits and drift / move to something like -400 and 80 over a couple of hours. I have tried various remedies under ntp.org like HZ=100, setting clocksource to tsc, hpet, or acpi_pm. I do not know what to do with acpi so i didn't test that. One of my systems has drift of < +-20 which is good. I have tried it on another identical system and also an 11.1 system. One of the systems is not behind my firewall. They do not run a firewall themselves or VM or pretty much anything as they are not being used.

I have used ntp.conf with/without 'prefer'. Here is a recent ntpq -p:
remote refid st t when poll reach delay offset jitter
xSHM(0) .GPS. 0 l 1 16 377 0.000 508.652 177.858
*SHM(1) .PPS. 0 l 3 16 377 0.000 81.463 13.790
+131.107.13.100 .ACTS. 1 u 1 64 373 55.209 107.670 19.061
+saturn.netwrx1. .PPS. 1 u 11 64 377 59.973 100.192 10.695
+tick.usask.ca .GPS. 1 u 9 64 377 81.503 97.608 10.434
-97.f7bed1.clien 192.5.41.40 2 u 58 64 377 39.804 104.353 11.306
+dev1-c.nym009.i 128.4.1.1 2 u 23 64 377 46.182 104.460 11.550
+ntp2.Rescomp.Be 128.32.206.54 2 u 15 64 377 77.153 92.867 14.428
+ds3-us.zagbot.c 204.9.54.119 2 u 35 64 377 38.797 96.360 9.053
+montblanc.arbor 208.66.175.36 2 u 26 64 377 34.713 93.690 14.534

Is there something wrong with 11.1 and 11.2 ?
Here is the ntp as run from /etc/init.d/ntp start (also with yast):
21238 ? Ss 0:00 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -i /var/lib/ntp -c /etc/ntp.conf

View 6 Replies View Related







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