Best Case for Bubble Sort

I want to know what will be the best case for a bubble sort ? There may be a case wherein there may be no swapping for the say last 2 passes for example. I’m doing my program in C language. Suppose i have an array of 5 elements and i give the elements as … Read more

Error “File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it”

You need to get the configuration file from the developer’s site and paste it in the app level directory of your project. Update: Goto https://console.firebase.google.com/ Select your project On the left menu, click on settings > project settings Add an app or download the google-services.json file under the Your Apps section.

How to debug ‘Stack smashing detected’?

If you read the website you will realize that this is a simple C++ wrapper over a C library. A typical issue with C library are buffer overruns: Try this program: Because the buffer can only contain 16 characters, the remaining characters will be written past its end. This is stack smashing, and undefined behavior. A number … Read more

Explain __dict__ attribute

 am really confused about the __dict__ attribute. I have searched a lot but still I am not sure about the output. Could someone explain the use of this attribute from zero, in cases when it is used in a object, a class, or a function?

what does Dead Code mean under Eclipse IDE Problems Section

In Eclipse, “dead code” is code that will never be executed. Usually it’s in a conditional branch that logically will never be entered. A trivial example would be the following: It’s not an error, because it’s still valid java, but it’s a useful warning, especially if the logical conditions are complex, and where it may … Read more

Installing jQuery?

Get jQuery up and running in a minute or less: Insert this into your HTML (most commonly in the head, but you can throw it before the end body tag too): Then place a script element after your jQuery one. This would alert ‘hello’ after the DOM is ready. Read the documentation. Using jQuery locally: After … Read more

Create a new database with MySQL Workbench

Launch MySQL Workbench. On the left pane of the welcome window, choose a database to connect to under “Open Connection to Start Querying”. The query window will open. On its left pane, there is a section titled “Object Browser”, which shows the list of databases. (Side note: The terms “schema” and “database” are synonymous in … Read more