Search for colon in Topics

Will a Prune Juice Laxative help with my constipation or is it just a myth?

A lot of people are aware that the health of our digestive tracks or particularly the large intestine commonly known as colon have adverse effects on the health of our whole body, not only physical health but also mental health. When our colon is unhealthy or diseased and full of toxins, this toxins enters our bloodstream through the process of intoxication. When our bloodstream becomes dirty it also affects the brain. Commonly we experience mood swing. Another tangible effect of this unhealthy condition called constipation or the hardening of stool due to inadequate digestion or lack of it. With this said, you may wonder what are my best herbal and natural remedy for cleansing the inside of my body and avoid if not irradicate this condition of constipation? One very good natural remedy is eating of Prunes. A Prune is a variety of plums. Prune juice is made by steaming prunes until it is softened and pureeing then juice is squeezed out. Prune juice contain a natural laxative known as isatin. Prune juice is high in insoluble fiber. Each prune fruit contains 6% of dietary fiber. Prune juice is good remedy for constipation. It is also high in anti oxidant. Visit for more info

Topic by MucusInStool    |  last reply

use for intestine veiwing camera

My husband is getting ready to have a procedure done where he swallows a pill sized camera that moves through his digestive system taking pictures, then passes from the body. I know it sounds disgusting, but I keep wondering if there is a way to use the camera after it's been passed.If it passes before he eats anything, it shouldn't come in contact with any body waste and can easily be disinfected. It just seems like such a waste to just flush the little camera down the toilet

Topic by dulciquilt    |  last reply

DIY Colonic set up questions about safety?

So I've been wanting to get a colonic and there isn't anywhere to do it where I am. I decided to build myself a really cheap system to try it out right now. I got a Rubbermaid 7 gallon plastic box to hold the water, a (vinyl?) shower head hose, and some enema tips and gorilla glued the tube into the bottom of the box (trying not to get the glue inside the box where the water would be) and the other side to the tip (also trying to avoid getting glue where water would flow). The question is in whether or not this is safe (with the vinyl tubing and gorilla glue part). I plan to try it out the day after tomorrow but I figured I'd see if anyone else tried this or knows.

Question by remmy5    |  last reply

Image note bug solution

As far as I have noticed, the bug is activated when a colon is in the text. I had errors many times when making image notes - and I tested in three different browsers (where the error just looked different). But only in texts that included a colon. Each time I removed colon from text: no error. It might be the same for other special characters. Hope it helps :)

Topic by Jakob R  

Punctuation in Instructables editor.

I'm using a UK mapped keyboard and FireFox and find that I get a couple of problems when posting certain characters. The 'Pound' symbol shows in the thread with a circumflexed 'A' before it, and colons and semi-colons have a circumflexed 'A' after them. Is there a way of getting these characters in so they display correctly? Examples £ : ;

Topic by AndyGadget    |  last reply

Possibility of "gravity chamber" becoming a reality

I used to watch the show  "Dragon Ball Z" when I was younger, on some of the episodes there was a gravity chamber which would increase the gravity in the room. It would go up to 450G (1G= 1 times the Earth's gravity) I know this is completely impossible but could a device like this even exist and if it did would make it to 2G's? Before you respond I know this is just a show and not reality. If this did work this would help athletes train and astronauts (if and when the moon is colonized)

Topic by crc09    |  last reply

In need of dier help for school

Ok i'm in a high school engineering class and the first assignment of the year is to interview a engineer. which is great sounds like a lot of fun but i don't know any one with an engineering background witch makes this rather difficult so the next thing that came to my mind was wait why don't i try the most amassing web sight on earth to see if any one was willing to help me and so i'm trying to find some one thats an engineer and is willing to answer about 14 questions so if any one would help i would really appreciate it and When my people come to colonize this planet, you will be on the protected rolls, and no harm will come to you :) 

Topic by isleftofright    |  last reply

Hispanic or Latino?

I cringe everytime someone uses the word Latino when generically speaking of Spanish-speaking people. I prefer to be called Spanish or Hispanic. Some people may disagree with me but I think that calling me a Hispanic describes my true ethnical and cultural origin. Although many people will bring the fact that the colonization of America by the Spanish conquerors was bloody and opressive, we still owe to Spain the origin of our countries. From Mexico to Patagonia and the Large Antilles, the Spanish conquistadores left their footprint in the form of language, architecture, religion, cooking, stories, art, crafts and culture. In contrast, a Latino is anyone who descends from people that speak a Romance language like: French, Italian, Portuguese, Spanish and Romanian. By that definition, when we speak of Latin America we include countries like Brasil, Haiti, French Guyana and, Surinam. The same definition could apply to Italian-Americans, French-Americans, French-Canadians, and Cajun people.

