devxlogo

upload

Change the orientation of a page in Word.

Did you ever find a need to change the orientation of a word document?  If yes, you can quickly do that by navigating to the ???Page Layout??? menu and choose the Landscape/Potrait orientation option. 

Duplicate–do not use–Floodfill objects using C#

In order to flood fill drawn objects, you can make use of the next sample: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace FloodFill {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         Bitmap bm;         Graphics g;         private bool SameColor(Color c1, Color c2)         {             return ((c1.A == c2.A) && (c1.B == c2.B) && (c1.G == c2.G) && (c1.R == c2.R));         }         private void tobien1(Bitmap bm, Point p, Color Color, Color LineColor)         {             Stack S = new Stack();             S.Push(p);             while (S.Count != 0)             {                 p = S.Pop();

Limiting the rows returned – MySQL

Ideally, this is a performance enhancement and needs lot of visibility before hand to implement at early stages. There are numerous cases when you are running on low memory and want to limit the data in your transactions.Especially, when you are sure that you dont need all the records matching your query, you can have criterias set. Stil, there could be plenty of them returned and you may want just a handfull of them or a little more. In MySQL, LIMIT is a feature that helps fetch a certain number of records matching the criteria provided  Eg: SELECT * FROM `database_name`.`table_name` LIMIT 10; The value of LIMIT is defined by what your need is. Use it accordingly to allow only the specified records is returned so that you also benefit with performance and quicker processing.

Quickly escape the escape characters in a string.

C# provides you a way to escape the problematic characters in a string through the ???@??? symbol. Just place it before the string, and the compiler will escape those characters.For e.g. String filePath = @???c:windowssystem32???;Thus you do not have to escape the slashes in the string in the above example.

Change case of the text in word with ease

Microsoft word gives us various options to change the case of the text. Changing to upper/lower is just a click away. Access the ???change case??? button in the Paragraph ribbon menu, and you will see options like Lower case, Upper case, sentence case. Applying it is very easy as well.  Just click on the text on which you want to change the case, and then select an option from the ???change case??? options. 

Quick way to copy a format in Microsoft Office applications

Is there a format/style of the text that you want to quickly copy in Office applications like word, excel, powerpoint etc? Just click on the text from which you want to copy the format, and then click on the ???Format Painter??? button in the clipboard ribbon menu and then click on the text where you want to apply. The format is copied over.

Understanding Dalvik GC Logs–do not use

Memory utilization on the mobile app has a significant impact on the customer experience. If your app creates a lot of objects, then Garbage Collection (GC) process will be triggered frequently to evict unused objects. Even though Garbage Collection is an automatic process, however, frequent Garbage Collection consumes a lot of CPU + it will also pause the app. Frequent pauses can jank the app (i.e. stuttering, juddering, or halting). Thus, you need to understand how many objects your app is creating, how frequently Garbage collection is triggered, how much time it takes to complete, how much memory is reclaimed after every event. All this information is present in the runtime log messages. Whenever a GC event runs, a log line is printed in the runtime log messages. You can view those log lines through logcat. GC log line format varies based on whether app runs on Dalvik VM or Android Run Time (ART). In the earlier article, we saw how to analyze ART GC log line. In this article, let???s see how to analyze Dalvik GC log line.

Compact the outlook file (.PST) and save disk space

After you have deleted the unwanted emails, at times the pst file does not automatically shrink and lowers its space used on disk. A quick way is to use the ???Compact PST??? feature.   You can right click on the PST file in outlook, and choose Data File properties.   Then click on Advanced and choose the Outlook data file settings. You will be provided with an option to compact the file.