Search Results

Search found 18 results on 1 pages for 'stackoverflownewbie'.

Page 1/1 | 1 

  • Video for HTML5 -- ffmpeg commands

    - by StackOverflowNewbie
    I'd like to allow my users to upload their videos (no clue what format they'll be) and convert them into the following formats: MP4 Ogg Webm I think it's those 3 formats I need in order to support HTML5, at least per http://mediaelementjs.com/. I've tried various commands that I found on the web. Some of them worked, some of them used old syntax, some of them worked only on my computer and not others, some of them gave conflicting information, etc. Are there any FFMPEG experts here that can provide the "proper" commands? I'm not particularly trying to achieve anything special. I just want to be able to convert the video into something playable on the web. Highest quality, smallest filesize, etc. are the basic goals. Something that works without a lot of special configurations would be ideal, too. I ran into a lot of "missing presets" problems.

    Read the article

  • Optimized .htaccess???

    - by StackOverflowNewbie
    I'd appreciate some feedback on the compression and caching configuration below. Trying to come up with a general purpose, optimized compression and caching configuration. If possible: Note your PageSpeed and YSlow grades Add configuration to your .htaccess Clear your cache Note your PageSpeed and YSlow grades to see if there are any improvements (or degradations) NOTE: Make sure you have appropriate modules loaded. Any feedback is much appreciated. Thanks. # JavaScript MIME type issues: # 1. Apache uses "application/javascript": http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types # 2. IIS uses "application/x-javascript": http://technet.microsoft.com/en-us/library/bb742440.aspx # 3. SVG specification says it is text/ecmascript: http://www.w3.org/TR/2001/REC-SVG-20010904/script.html#ScriptElement # 4. HTML specification says it is text/javascript: http://www.w3.org/TR/1999/REC-html401-19991224/interact/scripts.html#h-18.2.2.2 # 5. "text/ecmascript" and "text/javascript" are considered obsolete: http://www.rfc-editor.org/rfc/rfc4329.txt #------------------------------------------------------------------------------- # Compression #------------------------------------------------------------------------------- <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/atom+xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml # The following MIME types are in the process of registration AddOutputFilterByType DEFLATE application/xslt+xml AddOutputFilterByType DEFLATE image/svg+xml # The following MIME types are NOT registered AddOutputFilterByType DEFLATE application/mathml+xml AddOutputFilterByType DEFLATE application/rss+xml # Deal with JavaScript MIME type issues AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE text/ecmascript AddOutputFilterByType DEFLATE text/javascript </IfModule> #------------------------------------------------------------------------------- # Expires header #------------------------------------------------------------------------------- <IfModule mod_expires.c> # 1. Set Expires to a minimum of 1 month, and preferably up to 1 year, in the future # (but not more than 1 year as that would violate the RFC guidelines) # 2. Use "Expires" over "Cache-Control: max-age" because it is more widely accepted ExpiresActive on ExpiresByType application/pdf "access plus 1 year" ExpiresByType application/x-shockwave-flash "access plus 1 year" ExpiresByType image/bmp "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/tiff "access plus 1 year" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType text/css "access plus 1 year" ExpiresByType video/x-flv "access plus 1 year" # Deal with JavaScript MIME type issues ExpiresByType application/javascript "access plus 1 year" ExpiresByType application/x-javascript "access plus 1 year" ExpiresByType text/ecmascript "access plus 1 year" ExpiresByType text/javascript "access plus 1 year" # Probably better to explicitly declare MIME types than to have a blanket rule for expiration # Uncomment below if you disagree #ExpiresDefault "access plus 1 year" </IfModule> #------------------------------------------------------------------------------- # Caching #------------------------------------------------------------------------------- <IfModule mod_headers.c> <FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf|tif|tiff)$"> Header add Cache-Control "public" Header unset ETag Header unset Last-Modified FileETag none </FilesMatch> </IfModule>

    Read the article

  • YUI - Pros and Cons

    - by StackOverflowNewbie
    I'm about to begin a new project and plan to use YUI and my JS and CSS framework for the following reasons: Treeview with tri-state checkboxes (seems to be the best implementation I could find) Calandar (seen others, but since #1 is on YUI, I'm glad it also has calendar) CSS framework (was going to use 960, but might as well go 100% Yahoo) I plan to use only 1 JS framework. Does anyone see any problems with my decision?

    Read the article

  • Convert PDF to PNG using ImageMagick

    - by StackOverflowNewbie
    using ImageMagick, what command should i use to convert a PDF to PNG? I need highest quality, smallest file size. this is what I have so far (very slow by the way): convert -density 300 -depth 8 -quality 85 a.pdf a.png Looking at what Gmail does when a user "view" a PDF, the quality is awesome and the file size very minimal. The DPI is just 96 (I have to set a density of 300 to get anything decent). Anyone know how GMail does it? Thanks.

    Read the article

  • .htaccess - proxy AND browser caching???

    - by StackOverflowNewbie
    In .htaccess, how do I specify a file type to be cached via browser and proxy? Cache-control for needs to be "private" for browser, "public" for proxy. However, I can't define Cache-Control to be private AND public for same file type. It seems like I have to choose between browser or proxy caching. Suggestions?

    Read the article

  • Data Modeling of Entity with Attributes

    - by StackOverflowNewbie
    I'm storing some very basic information "data sources" coming into my application. These data sources can be in the form of a document (e.g. PDF, etc.), audio (e.g. MP3, etc.) or video (e.g. AVI, etc.). Say, for example, I am only interested in the filename of the data source. Thus, I have the following table: DataSource Id (PK) Filename For each data source, I also need to store some of its attributes. Example for a PDF would be "numbe of pages." Example for audio would be "bit rate." Example for video would be "duration." Each DataSource will have different requirements for the attributes that need to be stored. So, I have modeled "data source attribute" this way: DataSourceAttribute Id (PK) DataSourceId (FK) Name Value Thus, I would have records like these: DataSource->Id = 1 DataSource->Filename = 'mydoc.pdf' DataSource->Id = 2 DataSource->Filename = 'mysong.mp3' DataSource->Id = 3 DataSource->Filename = 'myvideo.avi' DataSourceAttribute->Id = 1 DataSourceAttribute->DataSourceId = 1 DataSourceAttribute->Name = 'TotalPages' DataSourceAttribute->Value = '10' DataSourceAttribute->Id = 2 DataSourceAttribute->DataSourceId = 2 DataSourceAttribute->Name = 'BitRate' DataSourceAttribute->Value '16' DataSourceAttribute->Id = 3 DataSourceAttribute->DataSourceId = 3 DataSourceAttribute->Name = 'Duration' DataSourceAttribute->Value = '1:32' My problem is that this doesn't seem to scale. For example, say I need to query for all the PDF documents along with thier total number of pages: Filename, TotalPages 'mydoc.pdf', '10' 'myotherdoc.pdf', '23' ... The JOINs needed to produce the above result is just too costly. How should I address this problem?

    Read the article

  • Need help with SQL Query

    - by StackOverflowNewbie
    Say I have 2 tables: Person - Id - Name PersonAttribute - Id - PersonId - Name - Value Further, let's say that each person had 2 attributes (say, gender and age). A sample record would be like this: Person->Id = 1 Person->Name = 'John Doe' PersonAttribute->Id = 1 PersonAttribute->PersonId = 1 PersonAttribute->Name = 'Gender' PersonAttribute->Value = 'Male' PersonAttribute->Id = 2 PersonAttribute->PersonId = 1 PersonAttribute->Name = 'Age' PersonAttribute->Value = '30' Question: how do I query this such that I get a result like this: 'John Doe', 'Male', '30'

    Read the article

  • Sanitize Content: removing markup from Amazon's content

    - by StackOverflowNewbie
    I'm using Amazon Web Service to get product descriptions of various items. The problem is that Amazon's content contains mark up that is sometimes destructive to the layout of my web page (e.g. unclosed DIVs, etc.). I want to sanitize the content I get from Amazon. My solution would be to do the following (my initial list so far): Remove unnecessary tags such as div, span, etc. while keeping tags like p, ul, ol, etc. Remove all attributes from all the tags (e.g. seems like there are style attributes in some of the tags) Remove excess white space (e.g. multiple spaces, carriage returns, new lines, tabs, etc.) Etc. Before I go off trying to build my solution, I'm wondering if anyone has a better idea (or an already existing solution). Thanks.

    Read the article

  • MySQL - query to return CSV in a field?

    - by StackOverflowNewbie
    Assume I have the following tables: TABLE: foo - foo_id (PK) TABLE: tag - tag_id (PK) - name TABLE: foo_tag - foo_tag_id (PK) - foo_id (FK) - tag_id (FK) How do I query this so that I get a result like this: ========================== | foo_id | tags | ========================== | 1 | foo, bar | | 2 | foo | | 3 | bar | -------------------------- Basically, I need all of foo's tags in one column, comma separated. Possible in MySQL?

    Read the article

  • Data Modeling Help - Do I add another table, change existing table's usage, or something else?

    - by StackOverflowNewbie
    Assume I have the following tables and relationships: Person - Id (PK) - Name A Person can have 0 or more pets: Pet - Id (PK) - PersonId (FK) - Name A person can have 0 or more attributes (e.g. age, height, weight): PersonAttribute _ Id (PK) - PersonId (FK) - Name - Value PROBLEM: I need to represent pet attributes, too. As it turns out, these pet attributes are, in most cases, identical to the attributes of a person (e.g. a pet can have an age, height, and weight too). How do I represent pet attributes? Do I create a PetAttribute table? PetAttribute Id (PK) PetId (FK) Name Value Do I change PersonAttribute to GenericAttribute and have 2 foreign keys in it - one connecting to Person, the other connecting to Pet? GenericAttribute Id (PK) PersonId (FK) PetId (FK) Name Value NOTE: if PersonId is set, then PetId is not set. If PetId is set, PersonId is not set. Do something else?

    Read the article

  • PHP/XPath: Iterating through ancestor nodes in XML using SimpleXML

    - by StackOverflowNewbie
    I need to loop through the Ancestors nodes in order to get corresponding BrowseNodeId and Name values. How do I do this using XPath? I'm trying something like the the following, but it's not working: //BrowseNode[1]//Ancestors[1]/BrowseNode/BrowseNodeId/text() //BrowseNode[1]//Ancestors[1]/BrowseNode/Name/text() I think the //Ancestors part of the XPath is actually searching the entire XML tree. What I need to do is visit each node to get the needed values. How do I do this? In the example below, I want: Europe - History - Subjects - Books. Example XML: <BrowseNode> <BrowseNodeId>4952</BrowseNodeId> <Name>France</Name> <Ancestors> <BrowseNode> <BrowseNodeId>4935</BrowseNodeId> <Name>Europe</Name> <Ancestors> <BrowseNode> <BrowseNodeId>9</BrowseNodeId> <Name>History</Name> <Ancestors> <BrowseNode> <BrowseNodeId>1000</BrowseNodeId> <Name>Subjects</Name> <IsCategoryRoot>1</IsCategoryRoot> <Ancestors> <BrowseNode> <BrowseNodeId>283155</BrowseNodeId> <Name>Books</Name> </BrowseNode> </Ancestors> </BrowseNode> </Ancestors> </BrowseNode> </Ancestors> </BrowseNode> </Ancestors> </BrowseNode>

    Read the article

  • ImageMagick help -- need to change DPI

    - by StackOverflowNewbie
    I have a 1000x1000 300dpi image that I need to convert to a 100x100 96dpi thumbnail. How do I do this in ImageMagick? I'm after the smallest possible file size at the highest possible quality. Doing something like this: convert myimage.png -quality 100 -resize 100 PNG8:mynewimage.png .... does change the dimension, but still maintains the DPI. If I can get this to change to 96dpi, I should get a smaller file size. I've tried -density, etc., but can't seem to make them work for me. Maybe I put the commands in the wrong order or passed the wrong parameters. Any assistance is greatly appreciated. Thanks.

    Read the article

  • Twitter Bootstrap: How to use containers and rows

    - by StackOverflowNewbie
    Assume the following layout: I'm trying to learn how to use Twitter's Bootstrap. What should the general structure of the framework's markup be? Is it this: <div class="container-fluid"> <div class="row-fluid"> <div class="span12"> // Outside link mark up here </div> </div> </div> <div class="container-fluid"> <div class="row-fluid"> <div class="span1"> // Logo mark up here </div> <div class="span4"> // Main nav mark up here </div> <div class="span3 offset4"> // User nav mark up here </div> </div> </div> <div class="container-fluid"> <div class="row-fluid"> <div class="span3"> // Left sidebar mark up here </div> <div class="span6"> <div class="span6"> // Breadcrumb mark up here </div> <div class="span6"> // Main content mark up here </div> </div> <div class="span3"> // Right sidebar mark up here </div> </div> </div> <div class="container-fluid"> <div class="row-fluid"> <div class="span3 offset9"> // Footer link mark up here </div> </div> </div>

    Read the article

  • Multiple submits in an HTML form

    - by StackOverflowNewbie
    I have an HTML form that needs multiple submit buttons, like this: <input type="submit" name="foo" value="1"/> <input type="submit" name="foo" value="2"/> <input type="submit" name="foo" value="3"/> The problem is that I want it to display on the button something other than what is in the value attribute (in the example above: 1, 2, 3). For example, I want to show "Bar" for the button with value="1". Is this possible? I've considered using the <button> tag, like this: <button name="foo" value="1">Bar</button> The problem with using <button> (from w3schools): If you use the element in an HTML form, different browsers may submit different values. Internet Explorer, prior version 9, will submit the text between the and tags, while other browsers will submit the content of the value attribute. Use the element to create buttons in an HTML form. Thoughts?

    Read the article

  • Twitter Bootstrap: how to put unknown number of span* within a row-fluid?

    - by StackOverflowNewbie
    Assume I have the following nesting: <div class="cointainer-fluid"> <div class="row-fluid"> <div class="span3"> <!-- left sidebar here --> </div> <div class="span9"> <!-- main content here --> </div> </div> </div> I'd like to put an unknown number of <div class="span3"></div> in the main content area. (Each of the span3 is suppose to contain a product photo, name, price, etc.) Of course, my aim is that be responsive. So, I might display 20 products, which I'd like to possibly display 5 products per "row" on a wide screen, then 4 products per "row" on a slightly less wide screen, then 3, then 2, then 1. For example (each X represents a product): Wide Screen row 1: X X X X X row 2: X X X X X row 3: X X X X X row 4: X X X X X Less Wide Screen row 1: X X X X row 2: X X X X row 3: X X X X row 4: X X X X row 5: X X X X Even Less Wide Screen row 1: X X X row 2: X X X row 3: X X X row 4: X X X row 5: X X X row 6: X X X row 7: X X It seems like I need to do nested rows. However, if I do that, then I'll only be able to fit a certain amount of products in each nested row. That'll cause problems as the screen width decreases, for example (each X represents a product): Wide Screen row 1: X X X X X row 2: X X X X X row 3: X X X X X Less Wide Screen row 1: X X X X X row 2: X X X X X row 3: X X X X X How do I do what I want to do in Twitter Bootstrap?

    Read the article

  • WHY JSLint complains: "someFunction() was used before it was defined"?

    - by 7hi4g0
    Searching for the JSLint error "was used before it was defined" i've found these: JSLint: Using a function before it's defined error Function was used before it was defined - JSLint JSLint: was used before it was defined jsLint error: “somefunction() was used before it was defined” jslint - Should we tolerate misordered definitions? Problem None of those answers WHY the error is shown. Elaboration According to the ECMA-262 Specification functions are evaluated before execution starts, hence all functions declared using the function keyword are available to all the code idenpendent of the place they were declared (assuming they are acessible on that scope). This is otherwise known as hoisting. Douglas Crockford seems to think it is better to declare every function before the code that uses it regardless of the hoisting effect. According to StackOverflowNewbie in his question, this raises some code organization problems. Not to mention some people, like me, prefer to declare their functions underneath the main/init code. On those questions there are some ways to avoid or fix the error, such as using function expressions vs function declarations. But none of them showed me the reason of the error. Not even Crockford's site. Question(s) Why is it an error to call a function before the declaration, even if it was declared using the function keyword? Is it better to use function expressions instead of function declaration in the JSLint context? If one is preferred, why? Note Not looking for answers like: Crockford is a tyrant Is just Crockford's opinion Thank you :*

    Read the article

1