code

Android XMLRPC Fault Code

Hey, We have been using XMLRPC for android and it was working well until we got our hands dirty with Base64 encoding for byte[] (images) -- (we did base64_string.replace("/","$$") for transmission). We have tried undoing the changes and its looking like an XMLRPC error. We are getting the following error in the DDMS: 06-10 23:27:02.97...

What's the Unicode code point for [ \u8D27 ] ?

I want to find out if a Chinese character can be displayed, the unidode for it is "\u8D27", how to use the Java Font method canDisplay ? It takes an int, but "8D27" is not an integer, how does it work, do I need another method to translate "8D27" to an int then use canDisplay ? If so how to translate it ? Edit : To be more precise, how ...

php: how to return an HTTP 500 code on any error, no matter what

Hi guys. I'm writing an authentication script in PHP, to be called as an API, that needs to return 200 only in the case that it approves the request, and 403 (Forbidden) or 500 otherwise. The problem I'm running into is that php returns 200 in the case of error conditions, outputting the error as html instead. How can I make absolutel...

Testing your code before releasing to QA

I have heard developers say that people who write code should not be the ones testing it. I am looking for peoples experience in this situation. Many times I have done my share of development, then released to the QA dept and had the code sent back to me becuase some aspect of the application was broken due to my coding, regardless of ho...

similar_text() , php, how to show what text it is finding that is similar

I am experimenting with finding similar text between a string and an online article. I am playing with similar_text() in php that shows the percentage a string matches. But I am trying to figure out how to echo out what similar_text() is finding that is similar. Is there any way to do this? Here is a sample of what I am trying to do: ...

Ideas for decorating a property on a generated class?

Hello. I am generating a class that contains MANY properties on it (around 150) using the CodeDOM API. This class is basically an object that represents a row found in an Excel worksheet. The code for generation investigates the target worksheet, extracts the header row based on user-input, and generates the row class. Additionally...

What's the fundamental of computing?

I’d like to know about the computer science. Is that a science or art ?Then what about the Information Technology ? What can be computed and What cannot be computed ? and I'd like to know about the Legal java code. ...

Weird bug , PHP code get prints in browser screen instead execution .

I am making some code , But it is so strange that code just get prints on screen , I am not able to find any reason of it. Please help me out of this, rest of the code is working fine. Thanks ...

Looking for single file telnet server to hack into application

Hi, I've been looking for some very simple to lift and simple telnet source code to build into an application I am working on. I have looked at some traditional Linux applications of this and they are build and they are overkill, comprised of about 20 files, and have way too many dependencies. I just want simple, and (NO) I do not ca...

Tools to detect duplicated code (Java)

I am in a project where previous programmers have been copy-pasting codes all over the place. These codes are actually identical (or very similar) and they could have been refactored into one. I have spent countless hours refactoring these codes manually but I think there must be a better way. Some are very trivial static methods that c...

Retrieve method/code from many files

I have many .cs files and I want to retrieve the method behind the [AcceptVerbs(HttpVerbs.Post)] attribute from these files automatically. so input is: [AcceptVerbs(HttpVerbs.Post)] public ActionResult sample(string msg) {......} and output is: public ActionResult sample(string msg) {......} My idea is use the RegularExpressions a...

Code metrics of php - Notepad++

Hello! In particular, I am interested to know how many lines of codes there are, but this spans across many files. I have been using notepad++ to author the code and for each file it does display line numbers but of course I have empty returns to make the code more readable. Does anyone know of a plugin or tool that I can accurately g...

Facebook Graph API: What is error code 506

While posting to Facebook through the Graph API, I get GraphAPIError: (#506) Duplicate status message. Where is the documentation for this? I've checked http://wiki.developers.facebook.com/index.php/Error_codes and it is not listed. I can guess that it has something to do with duplicate posts but what are the exact specs for causing this...

Need a better code for this Ajax code

Hi all, Is there another code or a better one for this code: window.onload = refresh(); function refresh() { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="mypage.php" xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true) xmlHttp.send(null) } fun...

NetBeans jQuery plugin code completion

I'm using NetBeans for PHP. When I edit a .js file, it gives me JavaScript code completion. How can I get it to also give me jQuery code completion? NetBeans 6.9 code auto-complete is not working for jQuery plug-ins. The code auto-complete is working for jQuery but not for plug-ins such as the validate plugin. Is this a bug in NetBean...

How many gumballs in the jar. 2 errors

Trying to code a guess how many gumballs in the gumballs jar, kinda thing. There are two problems I keep getting: It's supposed to say if the guess is to high or to low but that only happens when i enter a number over 1000 and it says: Enter your guess: 1001 Too High! Too Low! Enter your guess: If you type a letter or phrase it go...

C++ libcurl http response code issues

Hello everyone, This issue/quirk/side-effect is driving me crazy. Near the bottom the code, the response code of the HTTP interaction is passed by reference into responseCode_. However it often comes out as 0 even though the site can otherwise be accessed, and returns too quickly to be a timeout... All variables are defined, the code b...

CRC-CCITT (XModem) implementation in javascript

Hi, i'm trying to implement a CRC-CCITT (XModem) check in javascript without success. I need it in order to send socket string into a controller via RS232. does anyone know how to do it? or perhaps is there a sample code somewhere?? I would appreciate any kind of help :) ...

What does the SQL # symbol mean and how is it used?

Can someone please explain to me what the # symbol means in MS SQL Code. I've tried Googling it, and even searching on StackOverflow, but can't seem to find the answer. I feel like an idiot - having one of "those" days. Please help. ...

JAR files - source code?

First of all, I'm not a Java developer. I don't know much about it. Your help is needed, Java pros! I've received source code for a Java product (actually a customized version of LimeWire) to make further changes. The archive contains a bunch of JAR files. Is it sufficient for developing the application, or those files for distribution ...