simple

Simple text rendering on iPhone (NOT UIWebView)

Is there any SIMPLE way of rendering formatted text (from a char* buffer) to the display...? And I mean, simple.... In C or C++ or even Java, on nearly any platform, including embedded, you can get a pointer to a framebuffer or display and render simple text or pixels with 2 or 3, 5 max lines of code.... I have been looking in across ...

how can i format date or double values when persisting objects using simple xml

I am using simple xml framework from http://simple.sourceforge.net/. How can i format the date or double values? I see a function called transform but how do I apply it all double and date fields in my class? ...

How to simply read in input from stdin delimited by space or spaces

Hello I'm a trying to learn python, In C++ to read in string from stdin I simply do string str; while (cin>>str) do_something(str) but in python, I have to use line = raw_input() then x = line.split() then I have to loop through the list x to access each str to do_something(str) this seems like a lot of code just to get eac...

Invalid syntax error in simple Python-3 program

from TurtleWorld import * import math bob = Turtle() print(bob) draw_circle(turtle, r): d = r*2 c = d*math.pi degrees = 360/25 length = c // 25 for i in range(25): fd(turtle, length) rt(turtle, degrees) draw_circle(bob, 25) wait_for_user() The problem in on line 7: draw_circle(turtle, r): ...

Simple self-hosted website monitoring

Hi, I'm looking for a simple self hosted website monitoring tool. It should be somthing similar to watchmouse.com or pimgdom.com, with a nice UI, colorful charts and so on (Customers like that :)). At the moment we use Zabbix also for HTTP monitoring, but since now our hoster care about the hardware and software monitoring on the machi...

A very simple question about integrated jinja2 to pylons

I'm integrating jinja2 to pylons, I see in the document page there is: from jinja2 import Environment, PackageLoader config['pylons.app_globals'].jinja_env = Environment( loader=PackageLoader('yourapplication', 'templates') ) My question is: what should I use for yourapplication? Suppose my application is 'test', what should I wri...

Twitter integration iPhone app?

Hello, I am looking for a simple method to allow the user to share their score using Twitter. Originally I just opened a Twitter share URL in Mobile Safari to make the Tweet, however I can't seem to find a valid Twitter share URL. What would you suggest? Thanks. ...

Possible to only load specific lines of code according to Android OS version?

Is there a simple line of code that would allow only loading the code if the OS version meets the requirements? Lets say I have my target OS as 2.2 but the min sdk is 3 for android 1.5 so even if i have some code in my project that isn't compatable with 1.5 it will still compile since the target OS is 2.2. Anyway, I want to ad a featur...

perl xml parsing help

Hi All, I have a xml file like this <testcase> <sf_params> <dir>1</dir> <sfid>2</sfid> </sf_params> </testcase> I used xml::simple (perl parsing) and got the o/p as $VAR1 = { 'sf_params' => [ { 'sfid' => [ '2' ...

simple inheritence question

Suppose there is a business function you need to implement, which sets some kind of a profile. Depending on how data is received, however, setting profile will be implemented differently. For instance parameters may be passed directly to the object which would be able to setProfile(); or, parameters would have to be discovered and ...

simple install drupal in subfolder

This seems like it should be simplpe so if someone has a link that answers this I'll be happen with that and if this should be posted somewhere else please let me know. What I'm trying to do I am trying to install Drupal in a sub folder, and just have it work in the sub folder. www.example.com/drupal/ so when i go to www.example.com/dr...

Simple code I can add to onStop, to stop GPS activity?

Just like the title says, Is there a simple line of code I could add to onStop()that will simply stop any gps activity currently going on with my application? ...

Simple Javascript Slider

Im trying to find a very very simple javascript slider. One that is the bare minimum, no fancy jquery, or other libraries involved. The simplest possible slider. With the minimum amount of code possible. Thanks for the attention! @ Roger Walsh: Below the HTML code: The .js and the .css are identical to the example in the tutorial you...

Linker Error LNK2019

I have been playing around with Template functions, and made a little logger program. I have been trying to split this into header / source file, but I keep getting linker errors. I know this is simple, but I cant figure it out. Also I have some convince vars in the logger header, where would be the "proper" place for those? (logStart, ...

Is this right approach to write the code of strstr through pointers in c??

char* fstrstr(char *s1,char *s2) { int i=0,flag=0; char *s4,*s3; // s4 for retaining the value of s2 s4 = s2; while(*s1 != '\0' && *s2 != '\0') { if(*s1 == *s2) { *(s3+i) = *s1; s2++; s1++; i++; flag = 1; } else { ...

Simple Math Issue in C#

So i have this program that takes 3 scores out of a possible 200 each then is supposed to get the average and display the percentage. but when i input numbers i get 00.0 as an answer. What could i be doing wrong? using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { c...

complete beginner trying to create a flat file database in python

trying to keep it stupidly simple. Is it a bad idea to move a txt file into and out of a python list? the txt files will probably get to about 2-5k entries. what is the preferred method to create a simple flat file databse? ...

Suggestions for tiny CMS for programmers to set up and inexperienced users to use?

Once in a while, I get a request from a friend or family member who want me ("The IT guy") to set up a really simple web page for them, usually based on a free/cheap web design template. Does anyone have a recommendation on a choice of CMS? I have used Wordpress and CMS Made Simple earlier, but both interfaces are a bit advanced for the...

Simple C# Evernote API OAuth example or guide?

Anybody know where I can find a simple example C# code example? Apparently really tough to find. I'm just starting out, got my Developer key. Initial (really noob question/presumption) - -Can (should/must) my solution be a web service client? No new libraries I need to install in .Net right? Basically, as a test, I want to be able to...

Which database patterns (ORM, DAO, Active Record, etc.) to use for small/medium projects?

I writing real estate web site with basic function for choosing and ordering realty. It is small/simple project, but I want to write it in way, so in future I, or other developers, can turn it into medium business app without rewriting it from scratch. So what kind of patterns could you advice me to use for dealing with database? For...