basics

Jquery slide down div after an item fades in

Hey guys, this is my jquery code jQuery(document).ready(function(){ jQuery('.start_video').click(function(){ jQuery(this).fadeOut("slow", function(){ jQuery('#video').animate({ opacity: 'show' }, "slow"); jQuery('#video_stream').animate({slideDown: 'slow' },...

Reading Recommendations To Learn Basics Of C

I'm now really diving into my OS project, called ForestOS, but now I'm needing to dive more into some simple and basic things of C. As now I'm having many problems with the correct variable to use and functions. I want resources that only talk about variables, functions and how to develop without headers(stdio.h, math.h and all the othe...

In what order are Java class variables initialised?

I came across these questions recently, and could not find the answer on StackOverflow; In what order are Java class variables initialised? And the somewhat related question, could re-ordering the variables change class behaviour? Why? As suggested on Meta I will be posting my answer to this question. ...

When to use blocks

I love Ruby blocks! The idea behind them is just very very neat and convenient. I have just looked back over my code from the past week or so, which is basically every single ruby function I ever have written, and I have noticed that not a single one of them returns a value! Instead of returning values, I always use a block to pass the ...

how to remove all instances of an element from a list in python

lets say I have a=[[1,1],[2,2],[1,1],[3,3],[1,1]] is there a function that remove all instances of [1,1] thanks ...

Needing a design pattern/example link for iPhone network connections

I'm sorry if this is a basic question. I've been googling, searching StackOverflow, and looking through example code for hours and haven't found anything satisfactory for my skill level. I'm wanting something like a design pattern for handling network functions on the iPhone SDK. I have heard of people using a singleton class but have h...

How to Trigger the soft keyboard?

How can I trigger the software keyboard and add listeners to it's keys? ...

Storing function pointers

The following uses a simple function pointer, but what if I want to store that function pointer? In that case, what would the variable declaration look like? #include <iostream> #include <vector> using namespace std; double operation(double (*functocall)(double), double wsum); double get_unipolar(double); double get_bipolar(double); ...

How to capture Audio data in Java

I want to access the audio data that my microphone is recording with Java. How would I do that? My goal is to save the audio data that is recorded and simultaneously play it to the user. ...

Can the terms 'variable' and 'field' be used interchangeably in java?

While studying java with several books, none of them seem to make it clear when to use which term. Right now I understand it as follows: Variables are defined within a method, while fields are part of a class. ...

Python basics: How to read N ints until '\n' is found in stdin

Hey this is a really quick question. I guess I'll give correct answer in less than 2 minutes after posting this question. I've started learning python, like 5 minutes ago, so mind the stupidity of the question. To test it I'm re-writing some algorithms i had. Could someone tell me how can I read N ints from the input, and stop readin...

Is ADO.NET the only native way to access databases in .net?

I have used code like this: http://msdn.microsoft.com/en-us/library/dw70f090.aspx to access database before when working in ASP.NET (2-3 years ago). I didn't realize I was working with ADO.NET. I am just a bit confused...is there another way data in a database can be accessed? How else would you do it? ...

iphone basic release question

Hi, When i add a new subview, i cant immediately release the controller after displaying. How should i release this viewController? I was thinking about using a property for the viewController, and use delegation to notify for removing the view and releasing it? Is this the best way to do it? or should i do something with autorelease?...

Comparing a variable to multiple values

Quite often in my code I need to compare a variable to several values : if ( type == BillType.Bill || type == BillType.Payment || type == BillType.Receipt ) { // Do stuff } I keep on thinking I can do : if ( type in ( BillType.Bill, BillType.Payment, BillType.Receipt ) ) { // Do stuff } But of course thats SQL that allows this...

How do I write outputs to the Log in Android?

I want to write some debugging output to the log to review it with logcat. If I write something to System.out this is already displayed in logcat. What is the clean way to write to the log and add levels and tags to my output? ...

Can I use assert on Android devices?

I want to use the assert keyword in my android apps to destroy my app in some cases on the emulator, or my device during testing. Is this possible? It seems that the emulator just ignores my asserts. ...

Widget -what to do and what not

I would like to make a html/js widget that people can add to their blogs, sites etc. I have never made widgets before so I would like to hear what should be done and what not. For example, how do I make the styling? Inline, own css file or what is the best practise? I believe i cant use head and body stuff in it. What about h1, h2 etc? ...

How to Display a keyboard in an Android Application?

Any one please help me to display a keyboard in my app. I want to show my keyboard when i click on the textfield ...

How to package and access extra files inside my apk

I have some data files that I need to install together with my application on the emulator for easy testing my app on a device. Where can I put files in a way that Eclipse will include them into my apk and how can I access those files after my application is installed on the device? ...

how to provide html/js widget for users

Hello, How can I share html/js widget? Javascript, iframe or what way is good? Now I have html page, css file and js file. I want to share this widget with people so they can attach it to their blogs, websites etc. ...