Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Wednesday, August 3, 2016

Better Inoreader URL string for RSS subscriptions

Better Inoreader URL string for RSS subscriptions


If you use Inoreader (like I do) to subscribe to a huge variety of blogs/sites, you may not want to commit fully to subscribing. Maybe you just want to preview what a sites feed looks like. Get familiar with it, get some data on it, maybe star or tag an article or two, take it out for drinks, before committing. So maybe you want the choice of clicking that big beautiful "Subscribe" button in Inoreader without it automatically subscribing you first. Like this:

Inoreader in "dark theme" - feed auto-subscription vs. feed preview
If you look at that top image and go "ugh ??" but the bottom one makes you go "aah ?" then, like Avril Lavigne, Im with you.

If you use Firefox, or Chromes RSS Subscription Extension, you probably have set it up to use this URL string for handling feeds, which will get you the top picture: 

http://www.inoreader.com/?add_feed=%s

But this is annoying because it means you will be automatically subscribed. Hey maybe you like that. But if you only want the feed to appear in Inoreader without subscribing yet, like in the bottom picture, I prefer this string:

http://www.inoreader.com/feed/%s

Apologies for the sample feed used in the above images. It was the first thing that popped into my mind. Happy reading.


Get

Read more »

Thursday, July 28, 2016

Arduino Mega read string from Serial display on 3 2 480 x 320 TFT LCD Shield

Arduino Mega read string from Serial display on 3 2 480 x 320 TFT LCD Shield



Arduino example run on Mega 2560, read string from Serial port, and display on 3.2" 480 x 320 TFT LCD Shield usin UTFT library. The sting is limited to 30 characters on each line.


Mega_UTFT_SerialRead.ino
/*
* Example run on Arduino Mega 2560 to read string from Serial,
* then display on 3.2" 480 x 320 TFT LCD Shield
*
* http://arduino-er.blogspot.com/search/label/3.2%22%20480%20x%20320%20TFT%20LCD%20Shield
*/

#include <UTFT.h>

extern uint8_t BigFont[];

UTFT myGLCD(CTE32HR,38,39,40,41);

const int NumOfRow = 20;
const int HeightOfRow = 16;
const int CharPerRow = 30;

String buffer[NumOfRow];

void setup()
{
Serial.begin(57600);
myGLCD.InitLCD();
myGLCD.clrScr();

myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(0, 0, 0);

myGLCD.setFont(BigFont);

myGLCD.print("Open Serial Monitor,", LEFT, 0);
myGLCD.print("to enter something.", LEFT, HeightOfRow);

initBuffer();
}

void loop()
{
String stringIn = Serial.readStringUntil( );
Serial.print(".");
if(!stringIn.equals("")){
Serial.print("*");
String stringToIns = stringIn.substring(0, CharPerRow);
insert(stringToIns);
Serial.println(stringToIns);
printBuffer();
}

}

void initBuffer(){
for(int i=0; i<NumOfRow; i++){
buffer[i] = "";
}
}

void insert(String ins){
for(int i=0; i<NumOfRow-1; i++){
buffer[i] = buffer[i+1];
}
buffer[NumOfRow-1] = ins;
}

void printBuffer(){
myGLCD.clrScr();
for(int i=0; i<NumOfRow; i++){
myGLCD.print(buffer[i], LEFT, i*HeightOfRow);
}
}



Get

Read more »