Search Results

Search found 98 results on 4 pages for 'trimming'.

Page 1/4 | 1 2 3 4  | Next Page >

  • zram trimming by writing zero pages

    - by qdot
    I'm using ZRAM as a backing block device for /tmp filesystem in the following manner: echo 8000000000 > /sys/block/zram0/disksize mkfs.ext4 -O dir_nlink,extent,extra_isize,flex_bg,^has_journal,uninit_bg -m0 \ -b 4096 -L "zram0" /dev/zram0 mount -o barrier=0,commit=240,noatime,nodev,nosuid /dev/zram0 /tmp chmod aogu+rwx /tmp It works out reasonably well for me - however, there is an issue here - when files are removed, they are not zero'ed, so the ZRAM does not remote the compressed pages. Obviously running dd if=/dev/zero of=/tmp/ZERO bs=1M count={free-space-some-rest}; rm /tmp/ZERO clears it up in the ZRAM - it gets notified of zero-pages and shrinks the store. How can I get ext4 to zero used pages on delete? Also, any other suggestions on how to optimize it?

    Read the article

  • JSF trimming white spaces

    - by msharma
    HI, I have an input field in which I want to trim any leading/trailing whitespaces. We are using JSF and binding the input field to a backing bean in the jsp using: <h:inputText id="inputSN" value="#{regBean.inputSN}" maxlength="10"/> My question is that besides validation can this be done in the jsp? I know we can also do this using the trim() java function in the Handler, but just wondering if there is a more elegant way to achieve this in JSF. Thanks.

    Read the article

  • Text Trimming in Silverlight 4

    - by dwahlin
    Silverlight 4 has a lot of great features that can be used to build consumer and Line of Business (LOB) applications. Although Webcam support, RichTextBox, MEF, WebBrowser and other new features are pretty exciting, I’m actually enjoying some of the more simple features that have been added such as text trimming, built-in wheel scrolling with ScrollViewer and data binding enhancements such as StringFormat. In this post I’ll give a quick introduction to a simple yet productive feature called text trimming and show how it eliminates a lot of code compared to Silverlight 3. The TextBlock control contains a new property in Silverlight 4 called TextTrimming that can be used to add an ellipsis (…) to text that doesn’t fit into a specific area on the user interface. Before the TextTrimming property was available I used a value converter to trim text which meant passing in a specific number of characters that I wanted to show by using a parameter: public class StringTruncateConverter : IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { int maxLength; if (int.TryParse(parameter.ToString(), out maxLength)) { string val = (value == null) ? null : value.ToString(); if (val != null && val.Length > maxLength) { return val.Substring(0, maxLength) + ".."; } } return value; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } #endregion } To use the StringTruncateConverter I'd define the standard xmlns prefix that referenced the namespace and assembly, add the class into the application’s Resources section and then use the class while data binding as shown next: <TextBlock Grid.Column="1" Grid.Row="3" ToolTipService.ToolTip="{Binding ReportSummary.ProjectManagers}" Text="{Binding ReportSummary.ProjectManagers, Converter={StaticResource StringTruncateConverter},ConverterParameter=16}" Style="{StaticResource SummaryValueStyle}" /> With Silverlight 4 I can define the TextTrimming property directly in XAML or use the new Property window in Visual Studio 2010 to set it to a value of WordEllipsis (the default value is None): <TextBlock Grid.Column="1" Grid.Row="4" ToolTipService.ToolTip="{Binding ReportSummary.ProjectCoordinators}" Text="{Binding ReportSummary.ProjectCoordinators}" TextTrimming="WordEllipsis" Style="{StaticResource SummaryValueStyle}"/> The end result is a nice trimming of the text that doesn’t fit into the target area as shown with the Coordinator and Foremen sections below. My data binding statements are now much smaller and I can eliminate the StringTruncateConverter class completely.   For more information about onsite, online and video training, mentoring and consulting solutions for .NET, SharePoint or Silverlight please visit http://www.thewahlingroup.com.

    Read the article

  • The How-To Geek Guide to Audio Editing: Cutting, Trimming & Arranging

    - by YatriTrivedi
    Audacity novices often start with lofty project ideas, but sometimes they lack the basics. Knowing how to cut and trim tracks is basic audio editing and is a fundamental starting point for making more elaborate arrangements. For this exercise, I’ll be making a ringtone from a Castlevania: Symphony of the Night track. I have the original CD and used that so I started with better quality audio than an MP3. You can follow along with any file you like, just so you get a feel for cutting, trimming, and arranging sound clips for yourself. I know which parts I want to edit in the track, but a quick play-through will help me look for those areas visually. How to Enable Google Chrome’s Secret Gold IconHTG Explains: What’s the Difference Between the Windows 7 HomeGroups and XP-style Networking?Internet Explorer 9 Released: Here’s What You Need To Know

    Read the article

  • VSDB to SSDT Part 1 : Converting projects and trimming excess files

    - by Etienne Giust
    Visual Studio 2012 introduces a change regarding Database Projects : they now use the SSDT technology, which means old VS2010 database projects (VSDB projects) need to be converted. Hopefully, VS2012 does that for you and it is quite painless, but in my case some unnecessary artifacts from the old project were left in place.  Also, when reopening the solution, database projects appeared unconverted even if I had converted them in the previous session and saved the solution.   Converting the project(s) When opening your Visual Studio 2010 solution with Visual Studio 2012, every standard project should be converted by default, but Visual Studio will ask you about your database projects : “Functional changes required Visual Studio will automatically make functional changes to the following projects in order to open them. The project behavior will change as a result. You will be able to open these projects in this version and Visual Studio 2010 SP1.” If you accept, your project is converted. And it should compile with no errors right away except if you have dependencies to dbschema files which are no longer supported.   The output of a SSDT project is a dacpac file which replaces the dbschema file you were accustomed to. References to dacpac files can be added to SSDT projects in the same fashion references to dbschema could be added to VSDB projects.   Cleaning up You will notice that your project file is now a sqlproj file but the old dbproj is still here. In fact at that point you can still reopen the solution in Visual Studio 2010 and everything should show up.   If like me you plan on using VS2012 exclusively, you can get rid of the following files which are still on your disk and in your source control : the dbproj and dbproj.vspscc files Properties/Database.sqlcmdvars Properties/Database.sqldeployment Properties/Database.sqlpermissions Properties/Database.sqlsettings   You might wonder where the information which used to be in the Properties files is now stored. Permissions : a Permissions.sql was created at the root level of your project. Note that when you create a new database project and import a database using the Schema Compare capabilities from Visual Studio, imported table and stored procedure definition files will hold the permission information (along with constraints and, indexes) SQLVars : they are defined inside the publish.xml files Deployment : they are also in the publish.xml files Settings : I was unable to find where those are now. I suppose they are not defined anymore   But Visual Studio still says my database projects should be converted ! I had this error upon closing and then re-opening the solution : my database projects would appear unconverted even though I did all the necessary steps previously.   Easy solution : remove those projects from the solution and add them again (the sqlproj files).   More For those who run into problems when converting from VSDB to SSDT, I suggest reading the following post : http://blogs.msdn.com/b/ssdt/archive/2011/11/21/top-vsdb-gt-ssdt-project-conversion-issues.aspx   Also interesting, is a side by side comparison of VSDB and SSDT project features : http://blogs.msdn.com/b/ssdt/archive/2011/11/21/sql-server-data-tools-ctp4-vs-vs2010-database-projects.aspx

    Read the article

  • Does Security Trimming work with Web Forms Routing?

    - by Slauma
    In my web.config I have configured a SiteMapProvider with securityTrimmingEnabled="true" and on my main master page is an asp:Menu control bound to an asp:SiteMapDataSource. In addition I have configured restricted access to all pages in a subfolder "Admin" (using another web.config in this subfolder). If I put a sitemapNode in Web.sitemap... <siteMapNode url="~/Admin/Default.aspx" title="Administration" description="" > ... only users in role "Admin" will have the menu item related to that siteMapNode. So this is working fine and as intended. Now I have defined a URL route in Global.asax to map the physical file to a new URL: System.Web.Routing.RouteTable.Routes.MapPageRoute("AdminHomeRoute", "Administration/Home", "~/Admin/Default.aspx"); But when I use this route-URL in the SiteMap file... <siteMapNode url="Administration/Home" title="Administration" description="" > ... it seems that security trimming does not work: The menu item is visible for all users. (Access to the page is still restricted though, so selecting the menu item by non-Admin users does not navigate to the restricted page.) Question: Is there any setting I've missed so far to make security trimming working with URL routing in ASP.NET 4.0 Web Forms? Did I do something wrong? Is there any work-around? Thank you for help!

    Read the article

  • Need solution for Text trimming Problem

    - by Anshuman Khandelwal
    Hi Guys, We are facing problem regarding Text trimming in TextBlock. We have a Text "My very long label goes here" and we have to show it in following format: [...g label goes here] i.e right aligned and text should be trimmed from left (character ellipsis at left side) We have used FlowDirection of TextBlock, ellipsis is correctly shown on the left side, but text is trimmed from the right side. FlowDirection = "LeftToRight:" [My very long lab...] FlowDirection = "RightToLeft:" [...My very long lab] But we need: [...g label goes here] Please provide suggestions on this.

    Read the article

  • SharePoint Navigation Custom Link Security Trimming

    - by ifunky
    Hi, We've got our navigation setup so that subsites show in the global navigation but we have a requirement to also put custom links to external sites which is straight forward. The tricky part is that some of the custom links need security trimming which you don't get when you add your own links to the navigation. Just wondering if anyone has got some ideas on how to work around this? Thanks Dan

    Read the article

  • Trimming article length in Google Reader

    - by Dov
    I'm considering switching to Google Reader from Safari's RSS reader. One feature that I would absolutely miss from Safari is its Article Length slider it gives you for each feed, so you can choose to show more or less content. Is there any way to achieve this in Google Reader's Expanded view? PS I also posted this question on Google's Help forum here.

    Read the article

  • Trimming articles' lengths in Google Reader

    - by Dov
    I'm considering switching to Google Reader from Safari's RSS reader. One feature that I would absolutely miss from Safari is its Article Length slider it gives you for each feed, so you can choose to show more or less content. Is there any way to achieve this in Google Reader's Expanded view? PS I also posted this question on Google's Help forum here.

    Read the article

  • ffmpeg trimming video

    - by Dori
    I am having a problem using ffmpeg which is driving me a little mad, so I hope someone can help me out. I have a 13 MPEG-4 .mp4 video of which I am attempting to trim the first two seconds off using ffmpeg and display in an Android app. From the numerous tuts online i am excecuting the following on the command line ffmpeg -i untrimmed_video.mp4 -vcodec copy -ss 2 trimmed_video.mp4 with no luck as it outputs a video of 4-seconds length (i have no idea where its getting 4 from), if i change this to 3 i still get a 4 second video, if i set it to 10 i get unplayable output. if i move the -ss arg to ffmpeg -vcodec copy -i untrimmed_video.mp4 -ss 2 trimmed_video.mp4 i get output the same length as the input, same as if i move to the end. I have tried lots of variations as orders and nothing seems to work, is this a bug, am i doing something wrong?! please help!!!

    Read the article

  • Trimming / cropping a movie file ?

    - by ldigas
    Now, I'm not really sure what's the exact term here. As far as I saw, cropping is related to video size. I need a program to trim some parts of the video file. On a timescale, for example, from 0-60s, I'd like to trim the parts from 14-20s, and from 30-35s. Can anyone give a recommendation for such an application ? The movie in question is a .MOV file, so Windows Movie Maker doesn't work.

    Read the article

  • Are there tools available for trimming PDF margins?

    - by Charles Duffy
    I have an ebook I'm trying to read in PDF format on a Kindle. Unfortunately, the page headers and footers have some content (page number and copyright info, respectively) preventing the device from scaling the actual text to match its usable area viewing area, thus leaving the actual content too small to read. Various tools are available which will trim off whitespace, but the Kindle already does this; my goal, by contrast, is to remove printed matter outside of a defined bounding box, and the only tool I've found for the purpose is moderately expensive commercial software. I could probably generate a mask in Inkscape; split out the individual pages using pdftk, apply the mask to each page individually (outputting to postscript), and recombine the numerous postscript files into a single PDF. However, this decode/reencode steps would be pretty unfortunate in terms of document size; something able to operate with a bit more finesse would be ideal. I have all major operating systems handy (Windows, several modern Linux distros, a Mac, etc) so solutions don't need to be constrained by platform. Suggestions? (I've reported the issue to the author, who mentioned it to his editor, who hasn't done anything about the issue over the course of more than a month, making the zero-work approach evidently nonproductive).

    Read the article

  • Trimming video from it's end using FFMpeg or Mencoder

    - by get8p
    I have pack of .avi files that needs to be trimmed by 5 last seconds. I'm doing it using batch processing and naturally, they all have different length so I can't set a trim from the beginning. I know FFMpeg has commands -t and -ss as well as Mencoder has -endpos and -ss, but in my case I don't know if I can use them this way. My .bat file will look like this FOR %%i IN (*.avi) DO ( ffmpeg/mencoder -options "%%i" "%%~ni"1.avi ) Thanks in advance.

    Read the article

  • Trimming GIT Checkins

    - by yar
    I check my code into a GIT branch every few minutes or so, and the comments end up being things like "Everything broken starting again" and other absurdities. Then every few minutes/hours/days I do a serious checkin with a real comment like, "Fixed bug #22.55, 3rd time." How can I separate these two concepts? I would like to be able to remove all my frequent-checkins and just leave the serious ones.

    Read the article

  • Perl - How to get the number of elements in an anonymous array, for concisely trimming pathnames

    - by NXT
    Hi Everyone, I'm trying to get a block of code down to one line. I need a way to get the number of items in a list. My code currently looks like this: # Include the lib directory several levels up from this directory my @ary = split('/', $Bin); my @ary = @ary[0 .. $#ary-4]; my $res = join '/',@ary; lib->import($res.'/lib'); That's great but I'd like to make that one line, something like this: lib->import( join('/', ((split('/', $Bin)) [0 .. $#ary-4])) ); But of course the syntax $#ary is meaningless in the above line. Is there equivalent way to get the number of elements in an anonymous list? Thanks! PS: The reason for consolidating this is that it will be in the header of a bunch of perl scripts that are ancillary to the main application, and I want this little incantation to be more cut & paste proof. Thanks everyone There doesn't seem to be a shorthand for the number of elements in an anonymous list. That seems like an oversight. However the suggested alternatives were all good. I'm going with: lib->import(join('/', splice( @{[split('/', $Bin)]}, 0, -4)).'/lib'); But Ether suggested the following, which is much more correct and portable: my $lib = File::Spec->catfile( realpath(File::Spec->catfile($FindBin::Bin, ('..') x 4)), 'lib'); lib->import($lib);

    Read the article

  • Trimming the XML file

    - by Sathish
    I have a XML file as shown below <NewDataSet> - <T> <P /> <C>1</C> <M /> </T> - <T> <P /> <C>1</C> <M /> </T> - <T> <P /> <C>1</C> <M /> </T> - <T> <P /> <C>1</C> <M /> </T> - <T> <P /> <C>2</C> <M>44</M> </T> - <T> <P /> <C>2</C> <M>45</M> </T> - <T> <P /> <C>2</C> <M>46</M> </T> </NewDataSet> Question - Basicall i should remove the block <T> <P /> <C>1</C> <M /> </T> that does not have <M> Value

    Read the article

  • Trimming bit of the beginning off a recorder waveform

    - by Lowgain
    I've got a flash 10.1 app that lets me record microphone input to a wav without a media server, which I am saving to an Amazon S3 bucket. I have another process running on a server which gets wavs from this bucket, converts to mp3 using LAME and puts them into another bucket. This all works fine, but in converting wav mp3, about 0.1sec or so of silence is added to my sound. In the application this are being used in, perfect sync is critical, so I need to trim off that little bit. If I have to trim it off the original waveform that is okay, I don't expect anything important to happen in that first fraction of a second. What is the best way to go about this? I am using Adobe's WavWriter to convert by ByteArray into a proper waveform. Is there a way I can easily trim off the first few samples from my ByteArray without invalidating the structure? Alternatively, is there a good server-side tool I can use to trim the wav before running it through LAME, or an argument I can give LAME? Or, could I even trim that sound off the mp3 after it has been converted? Thanks!

    Read the article

  • Properly trimming PCM data from a ByteArray

    - by Lowgain
    I have a situation where I need to trim a small amount of audio from the beginning of a recorded clip (generally somewhere between 110-150ms, it is an inconsistent amount). I'm recording in 44100 frequency and 16 bitrate. This is the code I'm using: public function get trimmedData():ByteArray { var ba:ByteArray = new ByteArray(); var bitPosition:uint = 44100 * 16 * (recordGap / 1000); bitPosition -= int(bitPosition % 16); //should keep snapped to nearest sample, I hope ba.writeBytes(_rawData, (bitPosition / 8)); return ba; } This seems to work time-wise, but all the recorded audio gets staticy and gross. Is something off about my rounding? This is the first time I've needed to alter raw PCM data so I'm not sure about the finer details of it. Thanks!

    Read the article

  • [sed] Multiline trimming

    - by wwrob
    I have a html file that I want to trim. I want to remove a section from the beginning all the way to a given string, and from another string to the end. How do I do that, preferably using sed?

    Read the article

  • Trimming a vector of strings

    - by dreamlax
    I have an std::vector of std::strings containing data similar to this: [0] = "" [1] = "Abc" [2] = "Def" [3] = "" [4] = "Ghi" [5] = "" [6] = "" How can I get a vector containing the 4 strings from 1 to 4? (i.e. I want to trim all blank strings from the start and end of the vector): [0] = "Abc" [1] = "Def" [2] = "" [3] = "Ghi" Currently, I am using a forward iterator to make my way up to "Abc" and a reverse iterator to make my way back to "Ghi", and then constructing a new vector using those iterators. This method works, but I want to know if there is an easier way to trim these elements. P.S. I'm a C++ noob. Edit Also, I should mention that the vector may be composed entirely of blank strings, in which case a 0-sized vector would be the desired result.

    Read the article

  • efficiently trimming postgresql tables

    - by agilefall
    I have about 10 tables with over 2 million records and one with 30 million. I would like to efficiently remove older data from each of these tables. My general algorithm is: create a temp table for each large table and populate it with newer data truncate the original tables copy tmp data back to original tables using: "insert into originaltable (select * from tmp_table)" However, the last step of copying the data back is taking longer than I'd like. I thought about deleting the original tables and making the temp tables "permanent", but I lose constraint/foreign key info. If I delete from the tables directly, it takes much longer. Given that I need to preserve all foreign keys and constraints, are there any faster ways of removing the older data? Thanks.

    Read the article

  • Trimming GIT Checkins/Squashing GIT History

    - by yar
    I check my code into a GIT branch every few minutes or so, and the comments end up being things like "Everything broken starting again" and other absurdities. Then every few minutes/hours/days I do a serious checkin with a real comment like, "Fixed bug #22.55, 3rd time." How can I separate these two concepts? I would like to be able to remove all my frequent-checkins and just leave the serious ones.

    Read the article

1 2 3 4  | Next Page >