Topic by blkhawk    |  last reply

Arduino Countdown timer code problem?

I was using the Crazy Countdown Timer as a base for yet another project and I seem to have hit a dead end with the code. I have taken an input (A3) that used to speed up the countdown time and tried to change the function to add five minutes to the remaining time. I have tried various methods and the results have not been the best. From setting the total time to 5 minutes to it's current state of not doing anything at all, I have limited knowledge of the coding and would appreciate some help if you would be so kind. Thanks in advance :-) The code so far is /*   Arduino clock on a standard 4-digit clock display   Uses a Liteon LTC-617D1G clock display Connections: LTC - Arduino 1 - nc 2 - nc 3 - nc 4 - d7 5 - d3 6 - d2 7 - d11 8 - d10 9 - d4 10 - gnd 22 - d9 23 - d5 24 - d6 25 - A0  // because d13 already has a built-in LED getting in the way 26 - d8 27 - d12 28 - A1 29 - gnd button: 5v - button - A5 - 10k resistor - gnd crazy wires: 5v - red jumper wire - A4 - 10k resistor - gnd 5v - blue jumper wire - A3 - 10k resistor - gnd 5v - yellow jumper wire - A2 - 10k resistor - gnd Action: pin D13 is already hooked up to an LED */ #define DIGIT1 2 #define DIGIT2 3 #define DIGIT3 5 #define DIGIT4 6 #define SEGMENTA 7 #define SEGMENTB 8 #define SEGMENTC 9 #define SEGMENTD 10 #define SEGMENTE 11 #define SEGMENTF 12 #define SEGMENTG A0 #define COLON 4 #define AMPM A1 #define BUTTON A5 #define STOPWIRE  A2 #define PLUSFIVE A3 #define ZEROWIRE  A4 #define ACTION 13 #define ON  HIGH #define OFF LOW #define DELAYTIME 50 int FiveState;             // the current FiveRead from the input pin int lastFiveState = LOW;   // the previous FiveRead from the input pin long FivelastDebounceTime = 0;  // the last time the output pin was toggled long FiveDebounceDelay = 50;    // the debounce time; increase if the output flickers unsigned short hours, minutes, seconds; unsigned long lastTime; // keeps track of when the previous second happened int buttonState;             // the current reading from the button pin int lastButtonState = LOW;   // the previous reading from the button pin unsigned long button_down_start = 0; // how long the button was held down unsigned long lastDebounceTime = 0;  // the last time the output pin was toggled unsigned long debounceDelay = 50;    // the debounce time byte flash;    // indicates when display should be flashing byte flash_on; // indicates that display is current in "on" part of a flash byte timer_stopped; // indicates that the timer is not counting down #define ONE_SECOND 1000 #define FLASH_TIME 100 // 10 times as fast unsigned long time_chunk; void setup() {   // Serial.begin(9600);     // initialize all the required pins as output.   pinMode(DIGIT1, OUTPUT);   pinMode(DIGIT2, OUTPUT);   pinMode(DIGIT3, OUTPUT);   pinMode(DIGIT4, OUTPUT);   pinMode(SEGMENTA, OUTPUT);   pinMode(SEGMENTB, OUTPUT);   pinMode(SEGMENTC, OUTPUT);   pinMode(SEGMENTD, OUTPUT);   pinMode(SEGMENTE, OUTPUT);   pinMode(SEGMENTF, OUTPUT);   pinMode(SEGMENTG, OUTPUT);   pinMode(COLON, OUTPUT);   pinMode(AMPM, OUTPUT);     // button is input   pinMode(BUTTON, INPUT);     // wires are inputs   pinMode(STOPWIRE, INPUT);   pinMode(PLUSFIVE, INPUT);   pinMode(ZEROWIRE, INPUT);     // the action is output   pinMode(ACTION, OUTPUT);     // set the initial time   hours = 0;   minutes = 25;   seconds = 00;   flash = 0;   flash_on = 0;   timer_stopped = 0;   time_chunk = ONE_SECOND;   lastTime = millis(); } void loop() {     // Keep showing the display while waiting for timer to expire    while (millis() - lastTime < time_chunk) {             if (!flash || flash_on) {             if (hours > 0) {         clock_show_time(hours, minutes);             // and blink the colon every even second         if (seconds % 2 == 0) {           clock_show_colon();         }       }       else {         clock_show_time(minutes, seconds);         clock_show_colon(); // show a steady colon       }           }         // check the crazy wires         if (digitalRead(STOPWIRE) == HIGH) {  // stops time       timer_stopped = true;     }     else {       timer_stopped = false;     }     /*     if (digitalRead(SPEEDWIRE) == HIGH) { // speeds up the time and flashes display       flash = 1;       time_chunk = FLASH_TIME;     }     */          // read the state of the switch into a local variable:   int FiveRead = digitalRead(PLUSFIVE);   // check to see if you just pressed the button   // (i.e. the input went from LOW to HIGH),  and you've waited   // long enough since the last press to ignore any noise:    // If the switch changed, due to noise or pressing:   if (FiveRead != lastFiveState) {     // reset the debouncing timer     FivelastDebounceTime = millis();   }     if ((millis() - FivelastDebounceTime) > FiveDebounceDelay) {     // whatever the FiveRead is at, it's been there for longer     // than the debounce delay, so take it as the actual current state:     // if the button state has changed:     if (FiveRead != FiveState) {       FiveState = FiveRead;       // only toggle the LED if the new button state is HIGH       if (FiveState == HIGH) {         minutes += 5;       if (minutes > 59) minutes = 59;           }                     // button has been pressed           incrementTime();         }     // save the FiveRead.  Next time through the loop,   // it'll be the lastFiveState:   lastFiveState = FiveRead;    }        if (digitalRead(ZEROWIRE) == HIGH) {  // sets time to zero       hours = 0;       minutes = 0;       seconds = 0;       time_chunk = FLASH_TIME;     }         // button presses increase minutes     int reading = digitalRead(BUTTON);      // If the switch changed, due to noise or pressing:     if (reading != lastButtonState) {       // reset the debouncing timer       lastDebounceTime = millis();     }         if ((millis() - lastDebounceTime) > debounceDelay) {       // whatever the reading is at, it's been there for longer       // than the debounce delay, so take it as the actual current state:             if (buttonState != reading) {         button_down_start = millis(); // record the start of the current button state       }             buttonState = reading;             // buttonState is now either on or off       if (buttonState == HIGH) {         flash = 0; // takes it out of panic mode         digitalWrite(ACTION, OFF); // turns the action OFF.         time_chunk = ONE_SECOND; // reset to regular time counting.                   // slow it down by only doing this every 10th millisecond         if ((millis() % 10) == 0) {           // if the button was held down more than 5 seconds, make it go faster           if ((millis() - button_down_start) > 5000) {             seconds += 10;             if (seconds > 59) seconds = 59;           }                     // button has been pressed           incrementTime();         }       }     }     lastButtonState = reading;   }   lastTime += time_chunk;     if (!timer_stopped) {     decrementTime();   }     if (flash) {     flash_on = !flash_on;   } } // // a call to decrementTime decreases time by one second. // void decrementTime() {       if (seconds == 0) {               if (minutes == 0) {                   if (hours == 0) {                      // time is at 00:00, flash the zeroes             flash = 1;             time_chunk = FLASH_TIME;                               // and do the action             do_action();           }           else {             minutes = 59;             hours--;           }         }         else {           seconds = 59;           minutes--;         }               }       else {         seconds--;        } } // // a call to incrementTime increases time by one second. // void incrementTime() {     if (seconds == 59) {     seconds = 0;         if (minutes == 59) {       minutes = 0;             if (hours == 12) {                  hours = 1;       }       else {         hours++;       }     }     else {       minutes++;     }   }   else {     seconds++;    } } // // clock_show_time - displays the given time on the clock display //   Note that instead of hr/min the user can also send min/sec //   Maximum hr is 99, Maximum min is 59, and minimum is 0 for both (it's unsigned, heh). // void clock_show_time(unsigned short hours, unsigned short minutes) {   unsigned short i;   unsigned short delaytime;   unsigned short num_leds[10] = { 6, 2, 5, 5, 4, 5, 6, 3, 7, 6 };   unsigned short digit[4];   unsigned short hide_leading_hours_digit;       // convert minutes and seconds into the individual digits   // check the boundaries   if (hours > 99) hours = 99;   if (minutes > 59) minutes = 59;     // convert hr   if (hours < 10 && hours > 0) {     hide_leading_hours_digit = 1;   }   else {     hide_leading_hours_digit = 0;   }     digit[0] = hours / 10;   digit[1] = hours % 10; // remainder   digit[2] = minutes / 10;   digit[3] = minutes % 10; // remainder    for (i = hide_leading_hours_digit; i < 4; i++) {     clock_all_off();     clock_show_digit(i, digit[i]);     // fewer leds = brighter display, so delay depends on number of leds lit.     delaytime = num_leds[digit[i]] * DELAYTIME;       delayMicroseconds(delaytime);   }       clock_all_off(); } // // clock_all_off - turns off all the LEDs on the clock to give a blank display // void clock_all_off(void) {     // digits must be ON for any LEDs to be on   digitalWrite(DIGIT1, OFF);   digitalWrite(DIGIT2, OFF);   digitalWrite(DIGIT3, OFF);   digitalWrite(DIGIT4, OFF);     // segments must be OFF for any LEDs to be on   digitalWrite(SEGMENTA, ON);   digitalWrite(SEGMENTB, ON);   digitalWrite(SEGMENTC, ON);   digitalWrite(SEGMENTD, ON);   digitalWrite(SEGMENTE, ON);   digitalWrite(SEGMENTF, ON);   digitalWrite(SEGMENTG, ON);     // turn off colon and alarm too   digitalWrite(COLON, OFF);   digitalWrite(AMPM, OFF); } // // clock_show_digit - turns on the LEDs for the digit in the given position //      position can be from 0 through 3: 0 and 1 being the hour, 2 and 3 being the seconds //      value can be from 0 through 9, ie, a valid single digit. // //      (if value is out of range, it displays a 9. if digit is out of range display remains blank) // void clock_show_digit(unsigned short position, unsigned short value) {   byte a;   byte b;   byte c;   byte d;   byte e;   byte f;   byte g;   switch (position) {     case 0:       digitalWrite(DIGIT1, ON);       break;     case 1:       digitalWrite(DIGIT2, ON);       break;     case 2:       digitalWrite(DIGIT3, ON);       break;     case 3:       digitalWrite(DIGIT4, ON);       break;   }   a = !(value == 1 || value == 4);   b = !(value == 5 || value == 6);   c = !(value == 2);   d = !(value == 1 || value == 4 || value == 7);   e =  (value == 0 || value == 2 || value == 6 || value == 8);   f = !(value == 1 || value == 2 || value == 3 || value == 7);   g = !(value == 0 || value == 1 || value == 7);     if (a) digitalWrite(SEGMENTA, OFF);   if (b) digitalWrite(SEGMENTB, OFF);   if (c) digitalWrite(SEGMENTC, OFF);   if (d) digitalWrite(SEGMENTD, OFF);   if (e) digitalWrite(SEGMENTE, OFF);   if (f) digitalWrite(SEGMENTF, OFF);   if (g) digitalWrite(SEGMENTG, OFF); } // // clock_show_colon - shows the colon that separates minutes from seconds // void clock_show_colon(void) {   unsigned short delaytime;   digitalWrite(COLON, ON);                                // 2 leds = 2 delays needed   delaytime = DELAYTIME * 2;  // must use variable to have similar delay to rest of clock   delayMicroseconds(delaytime);   //   because use of variable slows it down slightly.   digitalWrite(COLON, OFF); } // // clock_show_alarm - shows the ampm dot (bottom right of clock display) // void clock_show_ampm(void) {   unsigned short delaytime;   digitalWrite(AMPM, ON);                         delaytime = DELAYTIME;  // must use variable to have similar delay to rest of clock   delayMicroseconds(delaytime);   //   because use of variable slows it down slightly.   digitalWrite(AMPM, OFF); } // // do_action - this function gets called when the timer completes. // static void do_action(void) {   // the exciting action here is just to turn on a LED   digitalWrite(ACTION, ON);   Serial.println("ACTION!"); }

