Search Results

Search found 1082 results on 44 pages for 'eng al rawabdeh'.

Page 2/44 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • optimize query: get al votes from user's item

    - by Toni Michel Caubet
    hi there! i did it my way because i'm very bad getting results from two tables... Basically, first i get all the id items that correspond to the user, and then i calculate the ratings of each item. But, there is two different types of object item, so i do this 2 times: show you: function votos_usuario($id){ $previa = "SELECT id FROM preguntas WHERE id_usuario = '$id'"; $r_previo = mysql_query($previa); $ids_p = '0, '; while($items_previos = mysql_fetch_array($r_previo)){ $ids_p .= $items_previos['id'].", "; //echo "ids pregunta usuario: ".$items_previos['id']."<br>"; } $ids = substr($ids_p,0,-2); //echo $ids; $consulta = "SELECT valor FROM votos_pregunta WHERE id_pregunta IN ( $ids )"; //echo $consulta; $resultado = mysql_query($consulta); $votos_preguntas = 0; while($voto = mysql_fetch_array($resultado)){ $votos_preguntas = $votos_preguntas + $voto['valor']; } $previa_r = "SELECT id FROM recetas WHERE id_usuario = '$id'"; $r_previo_r = mysql_query($previa_r); $ids_r = '0, '; while($items_previos_r = mysql_fetch_array($r_previo_r)){ $ids_r .= $items_previos_r['id'].", "; //echo "ids pregunta usuario: ".$items_previos['id']."<br>"; } $ids = substr($ids_r,0,-2); $consulta_b = "SELECT valor FROM votos_receta WHERE id_receta IN ( $ids )"; //echo $consulta; $resultado_b = mysql_query($consulta_b); $votos_recetas = 0; while($voto_r = mysql_fetch_array($resultado_b)){ $votos_recetas = $votos_recetas + $voto_r['valor']; } $total = $votos_preguntas + $votos_recetas; return $total; } As you can si this is two much.. O(n^2) Feel like thinking? thanks!

    Read the article

  • Runtime error of TASM language help!

    - by dominoos
    .model small .stack 400h .data message db "hello. ", 0ah, 0dh, "$" firstdigit db ? seconddigit db ? thirddigit db ? number dw ? newnumber db ? anumber dw 0d bnumber dw 0d Firstn db 0ah, 0dh, "Enter first 3 digit number: ","$" secondn db 0ah, 0dh, "Enter second 3 digit number: ","$" messageB db 0ah, 0dh, "HCF of two number is: ","$" linebreaker db 0ah, 0dh, ' ', 0ah, 0dh, '$' .code Start: mov ax, @data ; establish access to the data segment mov ds, ax ; mov number, 0d mov dx, offset message ; print the string "yob choi 0648293" mov ah, 9h int 21h num: mov dx, offset Firstn ; print the string "put 1st 3 digit" mov ah, 9h int 21h ;run JMP FirstFirst ; jump to FirstFirst FirstFirst: ;first digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov firstdigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, doubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 100d ;This is so we can calculate 100*1st digit +10*2nd digit + 3rd digit mul cx ;start to accumulate the 3 digit number in the variable imul cx ;it is understood that the other operand is ax ; the result will use both dx::ax ;dx will contain only leading zeros add anumber, ax ;save ;Second Digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov seconddigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, boubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 10d ;continue to accumulate the 3 digit number in the variable mul cx ;it is understood that the other operand is ax, containing first digit ;the result will use both dx::ax ;dx will contain only leading zeros. add anumber, ax ;save ;third Digit mov ah, 1d ;samething as above int 21h ; mov thirddigit, al ; sub al, 30h ; cbw ; add anumber, ax ; jmp num2 ;go to checks Num2: mov dx, offset secondn ; print the string "put 2nd 3 digits" mov ah, 9h int 21h ;run JMP SecondSecond SecondSecond: ;first digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov firstdigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, doubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 100d ;This is so we can calculate 100*1st digit +10*2nd digit + 3rd digit mul cx ;start to accumulate the 3 digit number in the variable imul cx ;it is understood that the other operand is ax ; the result will use both dx::ax ;dx will contain only leading zeros add bnumber, ax ;save ;Second Digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov seconddigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, boubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 10d ;continue to accumulate the 3 digit number in the variable mul cx ;it is understood that the other operand is ax, containing first digit ;the result will use both dx::ax ;dx will contain only leading zeros. add bnumber, ax ;save ;third Digit mov ah, 1d ;samething as above int 21h ; mov thirddigit, al ; sub al, 30h ; cbw ; add bnumber, ax ; jmp compare ;go to compare compare: CMP ax, anumber ;comparing numbB and Number JA comp1 ;go to comp1 if anumber is bigger CMP ax, anumber ; JB comp2 ;go to comp2 if anumber is smaller CMP ax, anumber ; JE equal ;go to equal if two numbers are the same JMP compare ;go to compare (avioding error) comp1: SUB ax, anumber; subtract smaller number from bigger number JMP compare ; comp2: SUB anumber, ax; subtract smaller number from bigger number JMP compare ; equal: mov ah, 9d ;make linkbreak after the 2nd 3 digit number mov dx, offset linebreaker int 21h mov ah, 9d ;print "HCF of two number is:" mov dx, offset messageB int 21h mov ax,anumber ;copying 2nd number into ax add al,30h ; converting to ascii mov newnumber,al ; copying from low part of register into newnumb mov ah, 2d ;bios code for print a character mov dl, newnumber ;we had saved the ascii code here int 21h ;call to bios JMP exit; exit: mov ah, 4ch int 21h ;exit the program End hi, this is a program that finds highest common factor of 2 different 3digit number. if i put 200, 235,312 (low numbers) it works fine. but if i put 500, 550, 654(bigger number) the program crashes after the 2nd 3digit number is entered. can you help me to find out what problem is?

    Read the article

  • Multiple many-to-many JOINs in a single mysql query without Cartesian Product

    - by VWD
    At the moment I can get the results I need with two seperate SELECT statements SELECT COUNT(rl.refBiblioID) FROM biblioList bl LEFT JOIN refList rl ON bl.biblioID = rl.biblioID GROUP BY bl.biblioID SELECT GROUP_CONCAT( CONCAT_WS( ':', al.lastName, al.firstName ) ORDER BY al.authorID ) FROM biblioList bl LEFT JOIN biblio_author ba ON ba.biblioID = bl.biblioID JOIN authorList al ON al.authorID = ba.authorID GROUP BY bl.biblioID Combining them like this however SELECT GROUP_CONCAT( CONCAT_WS( ':', al.lastName, al.firstName ) ORDER BY al.authorID ), COUNT(rl.refBiblioID) FROM biblioList bl LEFT JOIN biblio_author ba ON ba.biblioID = bl.biblioID JOIN authorList al ON al.authorID = ba.authorID LEFT JOIN refList rl ON bl.biblioID = rl.biblioID GROUP BY bl.biblioID causes the author result column to have duplicate names. How can I get the desired results from one SELECT statement without using DISTINCT? With subqueries?

    Read the article

  • Appengine BulkExport via Batch File

    - by Chris M
    I've created a batch file to run a bulk export on appengine to a dated file @echo off FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B SET date=%yyyy%%mm%%dd% FOR /f "tokens=1" %%u IN ('TIME /t') DO SET t=%%u IF "%t:~1,1%"==":" SET t=0%t% @REM set timestr=%d:~6,4%%d:~3,2%%d:~0,2%%t:~0,2%%t:~3,2% set time=%t:~0,2%%t:~3,2% @echo on "c:\Program Files\Google\google_appengine\appcfg.py" download_data --config_file=E:\FEEDSYSTEMS\TRACKER\TRACKER\tracker-export.py --filename=%date%data_archive.csv --batch_size=100 --kind="SearchRec" ./TRACKER I cant work out how to get it to authenticate with google automatically; at the moment I get asked the user/pass everytime which means I have to run it manually. Any Ideas?

    Read the article

  • Secondary DHCP server won't start on Centos 6.2

    - by Slowjoe
    I'm trying to create a backup DHCP server. Server times are in sync. Primary server starts fine. Secondary server won't start. Error from /var/log/messages is: Sep 15 14:47:45 stream dhcpd: Copyright 2004-2010 Internet Systems Consortium. Sep 15 14:47:45 stream dhcpd: All rights reserved. Sep 15 14:47:45 stream dhcpd: For info, please visit https://www.isc.org/software/dhcp/ Sep 15 14:47:45 stream dhcpd: /etc/dhcp/dhcpd.conf line 25: invalid statement in peer declaration Sep 15 14:47:45 stream dhcpd: #011max-response-default Sep 15 14:47:45 stream dhcpd: ^ Sep 15 14:47:45 stream dhcpd: /etc/dhcp/dhcpd.conf line 41: failover peer dhcp-failover: not found Sep 15 14:47:45 stream dhcpd: failover peer "dhcp-failover" Sep 15 14:47:45 stream dhcpd: ^ Sep 15 14:47:45 stream dhcpd: /etc/dhcp/dhcpd.conf line 49: failover peer dhcp-failover: not found Sep 15 14:47:45 stream dhcpd: failover peer "dhcp-failover" Sep 15 14:47:45 stream dhcpd: ^ Sep 15 14:47:45 stream dhcpd: WARNING: Host declarations are global. They are not limited to the scope you declared them in. Sep 15 14:47:45 stream dhcpd: /etc/dhcp/dhcpd.conf line 70: failover peer dhcp-failover: not found Sep 15 14:47:45 stream dhcpd: failover peer "dhcp-failover" Sep 15 14:47:45 stream dhcpd: ^ Sep 15 14:47:45 stream dhcpd: /etc/dhcp/dhcpd.conf line 78: failover peer dhcp-failover: not found Sep 15 14:47:45 stream dhcpd: failover peer "dhcp-failover" Sep 15 14:47:45 stream dhcpd: ^ Sep 15 14:47:45 stream dhcpd: Configuration file errors encountered -- exiting Sep 15 14:47:45 stream dhcpd: Sep 15 14:47:45 stream dhcpd: This version of ISC DHCP is based on the release available Sep 15 14:47:45 stream dhcpd: on ftp.isc.org. Features have been added and other changes Sep 15 14:47:45 stream dhcpd: have been made to the base software release in order to make Sep 15 14:47:45 stream dhcpd: it work better with this distribution. Sep 15 14:47:45 stream dhcpd: Sep 15 14:47:45 stream dhcpd: Please report for this software via the CentOS Bugs Database: Sep 15 14:47:45 stream dhcpd: http://bugs.centos.org/ Sep 15 14:47:45 stream dhcpd: Sep 15 14:47:45 stream dhcpd: exiting. Config file contents: # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.sample # see 'man 5 dhcpd.conf' # option domain-name "eng.foo.com"; option domain-name-servers ns0.eng.foo.com, ns1.eng.foo.com; option ntp-servers ntp.eng.foo.com; #option time-servers ntp.eng.foo.com; default-lease-time 3600; max-lease-time 7200; authoritative; log-facility local7; failover peer "dhcp-failover" { secondary; address 10.0.1.70; port 647; peer address 10.0.1.11; peer port 647; max-response-default 30; max-unacked-updates 10; load balance max seconds 3; } # # Management subnet # subnet 10.0.0.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 10.0.0.255; option routers 10.0.0.1; option domain-search "eng.foo.com", "foo.com"; # Unknown clients get this pool pool { failover peer "dhcp-failover"; max-lease-time 300; range 10.0.0.240 10.0.0.249; allow unknown-clients; } # Known clients get this pool pool { failover peer "dhcp-failover"; max-lease-time 28800; range 10.0.0.150 10.0.0.199; deny unknown-clients; } include "/etc/dhcp/dhcpd.conf-engmgmt"; } # # Data subnet # subnet 10.0.1.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option broadcast-address 10.0.1.255; option routers 10.0.1.1; option domain-search "eng.foo.com", "foo.com"; # Unknown clients get this pool pool { failover peer "dhcp-failover"; max-lease-time 300; range 10.0.1.240 10.0.1.249; allow unknown-clients; } # Known clients get this pool pool { failover peer "dhcp-failover"; max-lease-time 28800; range 10.0.1.150 10.0.1.199; deny unknown-clients; } # For centos network installs if substring (option vendor-class-identifier, 0, 8) = "anaconda" { filename "/autohome/distro/ks/"; next-server eng-data.eng.foo.com; } # For PXE network installs if substring (option vendor-class-identifier, 0, 9) = "PXEClient" { filename "pxelinux.0"; next-server eng-data.eng.foo.com; } # For KVM PXE network installs if substring (option vendor-class-identifier, 0, 9) = "Etherboot" { filename "pxelinux.0"; next-server eng-data.eng.foo.com; } include "/etc/dhcp/dhcpd.conf-engdata"; }

    Read the article

  • Book Review: &ldquo;Inside Microsoft SQL Server 2008: T-SQL Querying&rdquo; by Itzik Ben-Gan et al

    - by Sam Abraham
    In the past few weeks, I have been reading “Inside Microsoft SQL Server 2008: T-SQL Querying” by Itzik Ben-Gan et al. In the next few lines, I will be providing a quick book review having finished reading this valuable resource on SQL Server 2008. In this book, the authors have targeted most of the common as well as advanced T-SQL Querying scenarios that one would use for development on a SQL Server database. Book content covered sufficient theory and practice to empower its readers to systematically write better performance-tuned queries. Chapter one introduced a quick refresher of the basics of query processing. Chapters 2 and 3 followed with a thorough coverage of applicable relational algebra concepts which set a good stage for chapter 4 to dive deep into query tuning. Chapter 4 has been my favorite chapter of the book as it provided nice illustrations of the internals of indexes, waits, statistics and query plans. I particularly appreciated the thorough explanation of execution plans which helped clarify some areas I may have not paid particular attention to in the past. The book continues to focus on SQL operators tackling a few in each chapter and covering their internal workings and the best practices to follow when used. Figures and illustrations have been particularly helpful in grasping advanced concepts covered therein. In conclusion, Inside Microsoft SQL Server 2008: T-SQL Querying provided me with 750+ pages of focused, advanced and practical knowledge that has added a few tips and tricks to my arsenal of query tuning strategies. Many thanks to the O’Reilly User Group Program and its support of our West Palm Beach Developers’ Group. --Sam Abraham

    Read the article

  • How do I add and/or keep subtitles when converting video?

    - by JoeSteiger
    I have a mkv video I want to convert to mp4, but every which way I try and convert it (Handbrake, WinFF, ffmpeg, mencoder,...I lose the video's subtitles. How can I convert the video,keeping the subtitles, or add a subtitles.srt? I also would like 2 pass encoding with a video bitrate of 4054 and audio bitrate of 160. Thanks. I was asked for the ffmpeg -i: joe@joe-Leopard-Extreme:/media/Elements/Home Folder/Videos$ ffmpeg -i iron.mkv ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers built on Jun 12 2012 16:52:09 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [matroska,webm @ 0x1a319a0] Estimating duration from bitrate, this may be inaccurate Input #0, matroska,webm, from 'iron.mkv': Metadata: title : Iron Duration: 02:06:01.67, start: 0.000000, bitrate: 1280 kb/s Chapter #0.0: start 0.000000, end 546.170622 Metadata: title : Chapter 00 Chapter #0.1: start 546.170622, end 1080.579489 Metadata: title : Chapter 01 Chapter #0.2: start 1080.579489, end 1609.941667 Metadata: title : Chapter 02 Chapter #0.3: start 1609.941667, end 2101.849733 Metadata: title : Chapter 03 Chapter #0.4: start 2101.849733, end 2595.259333 Metadata: title : Chapter 04 Chapter #0.5: start 2595.259333, end 3158.488667 Metadata: title : Chapter 05 Chapter #0.6: start 3158.488667, end 3564.644400 Metadata: title : Chapter 06 Chapter #0.7: start 3564.644400, end 4052.423356 Metadata: title : Chapter 07 Chapter #0.8: start 4052.423356, end 4304.300000 Metadata: title : Chapter 08 Chapter #0.9: start 4304.300000, end 4711.206489 Metadata: title : Chapter 09 Chapter #0.10: start 4711.206489, end 5080.575489 Metadata: title : Chapter 10 Chapter #0.11: start 5080.575489, end 5700.111067 Metadata: title : Chapter 11 Chapter #0.12: start 5700.111067, end 6269.346400 Metadata: title : Chapter 12 Chapter #0.13: start 6269.346400, end 6811.471333 Metadata: title : Chapter 13 Chapter #0.14: start 6811.471333, end 7561.679000 Metadata: title : Chapter 14 Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s (default) Metadata: title : 3/2+1 Stream #0.2(ita): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s Metadata: title : 3/2+1 Stream #0.3(eng): Subtitle: pgssub (default) Stream #0.4(eng): Subtitle: pgssub Stream #0.5(eng): Subtitle: pgssub Stream #0.6(eng): Subtitle: pgssub At least one output file must be specified joe@joe-Leopard-Extreme:/media/Elements/Home Folder/Videos

    Read the article

  • using Java interfaces

    - by mike_hornbeck
    I need to create interface MultiLingual, that allows to display object's data in different languages (not data itself, but introduction like "Author", "Title" etc.). Printed data looks like this : 3 grudnia 1998 10th of June 1924 Autor: Tolkien Tytul: LoTR Wydawnictwo: Amazon 2010 Author: Mitch Albom Title: Tuesdays with Morrie Publishing House: Time Warner Books 2003 37 360,45 PLN 5,850.70 GBP 3rd of December 1998 10th of June 1924 Author: Tolkien Title: LoTR Publishing House: Amazon 2010 Author: Mitch Albom Title: Tuesdays with Morrie Publishing House: Time Warner Books 2003 37,360.45 GBP 5,850.70 GBP Test code looks like this : public class Main { public static void main(String[] args){ MultiLingual gatecrasher[]={ new Data(3,12,1998), new Data(10,6,1924,MultiLingual.ENG), new Book("LoTR", "Tolkien", "Amazon", 2010), new Book("Tuesdays with Morrie", "Mitch Albom", "Time Warner Books",2003, MultiLingual.ENG), new Money(1232895/33.0,MultiLingual.PL), new Money(134566/23.0,MultiLingual.ENG), }; for(int i=0;i < gatecrasher.length;i++) System.out.println(gatecrasher[i]+"\n"); for(int i=0;i < gatecrasher.length;i++) System.out.println(gatecrasher[i].get(MultiLingual.ENG)+"\n"); } } So i need to introduce constants ENG, PL in MultiLingual interface, as well as method get(int language) : public interface MultiLingual { int ENG = 0; int PL= 1; String get(int lang); } And then I have class Book. Problem starts with the constructors. One of them needs to take MultiLingual.ENG as argument, but how to achieve that ? Is this the proper way? : class Book implements MultiLingual { private String title; private String publisher; private String author; public Book(String t, String a, String p, int y, MultiLingual lang){ } Or should I treat this MultiLingual.ENG as int variable , that will just change automatically constants in interface? Second constructor for book doesn't take MultLingual as argument, but following implementation is somehow wrong : public Book(String t, String a, String p, int y){ Book someBook = new Book(t, a, p, y, MultiLingual m); } I could just send int m in place of MultiLingual m but then I will have no control if language is set to PL or ENG. And finally get() method for Boook but I think at least this should be working fine: public String get(int lang){ String data; if (lang == ENG){ data = "Author: "+this.author+"\n"+ "Title: "+this.title+"\n"+ "Publisher: "+this.publisher+"\n"; } else { data = "Autor: "+this.author+"\n"+ "Tytul: "+this.title+"\n"+ "Wydawca: "+this.publisher+"\n"; } return data; } @Override public String toString(){ return ""; } }

    Read the article

  • Can I Specify Strings for MySql Table Values?

    - by afterimagedesign
    I have a MySql table that stores the users state and city from a list of states and cities. I specifically coded each state as their two letter shortened version (like WA for Washington and CA for California) and every city has the two letter abbreviation and the city name formated like this: Boulder Colorado would be CO-boulder and Salt Lake City, Utah would be UT-salt-lake-city as to avoid different states with same city name. The PHP inserts the value (UT-salt-lake-city) under the column City, but when I call the variable through PHP, it displays like this: Your location is: UT-salt-lake-city, Utah. To solve this, I've been making this list of variables if ($city == "AL-auburn") { $city = "Auburn"; } else if ($city == "AL-birmingham") { $city = "Birmingham"; } else if ($city == "GA-columbus") { $city = "Columbus"; $state = "Georgia"; } else if ($city == "AL-dothan") { $city = "Dothan"; } else if ($city == "AL-florence") { $city = "Forence"; } else if ($city == "AL-muscle-shoals") { $city = "Muscle Shoals"; } else if ($city == "AL-gadsden-anniston") { $city = "Gadsden Anniston"; } else if ($city == "AL-huntsville") { $city = "Huntsville"; } else if ($city == "AL-decatur") { $city = "Decatur"; } else if ($city == "AL-mobile") { $city = "Mobile"; } else if ($city == "AL-montgomery") { $city = "Montgomery"; } else if ($city == "AL-tuscaloosa") { $city = "Tuscaloosa"; } Is there a way I can shorten this process or at least call it from a separate file so I don't have to copy/paste every time I want to call the location?

    Read the article

  • How do I get an Epson al-c 1700 printer working?

    - by Edmond Frants
    I have a brand new epson aculaser c1700 and i'd like to have it working fine on ubuntu 12.04. so i did my homework, kind of, no printer driver comes for this printer in cups ... so i asked epson support who drove me to avasys who no longer handle support since december 2011. This the question that is still in my mind : as this printer comes with an osx driver which uses cups as printer server, how come no driver can be found for cups? I tried to get ppd and filters from osx driver and use them to install the printer on ubuntu but no answer from printer and none printed sheet i have .... i'm so disappointed i could cry ... I'd like to work with someone to get this working fine, please help me!

    Read the article

  • When spliting MP4s with ffmpeg how do I include metadata?

    - by Josh
    I have a few MP4s that i want to upload to my flickr account but they have a maximum size of 500mb as mine is only about 550 i was planing to simply split them in half then upload them, but i want to make sure all the meta data is included but it does not seem to be. I have tried each of the following with no luck, (at the end of this post i have the original and the new ffprobe outputs): ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -map_metadata 0:0 SANY0069A.MP4 ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -map_meta_data SANY0069.MP4:SANY0069A.MP4 SANY0069A.MP4 with the this one I manually produced the individual meta tags that i took from this command ffmpeg -i SANY0069A.MP4 -f ffmetadata meta.txt ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -metadata major_brand="mp42" -metadata minor_version="1" -metadata compatible_brands="mp42avc1" -metadata creation_time="2012-09-29 09:05:50" -metadata comment="SANYO DIGITAL CAMERA CA9" -metadata comment-eng="SANYO DIGITAL CAMERA CA9" SANY0069A.MP4 using the output of the former command i also tried this: ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -f ffmetadata -i meta.txt SANY0069A.MP4 Output: sample output from my first command: ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -map_metadata 0:0 SANY0069A.MP4 ffmpeg version 0.8.12, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 8. 0 / 53. 8. 0 libavformat 53. 5. 0 / 53. 5. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SANY0069.MP4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: mp42avc1 creation_time : 2012-09-29 09:05:50 comment : SANYO DIGITAL CAMERA CA9 comment-eng : SANYO DIGITAL CAMERA CA9 Duration: 00:08:38.71, start: 0.000000, bitrate: 9142 kb/s Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 9007 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc Metadata: creation_time : 2012-09-29 09:05:50 Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s Metadata: creation_time : 2012-09-29 09:05:50 File 'SANY0069A.MP4' already exists. Overwrite ? [y/N] y Output #0, mp4, to 'SANY0069A.MP4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: mp42avc1 creation_time : 2012-09-29 09:05:50 comment : SANYO DIGITAL CAMERA CA9 comment-eng : SANYO DIGITAL CAMERA CA9 encoder : Lavf53.5.0 Stream #0.0(eng): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 9007 kb/s, 30k tbn, 29.97 tbc Metadata: creation_time : 2012-09-29 09:05:50 Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, 127 kb/s Metadata: creation_time : 2012-09-29 09:05:50 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop, [?] for help frame= 7773 fps=4644 q=-1.0 Lsize= 289607kB time=00:04:19.35 bitrate=9147.4kbits/s video:285416kB audio:4033kB global headers:0kB muxing overhead 0.054571% and finaly, when i compare the ffprobe of the original and the first split part i get the 2 following outputs: original ffprobe version 0.8.12, Copyright (c) 2007-2011 the FFmpeg developers built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 8. 0 / 53. 8. 0 libavformat 53. 5. 0 / 53. 5. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SANY0069.MP4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: mp42avc1 creation_time : 2012-09-29 09:05:50 comment : SANYO DIGITAL CAMERA CA9 comment-eng : SANYO DIGITAL CAMERA CA9 Duration: 00:08:38.71, start: 0.000000, bitrate: 9142 kb/s Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 9007 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc Metadata: creation_time : 2012-09-29 09:05:50 Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s Metadata: creation_time : 2012-09-29 09:05:50 Split ffprobe version 0.8.12, Copyright (c) 2007-2011 the FFmpeg developers built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 8. 0 / 53. 8. 0 libavformat 53. 5. 0 / 53. 5. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SANY0069A.MP4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.5.0 comment : SANYO DIGITAL CAMERA CA9 Duration: 00:04:19.37, start: 0.000000, bitrate: 9146 kb/s Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 9015 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s Metadata: creation_time : 1970-01-01 00:00:00 I know this is incredibly long but its actually a quite simple question. I thought it would be best to provide as much detail as possible. any advice here would be great, Thanks

    Read the article

  • ASM programming, how to use loop?

    - by chris
    Hello. Im first time here.I am a college student. I've created a simple program by using assembly language. And im wondering if i can use loop method to run it almost samething as what it does below the program i posted. and im also eager to find someome who i can talk through MSN messanger so i can ask you questions right away.(if possible) ok thank you .MODEL small .STACK 400h .data prompt db 10,13,'Please enter a 3 digit number, example 100:',10,13,'$' ;10,13 cause to go to next line first_digit db 0d second_digit db 0d third_digit db 0d Not_prime db 10,13,'This number is not prime!',10,13,'$' prime db 10,13,'This number is prime!',10,13,'$' question db 10,13,'Do you want to contine Y/N $' counter dw 0d number dw 0d half dw ? .code Start: mov ax, @data ;establish access to the data segment mov ds, ax mov number, 0d LetsRoll: mov dx, offset prompt ; print the string (please enter a 3 digit...) mov ah, 9h int 21h ;execute ;read FIRST DIGIT mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov first_digit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, doubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 100d ;This is so we can calculate 100*1st digit +10*2nd digit + 3rd digit mul cx ;start to accumulate the 3 digit number in the variable imul cx ;it is understood that the other operand is ax ;AND that the result will use both dx::ax ;but we understand that dx will contain only leading zeros add number, ax ;save ;variable <number> now contains 1st digit * 10 ;---------------------------------------------------------------------- ;read SECOND DIGIT, multiply by 10 and add in mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov second_digit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, boubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 10d ;continue to accumulate the 3 digit number in the variable mul cx ;it is understood that the other operand is ax, containing first digit ;AND that the result will use both dx::ax ;but we understand that dx will contain only leading zeros. Ignore them add number, ax ;save -- nearly finished ;variable <number> now contains 1st digit * 100 + second digit * 10 ;---------------------------------------------------------------------- ;read THIRD DIGIT, add it in (no multiplication this time) mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov third_digit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, boubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer add number, ax ;Both my variable number and ax are 16 bits, so equal size mov ax, number ;copy contents of number to ax mov cx, 2h div cx ;Divide by cx mov half, ax ;copy the contents of ax to half mov cx, 2h; mov ax, number; ;copy numbers to ax xor dx, dx ;flush dx jmp prime_check ;jump to prime check print_question: mov dx, offset question ;print string (do you want to continue Y/N?) mov ah, 9h int 21h ;execute mov ah, 1h int 21h ;execute cmp al, 4eh ;compare je Exit ;jump to exit cmp al, 6eh ;compare je Exit ;jump to exit cmp al, 59h ;compare je Start ;jump to start cmp al, 79h ;compare je Start ;jump to start prime_check: div cx; ;Divide by cx cmp dx, 0h ;reset the value of dx je print_not_prime ;jump to not prime xor dx, dx; ;flush dx mov ax, number ;copy the contents of number to ax cmp cx, half ;compare half with cx je print_prime ;jump to print prime section inc cx; ;increment cx by one jmp prime_check ;repeat the prime check print_prime: mov dx, offset prime ;print string (this number is prime!) mov ah, 9h int 21h ;execute jmp print_question ;jumps to question (do you want to continue Y/N?) this is for repeat print_not_prime: mov dx, offset Not_prime ;print string (this number is not prime!) mov ah, 9h int 21h ;execute jmp print_question ;jumps to question (do you want to continue Y/N?) this is for repeat Exit: mov ah, 4ch int 21h ;execute exit END Start

    Read the article

  • What is the difference between these two nloglog(n) sorting algorithms? (Andersson et al., 1995 vs.

    - by Yktula
    Swanepoel's comment here lead me to this paper. Then, searching for an implementation in C, I came across this, which referenced another paper on an algorithm described here. Both papers describe integer sorting algorithms that run in O(nloglog(n)) time. What is the difference between the two? Have there been any more recent findings about this topic? Andersson et al., 1995 Han, 2004

    Read the article

  • question about merge algorithm

    - by davit-datuashvili
    hi i have question i know that this question is somehow nonsense but let see i have code to merge two sorted array in a one sorted array here is code in java public class Merge { public static void main(String[]args){ int a[]=new int[]{7,14,23,30,35,40}; int b[]=new int[]{5,8,9,11,50,67,81}; int c[]=new int[a.length+b.length]; int al=0; int bl=0; int cl=0; while (al<a.length && bl<b.length) if (a[al]<b[bl]) c[cl++]=a[al++]; else c[cl++]=b[bl++]; while (al<a.length) c[cl++]=a[al++]; while (bl<b.length) c[cl++]=b[bl++]; for (int j=0;j<c.length;j++){ System.out.println(c[j]); } } } question is why does not work if we write here {} brackets while (al } ?

    Read the article

  • T-SQL QUERY PROBLEM

    - by Sam
    Hi All, I have table called Summary and the data in the table looks like this: ID Type Name Parent 1 Act Rent Null 2 Eng E21-01-Rent Rent 3 Prj P01-12-Rent E21-Rent 1 Act Fin Null 2 Eng E13-27-Fin Fin 3 Prj P56-35-Fin E13-Fin I am writing a SP which has to pull the parent based on type. Here always the type Act has ID 1, Eng has ID 2 and Prj has ID 3. The type ACT parent is always NUll, type Eng parent is Act and type Prj parent is Eng Now I have table called Detail.I am writing a SP to insert Detail Table data to the Summary table. I am passing the id as parameter: I am having problem with the parent. How do I get that? I can always say when ID is 1 then parent is Null but when ID is 2 then parent is name of ID 1 similarly when ID is 3 then parent is name of ID2. How do I get that? Can anyone help me with this:

    Read the article

  • I would like to know if someone has applescript to loop al my stickynotes and put it in a textfile

    - by Richard
    I have been meaning to do this for a while, but I never got around to do it. The problem is that I have to do research how applescript works. Anyway, I have now collected over 200 snippets for my programming, but I need to sort them out Putting them all in a textfile with some obvious breaks inbetween I could sort them and tag them for another snippet programm. This is my first question here, so I hope I am at the right place, maybe stack overflow is also a good place to ask Thanks in advannce, if someone already has done this or knows how to do this Richard

    Read the article

  • Attempting to convert an if statement to assembly

    - by Malfist
    What am I doing wrong? This is the assmebly I've written: char encode(char plain){ __asm{ mov al, plain ;check for y or z status cmp al, 'y' je YorZ cmp al, 'z' je YorZ cmp al, 'Y' je YorZ cmp al, 'Z' je YorZ ;check to make sure it is in the alphabet now mov cl, al sub cl, 'A' cmp cl, 24 jl Other sub cl, '6' ;there are six characters between 'Z' and 'a' cmp cl, 24 jl Other jmp done ;means it is not in the alphabet YorZ: sub al, 24 jmp done Other: add al, 2 jmp done done: leave ret } } and this is the C code it's supposed to replace, but doesn't char encode(char plain){ char code; if((plain>='a' && plain<='x') || (plain>='A' && plain <='X')){ code = plain+2; }else if(plain == 'y' || plain=='z' || plain=='Y' || plain == 'y'){ code = plain - 24; }else{ code = plain; } return code; } It seems to convert every character that isn't an y,z,Y,Z into a plus 2 equivalent instead of just A-Xa-x. Any ideas why?

    Read the article

  • Can a sub-procedure procedure lock and modify the same rows FOR UPDATE that its calling procedure al

    - by RenderIn
    Will the following code lead to a deadlock or should it work without any problem? I've got something similar and it's working but I didn't think it would. I thought the parent procedure's lock would have resulted in a deadlock for the child procedure but it doesn't seem to be. If it works, why? My guess is that the nested FOR UPDATE is not running into a deadlock because it's smart enough to realize that it is being called by the same procedure that has the current lock. Would this be a deadlock if FOO_PROC was not a nested procedure? DECLARE FOO_PROC(c_someName VARCHAR2) as cursor c1 is select * from awesome_people where person_name = c_someName FOR UPDATE; BEGIN open c1; update awesome_people set person_name = UPPER(person_name); close c1; END FOO_PROC; cursor my_cur is select * from awesome_people where person_name = 'John Doe' FOR UPDATE; BEGIN for onerow in c1 loop FOO_PROC(onerow.person_name); end loop; END;

    Read the article

  • What is the relation between database books by Ullman et al.?

    - by macias
    A First Course in Database Systems by Jeffrey D. Ullman, Jennifer Widom (Amazon links) Database System Implementation by Hector Garcia-Molina, Jeffrey D. Ullman, Jennifer D. Widom Database Systems: The Complete Book by Hector Garcia-Molina, Jeffrey D. Ullman, Jennifer Widom As far as I know the second one is the second "part" of the first one. But what about the third one -- is it just first+second published in one volume? I would like to buy them, but I don't want to get redundant reading. Thank you in advance for clarification.

    Read the article

  • RESTful design, how to name pages outside CRUD et al?

    - by sscirrus
    Hi all, I'm working on a site that has quite a few pages that fall outside my limited understanding of RESTful design, which is essentially: Create, Read, Update, Delete, Show, List Here's the question: what is a good system for labeling actions/routes when a page doesn't neatly fall into CRUD/show/list? Some of my pages have info about multiple tables at once. I am building a site that gives some customers a 'home base' after they log on. It does NOT give them any information about themselves so it shouldn't be, for example, /customers/show/1. It does have information about companies, but there are other pages on the site that do that differently. What do you do when you have these situations? This 'home-base' is shown to customers and it mainly has info about companies (but not uniquely so). Second case: I have a table called 'Matchings' in between customers and companies. These matchings are accessed in completely different ways on different parts of the site (different layouts, different CSS sheets, different types of users accessing them, etc. They can't ALL be matchings/show. What's the best way to label the others? Thanks very much. =)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >