Why is it bad practice to call System.gc()?

Why is it bad practice to call System.gc()?

After answering a question about how to force-free objects in Java (the guy was clearing a 1.5GB HashMap) with System.gc(), I was told it's bad practice to call System.gc() manually, but the comments were not entirely convincing. In additio

printf anomaly after “fork()”

printf anomaly after “fork()”

OS: Linux, Language: pure CI'm moving forward in learning C programming in general, and C programming under UNIX in a special case.I detected a strange (for me) behaviour of the printf() function after using a fork() call. Code#include

Disable stylecop analysis for specific projects within solution

Disable stylecop analysis for specific projects within solution

Is there a way to easily stop StyleCop warnings from being displayed within specific projects in a solution. Or, more pointedly, a way to select which projects StyleCop analysis should be performed on by Visual Studio? We have a solution wi

Difference between glOrthof and glViewPort

Difference between glOrthof and glViewPort

On OpenGL-ES i'm confused on what the difference is between setting glOrthof() glViewPort()GLU.gluOrtho2D()with it's respective parameters. Since I believe it's all setting the part you can see to the specified coordinates (width, height

How to render glyphs from FontAwesome on a Canvas element

How to render glyphs from FontAwesome on a Canvas element

FontAwesome specifies glyphs in its CSS file like so:/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */.icon-glass:before { content:

Eclipse ctrl+right does nothing

Eclipse ctrl+right does nothing

I'm editing a Java source in Eclipse (Version: Kepler Release). I'm used no navigate text on other editors using Ctrl+Right to move to the next word and Ctrl+Shift+Right to select the next word. But on eclipse nothing happens, the cursor st

Any tutorial for customize lock screen in Android [closed]

Any tutorial for customize lock screen in Android [closed]

I want to know that any tutorial or sample application for customize lock screen in Android? 1:Here are the links which will provide guide you on how to develop the lock screen in android 1) WidgetCatalog2) Lock Screen for Android3) Wid

Label printing development using b-pac SDK in a C# application

Label printing development using b-pac SDK in a C# application

I am developing a C# application of POS system in Visual Studio 2012 RC. I have to print the sales on label printer using Brothers P-Touch QL-500 Label printer.WHAT I HAVE DONE ALREADY.I have installed latest b-pac SDK 3.0Successfully add

Android App Presentation

Android App Presentation

I wanted to make a video presentation of my android application. i know i can make the presentation by holding a camcorder in front of the screen and give walkthrough the application. But is there any other way this can be done, something o

JavaFX WebView not working using a untrusted SSL certificate

JavaFX WebView not working using a untrusted SSL certificate

I'm developing a simple embedded browser using JavaFX:final WebView browser = new WebView();final WebEngine webEngine = browser.getEngine();When I use webEngine to load any http website, it works fine:webEngine.load("http://google.es");Desp

How to set layout on 7\" two different tablet?

How to set layout on 7\" two different tablet?

I have two 7 inch tablet one tablet (800*480) and second tablet (1024*600). I have facing problem following :-1. Both can run on layout-mdpi and layout-large so how can i make different folder for run my app both resolution.Application run

ScrollView widget not scolling in kivy

ScrollView widget not scolling in kivy

I'm having some issues using the ScollView Widget in an attempt to make a dynamically-generated stack of labels scrollable. It's possible that I'm misunderstanding the way ScrollView should be utilized, so I'm hoping somebody could clarify

Displaying Window on Logon Screen Using C# in Windows XP

Displaying Window on Logon Screen Using C# in Windows XP

I am trying to create a service with C# that launches a process that can be displayed on the Windows XP Logon screen.I found some code that is doing this in C++. The C++ code is for a service that creates another process with STARTUPINFO.l

Parsing XML CDATA with PHP [closed]

Parsing XML CDATA with PHP [closed]

I have a little problem that I can't figure out how to solve.I have an XML (actually it's RSS) file that I'm trying to parse with PHP, but the CDATA tag come out blank. Here's the XML Codeand here's the PHP file Everything works fine, excep

iOS7 UIPickerView doesn't properly display custom views with images

iOS7 UIPickerView doesn't properly display custom views with images

This issue started happening in iOS7 with the new UIPickerView controller. To use images in your UIPickerView controller you must use the delegate method to return an image:pickerView:viewForRow:forComponent:reusingView: The problem is th

See action bar across all activities - Android

See action bar across all activities - Android

In my main activity I have my action bar. How can this stay visible even if I launch a new activity?Does the new activity have to extend my main activity for this to work? 1:If you declare the onCreateOptionMenu method, wich is the one w

Soundcloud API authentication without a web browser

Soundcloud API authentication without a web browser

I am working on a Soundcloud XBMC add-on. The add-on is open source, and written in Python. I would like to allow users to login to their SoundCloud account via the add-on, however it's possible to have XBMC instances running in an environm

iOS Animate Dashed Rectangle Border

iOS Animate Dashed Rectangle Border

I have a UIImageView displaying an image. I want to "highlight" a portion of the image by drawing a rounded rectangle outline. I would like to have the outline drawn with a thick, dashed line that "animates" by continually varying where the

How to speed up python's 'turtle' function and stop it freezing at the end

How to speed up python's 'turtle' function and stop it freezing at the end

I have written a turtle program in python, but there are two problems.It goes way too slow for larger numbers, I was wonder how I can speed up turtle.It freezes after it finishes and when clicked on, says 'not responding'This is my code so

Android: When is OpenGL context destroyed?

Android: When is OpenGL context destroyed?

On android, the GLSurfaceView documentation says this: A GLSurfaceView must be notified when the activity is paused and resumed. GLSurfaceView clients are required to call onPause() when the activity pauses and onResume() when the acti

WPF Window with Style=None cover taskbar when Maximised after app initialization

WPF Window with Style=None cover taskbar when Maximised after app initialization

I want to achieve the same effect as Windows Media Player or Browser based Flash players which take up the ENTIRE (not even the taskbar is visible) real estate when maximized.This works fine if the WindowState is set to Maximized and the Wi

How do I use my .vimrc file in Cygwin?

How do I use my .vimrc file in Cygwin?

I just installed Cygwin on my work machine and would like to use the .vimrc file I use on my Linux box at home.Is that possible, or does it need to have Cygwin-specific settings?Where would I put the .vimrc file?I'm a little unsure of what

Add a notification icon at the status bar in BlackBerry JDE 4.5.0

Add a notification icon at the status bar in BlackBerry JDE 4.5.0

I'm writing a Java application in BlackBerry JDE 4.5 that will start listening for some event at the start up. I want to display a small icon at the status bar. I know its support in version 4.6.0 of the BlackBerry API set with ApplicationI

Print on terminal and into file simultaneously?

Print on terminal and into file simultaneously?

I have a shell script that greps some data.. I want to print the result into a file, but doing that prevents the result being displayed on the terminal. Is there a way that can both print the result on the screen and also write into a file.

How to control stereo-frames separately with C#? (NVIDIA 3D shutter glasses)

How to control stereo-frames separately with C#? (NVIDIA 3D shutter glasses)

I’m trying to make a very simple application which would display different images on each eye. I have Asus VG236H monitor and NVIDIA 3D Vision kit, the stereo 3D shutter glasses. The I’m using C#, .NET Framework 2.0, DirectX 9 (Managed Dire