Question by Djandco    |  last reply

Video Game Ideas Wanted

A couple of friends and I are planning on making our own Video Game. I thought it would be cool to ask others for ideas. Our game is a mixed genre (we are attempting to put as many game types into one as possible, but still keeping it somewhat reasonable) sci fi game based a couple hundred years into the future. Humans have colonized mars, but their is a war between the two planetary alliances. Meanwhile there is an underground organization that controls everything going on in human society. They prepare for the return of the true martian race who left behind some ancient relics which were discovered and kept a secret. The main character is a super soldier created by the underground society. You unite the human race and fight against the aliens. We have story ideas but would like to hear ideas from other people. All suggestions are welcome. Suggestions could include, but are not limited to: Characters Events Weapons Technology Genre types Plot ideas and twists Side missions One other thing is that we were thinking that the aliens could be human based, and be like a sub-species of humans. Yes or No? Any other ideas are welcome. Thanks to all who help.

Topic by DeviateKarma    |  last reply

Garlic as health booster

From Unlocking the Benefits of Garlic in the New York Times:The power to boost hydrogen sulfide production may help explain why a garlic-rich diet appears to protect against various cancers, including breast, prostate and colon cancer, say the study authors. Higher hydrogen sulfide might also protect the heart, according to other experts. Although garlic has not consistently been shown to lower cholesterol levels, researchers at Albert Einstein College of Medicine earlier this year found that injecting hydrogen sulfide into mice almost completely prevented the damage to heart muscle caused by a heart attack."People have known garlic was important and has health benefits for centuries," said Dr. David W. Kraus, associate professor of environmental science and biology at the University of Alabama. "Even the Greeks would feed garlic to their athletes before they competed in the Olympic games."Now, the downside. The concentration of garlic extract used in the latest study was equivalent to an adult eating about two medium-sized cloves per day. In such countries as Italy, Korea and China, where a garlic-rich diet seems to be protective against disease, per capita consumption is as high as eight to 12 cloves per day.I read this and immediately thought, "1-2 medium cloves per day! Christy and I probably eat that much in a single serving!"Try upping your garlic with these awesome recipes:Roasted TomatoesRoasted Eggplant with GarlicRoasted Sweet PotatoesGarlic Mashed Potatoesand here are some more recipes with lots of garlic.

