coding

Recommendations for "Dynamic/interactive" debugging of functions in R ?

Hi all, When debugging a function I usually use library(debug) mtrace(FunctionName) FunctionName(...) And that works quite well for me. However, sometimes I am trying to debug a complex function that I don't know. In which case, I can find that inside that function there is another function that I would like to "go into" ("debug")...

Latest 5 posts from each category

Hello, What is the php code that I need to write to display the last 5 blog posts from each category on my wordpress blog? I only want to include the title of the blog post, date and name of author (no image from blog post). An example of exactly what I want to do is in this theme, under the name 'LATEST POSTS IN XXXXX CATEGORY' http...

Zoom out WebView on launch? Xcode x86_64 architecture

Hello, I'm building a Mac application for somebody, and it includes a WebView in it. I have already added the WebKit.framework, but for some reason, I just can't figure out how to zoom out on launch. I know where to put the code so it would do it on launch, but I don't know the code to zoom out. The page I'm viewing is too big for the We...

sending sms in hebrew

Hi Guys, I'm using sms1.cardboardfish.com to sens smses through the web. I have these datacoding schemes to work with: 0: Flash 1: Normal 2: Binary 4: UCS2 5: Flash UCS2 6: Flash GSM 7: Normal GSM and I want to send it in hebrew. right now I'm sending it in 7: Normal GSM and it comes out scrambled.. Ideas anyone? ...

Batch file run using PHP works but only displays last line

I have a batch file that displays a list of registry keys. 10000 20000 30000 40000 ..etc. Using PHP, I can display the output of the batch file: echo exec('file.bat'); This only shows me 40000 though, not the other three entries. How can I see everything? ...

Extract multiple lines of text from string PHP

I have a string of registry keys that looks like this: ThreatName REG_SZ c:\temp Protection Code REG_SZ a Check ThreatName REG_SZ c:\windows Protection I want to extract "c:\WHATEVER" from the string. It occurs multiple times between the words "ThreatName REG_SZ" and "Protection". How can I extract "c:\WHATEVER" multiple times using P...

We are unable to access Access Database file in read/write mode.

We are unable to access Access Database file in read/write mode through coding, I always have a read only file where writing/inserting my fetched data is impossible. How can I resolve this issue? Is there anyway I can solve this problem through coding or not? I really appreciate much needed help. ...

PHP Output Words Not In String

I have two strings: $string = shell_exec('reg.bat '.$arg); //returns word\0word\0word $stringA = "$string"; $stringB = "word,other,word2,other2"; $array1 = explode('\0', $stringA); $array2 = explode(',', $stringB); $result = array_diff($array1, $array2); I can use array_diff to find the differences, but the last word shows up as not i...

Would it be okay to learn Ruby On Rails?

I know HTML&Css, Little Javascript & Little PHP. I really want to get in the world of programming languages and I think Ruby looks way better then PHP. But I might be wrong. Should I stick learning PHP? Or should I go along with Ruby On Rails? ...

Do you have any personal visual clue in your code for other user and not the compiler ?

i use certain suffix in my variable name, a combination of an underscore and a property. such as : $variable_html = variable that will be parse in html code. $variable_str = string variable $variable_int = integer variable $variable_flo = float variable. Do you have other visual clues? Maybe something you write for variable, functi...

Unused 'using' directives are not shown as warning, any valid reason?

Unused 'using' directives are not shown as warning [C#], why is it so? Is there any valid reason on this? ...

How much coding does developer needs to know?

I have been working in web-development industry for over 7 years as a designer, tester, project manager, developer (in order of experience). I already have a degree in linguistics, but now I am going for Master's in CS, 'cause I found it rather difficult to find a job in the industry without having a CS degree. However I do not want to ...

How to keep code behind UI organized?

In my experience code behind UI can easily get ugly, and inorganized, e.g. long functions, lots of variables etc. How do you manage the code behind UI? ...

Looking for beginner Python project ideas to learn the language.

I've read through "Python for Dummies" and I'm ready to take the next step. I hear that practicing coding with the goal of creating something is the best way to learn. I'm a beginner in Python, and I'm looking for project ideas that I should attempt. I'm looking to learn web app programming, so any project that would teach me this area ...

Where shall I find Questions to be put up in a Coding contest?

Err....I guess this aint correct place to ask this question... But i couldn't find any place where i could get the desired coding problems, that i should put up in a Coding contest, which we are organizing as a part of our college function & I really want the Problems to be Advanced! ...

Snippet tool that is used in WWDC2010 videos

Does anyone know the code snippet tool that was used in some of the WWDC2010 videos? It seems that the the tool allows us to create snippets of code which can be labeled. This tool also allow us to click and drag the label to Xcode code editor window to paste the code with the formatting intact. Any lead on this tool/utility? ...

Any style guide for comments?

Hi guys, Do you know of a good style guide about coding? Particularly about how to comment code? In the last years I've seen the way you code and the naming conventions you use are very influenced by the language you use. Is that applicable for comments? I know there's not a unique way of doing things and, after all, comments are igno...

What is the preferred way to check for a Null pointer in C++?

Options A: if (NULL == pSomethingColumn) // Yes, we use Yoda conditions if (NULL != pSomethingColumn) Or if (pSomethingColumn) if (!pSomethingColumn) I am looking for references explaining the reasoning as well. I have heard some people say that technically NULL does not have to be defined as 0, but come on! if that was the case, ...

If you're a coder who develops products, what do you do to maintain quality?

Currently, I have to work on a product, consisting of php code, to be consumed by public. And because of the nature of the work, I have to make sure it works on various servers on configuration. What is the best way of coding the product? ...

Variable length encoding of an integer

Whats the best way of doing variable length encoding of an unsigned integer value in C# ? "The actual intent is to append a variable length encoded integer (bytes) to a file header." For ex: "Content-Length" - Http Header public string somefunction(int data) { //returns the binary format of the data byte as a string string data_...