Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- BUBBLE SORT



  Sort an array with only one local variable

Array sorting algorithm question is frequently asked during technical interviews. There are lots of sort algorithms including bubble sort, selection sort, insertion sort, quick sort, merge sort etc. Usually interviewees will be asked to implement sort algorithms. But have you ever been asked to sort an array which you are allowed to define ONLY ONE local variable in your algorithm?  Bubble sort can be used to do this actually. Normally a bubble sort algorithm may need three local ...

   JAVASCRIPT,ALGORITHM,SORTING,BUBBLE SORT     2016-10-07 09:46:49

  Introduction to GoLang generics and advanced usage

Generics in Go allow you to write code that can work with multiple types of data, without having to write separate versions of the code for each type. This can make your code more flexible and easier to maintain, as you only need to write and test the code once, rather than maintaining multiple versions. To use generics in Go, you first need to define a type parameter, which is a placeholder for the type that the code will work with. For example, you might define a type parameter called "T" like...

   GOLANG,GENERICS     2022-12-17 05:12:21

  JavaScript: It's a Language, Not a Community

There's nothing like jsconf for bringing out the meta! Since the conference ended two blog posts have created a lot of buzz, at least within my own twitter bubble. First, Rebecca Murphey's JavaScript: It's a Language, Not a Religion. I take Rebecca's post as a cautionary tale about the dangers of hero-worship and the tendency to assume that the people we respect in one sphere share our views in other spheres. I bring it up here not because I want to discuss the content of her post but b...

   JavaScript,Language,Community     2012-04-07 10:37:40

  11 CSS Button Solutions

BonBon ButtonsZardiCSS3 Buttons With Simple MarkupFancy Buttons10 Nice CSS3 ButtonsCSS3 Animated Bubble ButtonsSuper Awesome Buttons with CSS3 and RGBAPretty CSS3 ButtonsGitHub-Style CSS3 ButtonsWe Love ButtonsSexy ButtonsRealistic CSS3 ButtonsSource:http://sd.csdn.net/a/20110513/297781.html...

   CSS,Button,Style,Solution     2011-05-14 01:29:10

  User experience distance

Good user experience can narrow the gap between product and users, it can also improve the user efficiency and increase satisfaction and comfort of users. Here we talk about user experience distance with different examples: 1. Floating bubble layer When users need to delete one picture,they click on the "Delete" button, then the floating bubble layer appears to prompt the user to confirm the deletion, users only need to focus on the picture which reduces the visual burden, and also no need to mo...

   User experience, Design,Detail     2012-12-20 13:20:16

  37 powerful Linux shell commands

To work on Linux platform, you cannot avoid using shell commands to complete some tasks. These tasks can be as simple as list files in some directories or find some text in some file, or can be as complex as monitoring processes. In this post, we will share 37 powerful Linux shell commands.   Task Commands 1 Delete file with 0 byte(empty file) find . -type f -size 0 -exec rm -rf {} \;find . type f -size 0 -delete 2 Check process memory consumption ps -e -o "%C : %p : %z : %a"|sort -k...

   Linux command,List     2013-09-16 07:47:16

  Advanced event registration models

On this page I explain the two advanced event registration models: W3C’s and Microsoft’s. Since neither is cross–browser supported, their use is, for the moment, deprecated. W3C and Microsoft have both developed their own event registration model to replace Netscape’s traditional model. Though I’m not impressed by the Microsoft model, W3C’s is very good, except for one crucial vagueness. Unfortunately few browsers support it at the moment. W3C W3Cââ‚...

   JavaScript,Event model,this,bubble,capturing     2011-12-27 09:20:44

  Comparable and comparator in Java

Comparable and comparator are two similar interfaces used to compare objects in Java. When we want to sort a list of objects such as Employee or User etc, we may need to implement these interfaces to make them comparable as we want. However, there are some differences between comparable and comparator interface.ComparableA comparable object is capable of comparing itself with another object. The class itself must implements the java.lang.Comparable interface in order to be able to compare its in...

   Java,Comparable,Comparator,Sort     2012-07-04 12:06:15

  Understanding GoLang interface

If goroutine and channel are considered as the foundation for GoLang concurrency, interface would be the key for data types in GoLang. In practical Go programming, almost all data types are built/used around interfaces, interface is the core of GoLang data structures. Go is not a typical OOP language, it has no class and inheritance concept syntactically. But it doesn't mean that there cannot be polymorphism in GoLang. Because of interface, it achieves the same polymorphism effect as in C++, tho...

   INTERFACE,GOLANG     2021-05-15 04:16:42

  The Value of the Designer Who Codes

"Well, it's a start, but basically it stinks," said Steve Jobs, telling early Apple engineer Chris Espinosa exactly how he felt about the company's first calculator application. Iteration after iteration, Jobs continued to be dissatisfied with the calculator. Espinosa continued to code, slowly inching his way to perfection. But nothing was quite right. In a flash of both brilliance and perhaps frustration, Espinosa put together a visual builder that let Jobs design the calculator himself...

   Designer,Coder,Value,Designer knows code     2012-01-03 10:49:39