Topic by ewilhelm    |  last reply

Arduino LED Clock RGB?

This is probably too big of a project for a first timer.I do not own a Arduino but plan to get one in the next few weeks or so or whenever Make releases the Getting started with Arduino KIT Again. I'm planing my project so that I can work on it with the fewest problems. I had the idea from 5volts fire extinguisher striking clock. My question is that is there a way that I can use RGB LEDs? I just wanted to use RGB LEDs instead of 7 segment displays but use the same layout and have a nice color fade with the time. Look for his schematic and code.The schematic shows a easy way to hook up a 7 segment display to an Arduino. I'm just not sure how to control another color. I was thinking maybe 3 BU2090's going from pins 12 an 13 and using the Arduino to control the power going to them. 5volt suggested triple multiplexing but I'm not too sure on how to do that. Also I'm not sure on common anode or common cathode LEDs?(I don't want to use 54 of each color.)As for clock face I was thinking like in the picture. 2 LEDs per segment, 8 for the colon. That is a 24"x12" box using 10mm LEDs. Center to center LED height is 7.125"Any help would be appreciated I have hit a snag trying to figure this out.

Topic by Rob K  

FAQ: How Do I Search Instructables?

20080605. I exchanged a few PMs with Eric and it seems that even the Instructables staff is not sure about what's going on with the search feature. So ... until they can get this all straightened out, Eric recommends that we use the "" option on Google for advanced searches. The Lucene search should work for most simple searches.. From Google's Web Search Help Center: "You can use Google to search only within one specific website by entering the search terms you're looking for, followed by the word "site" and a colon followed by the domain name. For example, here's how you'd find admission information on the Stanford University site: admission Eg, "NachoMahma" will search for my username on this site.. Try Kiteman +Law . Sorry for any confusion I may have caused. . Instructables uses the Lucene search engine. I'm still trying to figure a lot of this out (can't seem to get +/- to work right, for one). As I gain insights into what is going on, I will share them here.. This is a Work In Progress and may probably contains many errors. Use at your own risk, but I can't imagine any of this causing any harm - the worst it should do is generate an error message.. Some Lucene features may not work at Instructables - I'll erase those as I become aware of them.. If you know of any search tricks or tips, or can provide any insight as to how all this works with Instructables, please PM me (or leave a comment). I'm open to all suggestions.. The following is from Lucene Query Parser Syntax (copyright 2006 by The Apache Software Foundation. Distributed under Apache License, Version 2.0). About all I've done, so far (2008-06-01), is format it for Instructables. Any info I've added is noted in the text.. Note: I can't figure out how to escape a carat (formatting code for superscript), so I've substituted "/\" (slash + back-slash), except in the pre-formatted examples.Table Of ContentsOverviewTermsFieldsTerm Modifiers (Wildcard Searches, Fuzzy Searches, Proximity Searches, Range Searches, Boosting a Term)Boolean Operators (AND, +, NOT, -)Grouping (AKA parentheses - nacho)Field GroupingEscaping Special CharactersTerms. A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.. A Single Term is a single word such as "test" or "hello".. A Phrase is a group of words surrounded by double quotes such as "hello dolly".Multiple terms can be combined together with Boolean operators to form a more complex query (see below).Fields. Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.. You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.. As an example, let's assume a Lucene index contains two fields, title and text and text is the default field. If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:title:"The Right Way" AND text:goortitle:"Do it right" AND right. Since text is the default field, the field indicator is not required.. Note: The field is only valid for the term that it directly precedes, so the querytitle:Do it rightwill only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).Need to get a list of fields used on Instructables. - nachoWildcard Searches. Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries).. To perform a single character wildcard search use the "?" symbol.. To perform a multiple character wildcard search use the "*" symbol.. The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:te?t. Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:test*. You can also use the wildcard searches in the middle of a term.te*t. Note: You cannot use a * or ? symbol as the first character of a search.? and * work just like DOS wildcards, except you cannot use them as the first character - nachoFuzzy Searches. Lucene supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:roam~. This search will find terms like foam and roams.. Starting with Lucene 1.9 an additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:roam~0.8. The default that is used if the parameter is not given is 0.5.Proximity Searches. Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search:"jakarta apache"~10Range Searches. Range Queries allow one to match documents whose field(s) values are between the lower and upper bound specified by the Range Query. Range Queries can be inclusive or exclusive of the upper and lower bounds. Sorting is done lexicographically.mod_date:[20020101 TO 20030101]. This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive. Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields:title:{Aida TO Carmen}. This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.. Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by curly brackets.Boosting a Term. Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "/\", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.. Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching forjakarta apacheand you want the term "jakarta" to be more relevant boost it using the /\ symbol along with the boost factor next to the term. You would type:jakarta^4 apache. This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:"jakarta apache"^4 "Apache Lucene". By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)Boolean Operators. Boolean operators allow terms to be combined through logic operators. Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.. To search for documents that contain either "jakarta apache" or just "jakarta" use the query:"jakarta apache" jakartaor"jakarta apache" OR jakartaAND. The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.. To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:"jakarta apache" AND "Apache Lucene"+. The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.. To search for documents that must contain "jakarta" and may contain "lucene" use the query:+jakarta luceneNOT. The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.. To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:"jakarta apache" NOT "Apache Lucene". Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:NOT "jakarta apache"-. The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.. To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:"jakarta apache" -"Apache Lucene"Can anyone compare/contrast AND/+ and NOT/-? - nachoGrouping. Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.. To search for either "jakarta" or "apache" and "website" use the query:(jakarta OR apache) AND website. This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.Field Grouping. Lucene supports using parentheses to group multiple clauses to a single field.. To search for a title that contains both the word "return" and the phrase "pink panther" use the query:title:(+return +"pink panther")Escaping Special Characters. Lucene supports escaping special characters that are part of the query syntax. The current list special characters are+ - && || ! ( ) { } [] /\ " ~ * ? : \. To escape these character use the \ before the character. For example to search for (1+1):2 use the query:\(1\+1\)\:2. That's it. All corrections and/or clarifications are welcomed.

