soft (465)


Best word wrap algorithm?

Best word wrap algorithm?

Word wrap is one of the must-have features in a modern text editor. How word wrap be handled? What is the best algorithm for word-wrap? If text is several million lines, how can I make word-wrap very…


sql - What is the best way to implement soft deletion?

Working on a project at the moment and we have to implement soft deletion for the majority of users(user roles). We decided to add an "is_deleted='0'" field on each table in the database and set it t…


linux - Is there a way to check if there are symbolic links pointing to a directory?

I have a folder on my server to which I had a number of symbolic links pointing. I've since created a new folder and I want to change all those symbolic links to point to the new folder. I'd consider…


c# - Direct casting vs 'as' operator?

Consider the following code: void Handler(object o, EventArgs e){// I swear o is a string string s=(string)o;// 1//-OR- string s=o as string;// 2//-OR- string s=o.ToStri…


How do I tell if someone's faking a filetype?(PHP)

I'm programming something that allows users to store documents and pictures on a webserver, to be stored and retrieved later. When users upload files to my server, PHP tells me what filetype it is b…


unix - What is the difference between a symbolic link and a hard link?

Recently I was asked this during a job interview. I was honest and said I knew how a symbolic link behaves and how to create one, but do not understand the use of a hard link and how it differs from a…


How to deal with old, obsolete database data of a long running system?

What are the possibilities of a programmer to handle data that are rarely used but cannot be simply deleted because at least reporting still requires it? Some examples I am thinking of: Discountinue…


Soft hyphen in HTML(<wbr> vs. &shy;)

How do you solve the problem with soft hyphens on your web pages? In a text there can be long words which you might want to line break with a hyphen. But you do not want the hyphen to show if the whol…


Create a weak reference to an object

Is it possible in Actionscript 3 to create a weak reference to an object, so that it can be garbage collected. I'm creating some classes to make debugging easier, so I don't want the objects to hang…


What's the difference between SoftReference and WeakReference in Java?

What's the difference?…





android keyboard how edittext not when hide show example the