coding

Does this function have too many parameters?

In the end, I got this function. I don't know whether it's normal or not. function user_registration($user_name, $user_email , $user_pass , $address , $city , $postalcode , $country , $phone , $mobilephone) How and why can I improve this? ...

PHP code for excluding adsense from a certain page?

Hello, How can I prevent adsense ads to show up on a certain page? You see, I would like to exclude adsense from displaying on the About Us page on this website, but I'm not sure how to go about doing it... I just had a look at my index.php file and noticed that it contained the following line of code: <div><?php echo show_ad_camp_1()...

How to name variables on the fly in R?

Is it possible to create new variable names on the fly? I'd like to read data frames from a list into new variables with numbers at the end. Something like orca1, orca2, orca3... If I try something like paste("orca",i,sep="")=list_name[[i]] I get this error target of assignment expands to non-language object Is there another way ...

I need to add ranges and if a range is missed while adding i should display a message

EXAMPLE :if i add a range {1,10} and another range{15,20} i should get a message saying the ranges from 11 to 14 are missing. ...

Coding Dojo exercises

With Coding Dojo you have the possibility to solve an isolated task with clear requirements in an agile and easy environment. In one session a mix of software engineers with different experience should participate. You and your team members can work together and benefit from each other because every participant has another point of view ...

Best standards for declaring variable in php

can any one please let me know the global declaration of php variables..i have seen one among the site like.. for integer start with i, eg: $iItemId for array start with a, eg: $aItemIds for string start with s, eg: $sItemName ...

Idea of developing "Calendar" from scratch

What's the broad math idea behind the calendar if you need to build one from scratch without depending on OS or other libraries ? ...

what is middleware exactly?

I hear a lot of people talking last days about middleware, but what is the exact definition of middleware. If I look in information about middleware I found a lot of information and some definitions, but while reading this information and defintions it seems that mostly all 'wares' are in the middle of something. So from my opinion all t...

PHP coding in real world !!! do I need to learn any Framework???

I know how to write program in PHP and implementation of MVC model. but I really want to practice coding like the coding in real world??? I was wondering is there any specific example or book which can show me the tricks or logic and the way professional programmers consider about coding??? Do I need to learn frameworks like Zend ??? ...

how to tackle a new project

Hi, I have a question about best practice on how to tackle a new project, any project. When starting a new project how do you go about tackling the project, do you split it into sections, start writing code, draw up flow diagrams. I'm asking this question because I'm looking for advice on how I can start new projects so I can get going...

Coding style in .NET: whether to refactor into new method or not?

Hi As you aware, in .NET code-behind style, we already use a lot of function to accommodate those _Click function, _SelectedIndexChanged function etc etc. In our team there are some developer that make a function in the middle of .NET function, for example: public void Button_Click(object sender, EventArgs e) { some logic here.. ...

Textmate tab and de-tab selected block

Recently switched to Textmate on Mac for coding. On PC when ever I want to tab in or out a block of code I just highlight and press tab or shift+tab to move it in our out. It's very useful when you are adding an extra loop or conditional statement to a block of code to keep everything tidy and neatly indented. On Textmate however when...

C++ coding standards

Possible Duplicates: C And C++ Coding Standards What existing style and coding standard documents should be used on a C++ project? How to acheive coding standards in C++? Any reference books? ...

Mac os x systems programmng and bsd

Hi all I'd like to get into some mac os x systems programming and wondered, although mac os x is a Mach and bsd hybrid, would a bsd programming book suffice since I can't seem to find any books on mac os x systems level coding (or mac os x architecture)? Any pointers would be much appreciated. Thanks ste ...

Reed-Solomon encoder for embedded application (memory-efficient)

Hi I am looking for a very memory-efficient (like max. 500 bytes of memory for lookup tables etc.) implementation of a Reed-Solomon encoder for use in an embedded application? I am interested in coding blocks of 10 bytes with 5 bytes of parity. Speed is of little importance. Do you know any freely available implementations that I can ...

PHP Editor that able to trace dependency of all function in a file with models/controllers or another part of a framework (or something we had code)

hello a friend of mind ask something about php editor for his companion on coding. PHP Editor that able to trace dependency of all function in a file with models/controllers or another part of a framework (or something we had code). Basicly we use notepad++ but seeking another alternative. ...

Can I assign a object to a integer variable?

Let say I have a object. I'm assigning that to an integer. MyClass obj1 = 100;//Not valid Let's say, I have a parameterized constructor which accepts an integer. MyClass(int Num) { // .. do whatever.. } MyClass obj1 = 100;//Now, its valid Likewise on any circumstance, does the vice-versa becomes valid?!. eg) int Number = obj...

Hamming distance and error detection/correction properties.

Hi guys, Let's assume I want to have a possibility of detecting 4-bit errors and recovering 2-bit errors. What the Hamming distance should be then? I wonder if it should be d = Max{2r+1, r+1} or d = s + r, where s is 4 and r is 2? Thanks in advance for the reply! Cheers ...

Neural networks, how do they look in coding?

Basically i know the concept of a neural network and what it is, but i can't figure out how it looks when you code it or how do you store the data, i went through many tutorials that i found on google but couldn't find any piece of code, just concepts and algorithms. Can anyone give me a piece of code of a simple neural network somethin...

Is there anything that prevents this form of use of XOR test?

Is there anything that prevents this form of use of XOR test? bool result = false; bool b1 = false; bool b2 = false; ... if ( b1 ^ b2 ) { result = true; } ...