Topic by NachoMahma  

Useful Batch Commands

Hey guys, I wanted to post a quick forum topic about useful batch commands that are seldom used or not well-known, or maybe just useful tidbits. Note: These do not have to be used, they are just extremely helpful and are just "extra," meaning you could probably find easier-to-understand but not as useful commands. 1. The CHOICE command The reason this command is so cool is that unlike other Y/N menus, when you enter the desired number, you don't have to hit enter, it goes straight to the next screen. You can also program it to execute a command after a set amount of time. Here's how to write it out: choice /c:12345 /t:5,10 if errorlevel 5 goto ha if errorlevel 4 goto joke if errorlevel 3 goto tired if errorlevel 2 goto fried if errorlevel 1 goto chiken To time it, you type /t and then a colon. You write the choice that you want to be timed, e.g. 5, and the amount of time in seconds you want it to wait for seperated by a comma. 2. The Random Variable The reason I deceided to put this up is because it is one of the only if not the only variable that is already programmed into the system. By using it correctly, you can generate a number between 1 and 32767. WHAT?! Of course, you can narrow it down, to, say about 1 and 100. :dim set rnd=%random% if %rnd% GEQ 101 goto dim if %rnd% LEQ 0 goto dim set number=%rnd% So as you can see, %random% is a set variable and generates a random number for you. Please keep in mind that this can take one second, or one eternity (literally) since it doesn't narrow down the choices after finding that a number doesn;t work. So, you may keep on generating 101 forever and never get to 100! 3. The ^| Command. Ever get frustrated because you are making an animation with, for example, stick figures and are getting driven nuts because the minute it gets to a certain part, it exits on you? The reason is probably because you used the | symbol, which is actually knd of like a command by itself. So, if you're doing something like this: echo [0] echo /| echo / The reason it is not working is because you didin't use a ^ before the |. Here's what it should be: echo [0] echo /^| echo / Yes, it looks wierd in the editing stages, but looks much better in the real thing. Just remember, you will have to remember that the ^ will be invisible, so make sure everything else in front of it is like this: echo [0]   [ echo /^|    [ echo /     [ So that the [ or whatever it is is one space ahead from the others. 4. The %TIME:~0,5% Command. What time is it? Oh, it's 3:16:52.29! Ever been frustrated with the TIME command? For one, who ( and when I mean who, I mean the average batcher who doesn't use the TIME command to synchronize seven different computers around the house which I could never hope to do) needs to be that exact? When making a batch alarm clock, for example, the user wouldn't really want to do all of that, would they? So, for those of you who would want to make such a clock, here's an example: @echo off title Alarm Clock :start cls color f0 echo. echo Use 24 hour clock echo. set /p a=Set Alarm: cls echo. echo Alarm set to %a%. :alarm if %time:~0,5% EQU %a% goto alarmset goto alarm :alarmset color fc echo echo echo cls echo. echo It's %time:~0,5%! echo. echo Press 1 to acknowledge. choice /n /c:12 /t:2,1 if errorlevel 2 goto alarmset if errorlevel 1 goto sleep goto alarmset :sleep goto start So there's one example. %TIME:~0,5% sets the time from 3:15:00.00 to just 15:15. This doesn't work just with the TIME command, you can do this with any variable. If I had a variable %x% and it said "crayon" and wanted it to say "cray," I would type in %x:~0,-2%. If I wanted to make %x% say "on," I would type in %x:~-4,0%. 5. The AT Command The AT command is exactly what it appears to be. You tell it AT (time) /every:[day(s) of the week] (command to be executed). So, it I wanted an alarm to go off whenever the Simpsons are on, I'd type AT 19:30 /every:sumtwthfs echo ALARM!!! Now, I know that the Simpsons are on at a different time on Sundays, but that's not important. Please not that you HAVE to specify what day you want it to go off on (it can be dd/mm/yyyy to be really specific). Default is set to "tomorrow." This was probably too confusing. For one, I talk too much. Thank you for even getting this far, anyways. Thanks a bunch!

Topic by TheBatchies    |  last reply

Connect a Sketch Answered

This is a People counter, well hope to be if working.ha. Lazer across a doorway hitting a LDR. The 4 digit 7 seg display counting up 1 each time a person breaks the beam.  As of now i  have a counting sketch from the Sparkfun example. It is counting up 0 to 999 and at the same time i have an LDR reading to the serial monitor and blinking the LED on pin 13. But they are not "interacting". I am trying to get the beam breakes from the LDR to advance the count by 1 every time it is broken. In the loop function is the mills that was advancing the counting. I have changed it to   displayNumber(counter).  Among other things.But i haven't been successful in having the LDR advance the count. The sketch is still missing some "stuff". What could i change to have the counter advance by 1 every time the lazer beam is broken?    Thanks W /* 6-13-2011 Spark Fun Electronics 2011 Nathan Seidle This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 4 digit 7 segment display: Datasheet: This is an example of how to drive a 7 segment LED display from an ATmega without the use of current limiting resistors. This technique is very common but requires some knowledge of electronics - you do run the risk of dumping too much current through the segments and burning out parts of the display. If you use the stock code you should be ok, but be careful editing the brightness values. This code should work with all colors (red, blue, yellow, green) but the brightness will vary from one color to the next because the forward voltage drop of each color is different. This code was written and calibrated for the red color. This code will work with most Arduinos but you may want to re-route some of the pins. 7 segments 4 digits 1 colon = 12 pins required for full control */ #define ldrPin A2    // pin used for input (analog)    int digit1 = 11; //PWM Display pin 1 int digit2 = 10; //PWM Display pin 2 int digit3 = 9; //PWM Display pin 6 int digit4 = 6; //PWM Display pin 8 //Pin mapping from Arduino to the ATmega DIP28 if you need it // //int ldrPin = A2; int segA = A1; //Display pin 14 int segB = 3; //Display pin 16 int segC = 4; //Display pin 13 int segD = 5; //Display pin 3 int segE = A0; //Display pin 5 int segF = 7; //Display pin 11 int segG = 8; //Display pin 15 int ldr_pinValue; int counter; int currState; int then; //int ldrpread; //int digit[4]; //int leftover; int LDR = A2;                                //analog pin to which LDR is connected, here we set it to 0 so it means A0 int LDRValue = 0;                    //that’s a variable to store LDR values int light_sensitivity = 500;  //This is the approx value of light surrounding your LDR //int digit_to_show = 0; int ldr_Pin = 0;  // LED status (0 = low, 1 = high) int inVal = 0;    // variable used to store state of input int switchOn = 725;   // value at which we switch LED on int switchOff = 550;  // value at which we switch LED off void setup() {         {     Serial.begin(9600);            //start the serial monitor with 9600 buad     pinMode(13, OUTPUT);     //we mostly use13 because there is already a built in yellow LED in arduino which shows output when 13 pin is enabled   }       pinMode(ldr_Pin, INPUT );    pinMode(segA, OUTPUT);   pinMode(segB, OUTPUT);   pinMode(segC, OUTPUT);   pinMode(segD, OUTPUT);   pinMode(segE, OUTPUT);   pinMode(segF, OUTPUT);   pinMode(segG, OUTPUT);   pinMode(digit1, OUTPUT);   pinMode(digit2, OUTPUT);   pinMode(digit3, OUTPUT);   pinMode(digit4, OUTPUT);     pinMode(13, OUTPUT); } void loop(){ {     LDRValue = analogRead(LDR);          //reads the ldr’s value through LDR which we have set to Analog input 0 “A0″     Serial.println(LDRValue);                  //prints the LDR values to serial monitor     delay(5);                                                //This is the speed by which LDR sends value to arduino     if (LDRValue < light_sensitivity)       {         digitalWrite(13, HIGH);       }     else       {         digitalWrite(13, LOW); {    if (currState() >  300) then         currState = HIGH    } else     currState = LOW //endif if currState != prevState and currState == LOW then // LOW or HIGH depending on the circuit     counter++     prevState = currState endif      //long startTime = millis();   displayNumber(counter);     //while( (millis() - startTime) < 2000) {   //displayNumber(1217);   //}   //delay(1000);    } //Given a number, we display 10:22 //After running through the 4 numbers, the display is left turned off //Display brightness //Each digit is on for a certain amount of microseconds //Then it is off until we have reached a total of 20ms for the function call //Let's assume each digit is on for 1000us //Each digit is on for 1ms, there are 4 digits, so the display is off for 16ms. //That's a ratio of 1ms to 16ms or 6.25% on time (PWM). //Let's define a variable called brightness that varies from: //5000 blindingly bright (15.7mA current draw per digit) //2000 shockingly bright (11.4mA current draw per digit) //1000 pretty bright (5.9mA) //500 normal (3mA) //200 dim but readable (1.4mA) //50 dim but readable (0.56mA) //5 dim but readable (0.31mA) //1 dim but readable in dark (0.28mA) void displayNumber(int toDisplay) { #define DISPLAY_BRIGHTNESS  500 #define DIGIT_ON  HIGH #define DIGIT_OFF  LOW   long beginTime = millis();   for(int digit = 4 ; digit > 0 ; digit--) {     //Turn on a digit for a short amount of time     switch(digit) {     case 1:       digitalWrite(digit1, DIGIT_ON);       break;     case 2:       digitalWrite(digit2, DIGIT_ON);       break;     case 3:       digitalWrite(digit3, DIGIT_ON);       break;     case 4:       digitalWrite(digit4, DIGIT_ON);       break;     }     //Turn on the right segments for this digit     lightNumber(toDisplay % 10);     toDisplay /= 10;     delayMicroseconds(DISPLAY_BRIGHTNESS);     //Display digit for fraction of a second (1us to 5000us, 500 is pretty good)     //Turn off all segments     lightNumber(10);     //Turn off all digits     digitalWrite(digit1, DIGIT_OFF);     digitalWrite(digit2, DIGIT_OFF);     digitalWrite(digit3, DIGIT_OFF);     digitalWrite(digit4, DIGIT_OFF);   }   while( (millis() - beginTime) < 10) ;   //Wait for 20ms to pass before we paint the display again } //Given a number, turns on those segments //If number == 10, then turn off number void lightNumber(int numberToDisplay) { #define SEGMENT_ON  LOW #define SEGMENT_OFF HIGH   switch (numberToDisplay){   case 0:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_OFF);     break;   case 1:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 2:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 3:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 4:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 5:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 6:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 7:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 8:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 9:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 10:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   } }

Question by WWC    |  last reply