Archive for the Information Technology Category

New Google Privacy Policy..

Posted in Crazy People, Google, Policies, Social Media on 2012.29.02 by w3bguy

I keep seeing posts about how we should make sure to delete our +Google search  history before midnight tonight…  Seriously, why?  At least, in America, I’m sure that the government is monitoring everything we do anyway…  They love to break wiretapping laws like that.. #lol…

But seriously, are people actually worried about someone seeing their search results?  If you are searching for something that you’d like to hide, why are you logged in when doing it?  Or, for that matter why are you not at elast using a proxie to try and hide behind?

Personally, I welcome the new, improved services that this will eventually provide.  I say monitor my usage +Google, and use them to make my web experience even better.  I’d rather you do it that the American government… 🙂


Google Custom Search – Restricted to specific directory, and filetype…

Posted in CSE, Custom Search Engine, Google, Google, Information Technology, JavaScript with tags , , , , , , , , , on 2012.26.01 by w3bguy

So I’ve been having trouble getting a new Google Custom Search to look only in a specific directory on my web server, as well as to only look at specific file types.   It seemed like this should have been SO easy…  But, it took me a bit to figure it out.  So here’s the information just in case anyone else needs it.

  1. Set up a new search engine, in Google Custom Search.
  2. Make sure that you have the root directory in the “Sites” section.  I used “”.
  3. You can enter refinements, but they only seem to work if the user clicks on them; not what I wanted.
  4. Go down to “Get Code” and grab the code block that is created for you.  For me it was this:
    • <div id="cse" style="width: 100%;">Loading</div>
        <script src="" type="text/javascript"></script>
        <script type="text/javascript">
          google.load('search', '1', {language : 'en', style : google.loader.themes.MINIMALIST});
          google.setOnLoadCallback(function() {
            var customSearchOptions = {};
            var customSearchControl = new
              'Custom Search ID', customSearchOptions);
          }, true);
  5. This will give you the basic search.  In order to add in the site restriction and the filetype restriction I changed it to:
    • <div id="cse" style="width: 100%;">Loading</div>
        <script src="" type="text/javascript"></script>
      <script type="text/javascript">
      google.load('search', '1', {language : 'en', style : google.loader.themes.MINIMALIST});
      var customSearchOptions ={};
      /* Add Custom Search Option to restrict directory */
      customSearchOptions []={"as_sitesearch": ""};
      var customSearchControl = new"Custom Search ID", customSearchOptions );
      /* Add query addition to restrict filetype */
      function(control, searcher, query) {
      searcher.setQueryAddition("filetype:pdf OR filetype:PDF");
      }, true);

    I hope that helps out anyone else who might be looking for a similar problem…

Move a file to a shared drive in Java

Posted in Information Technology, Programming with tags , , , , , on 2011.28.11 by w3bguy

I had a bit of trouble with this, in a program I’m writing at the moment. Every time I tried to move a file to a shared folder, on my computer, it would fail. Turns out, it (apparently) because Java doesn’t necessarily share my mapped drives. Here’s the code that I used to overcome this:

System.out.println("Try to move file");

// create a net use command to map the drive...
String command = "c:\\windows\\system32\\net.exe use Z: \\\\\\f$";
Process p = Runtime.getRuntime().exec(command);

// create an instance of the file to move
File f=new File(".\\myImage.jpg");

// make sure that the file actually exists
boolean fileExists=f.exists();
System.out.println("File Found");
System.out.println("File Not Found");

//create a random number and timestamp, for a unique file name
Random rand = new Random();
int randNum = rand.nextInt();
Date date=new Date();

// Create the new filename
String newFileName=new String("myImage_"+date.getTime()+"_"+randNum+".jpg");

//try to move the file
boolean moved=f.renameTo(new File("Z:\\Home\\ITS\\sigImages\\"+newFileName));
System.out.println("File moved -&gt; "+newFileName);
System.out.println("File Not moved");
}catch(Exception ex){

I’m sure there is a more elegant way of doing this, that more experienced Java programmers will know. But, I could not find too much out there on the web… Hope this helps someone…


Rooting a NOOKcolor 1.2.0

Posted in Android, Google, Hacking, NOOK, NOOKcolor, Rooting, YouTube with tags , , , , , on 2011.22.05 by w3bguy

I picked up my new NOOKcolor, yesterday, at Barnes and Noble.  As just an eBook reader, it is very impressive.  But, I wanted to the full Android tablet capabilities, not just an eReader.

After searching all around the Internet for reliable instructions, I found a video walk-through on YouTube (, and a text walk-through on (

In short, what this takes is a micro SD card, turned into a bootable SD card, with the new ROM on it.  The walk-through on the xda site links to the needed image writer, the bootable image, and the new ROM.  Those links are as follows:

Image Writer:
Bootable Image:

The video shows a “Install Failed” at the end of the installation.  I received the same screen, and after rebooting it worked fine.  Once the tablet is rooted, it appears to work just like a regular Android tablet.  I just rooted mine, so we’ll see how it goes throughout the day.


Search for non-duplicates bettween two tables.

Posted in Information Technology, MySQL, PHP, Programming, Web Development with tags , , on 2011.17.02 by w3bguy

I recently had some issues trying to make sure that two columns from two different tables were the same.  After some random code writing, I came up with the following MySQL code…  Hope it helps others…

/* return from first table */
$checkTable1=@mysql_query("SELECT table1.column1 FROM table1 LEFT JOIN table2 ON table2.column2 = table1.coumn1 WHERE table2.column2 IS NULL");

/* return from second table */
$checkTable1=@mysql_query("SELECT table2.column2FROM table2 LEFT JOIN table1 ON table1.column1 = table2.column2 WHERE table1.column1 IS NULL");

I’m sure there is a better way to accomplish it, but this worked for my needs…  Just a quick search, and then I added some extra code to update the tables if there are any discrepancies.


Easy GPS Coordinates

Posted in Google, Google, Google Maps, JavaScript, Web Development with tags , , on 2010.05.11 by w3bguy

Ever need to find the GPS coordinates for a location?
Try the simple step below to get the GPS coordinates for any location, using Google Maps:

  1. Open Google Maps, and find the areayou wish GPS coordinates for
  2. Right click at the specific spot you would like GPS coordinates for
  3. Select “center map here” from the list
  4. Paste this JavaScript code into the address bar
    • javascript:void(prompt(”,gApplication.getMap().getCenter()));
  5. Press Enter on your keyboard
  6. A pop-up will appear showing the coordinates of the center of the map. It should look something like this: (43.60336, -110.7362)
  7. Right click on the coordinates to copy, and click either “OK” or “Cancel”

The IT Project-Tracking Database: Keep Your Key People in the Loop

Posted in Information Technology, Information Technology Links, Web Development on 2010.09.08 by w3bguy

via E-Commerce Times

A project-tracking database should not just be a nominal entity that exists for the sake of existence; rather, it should contain some key attributes that every person in the company can draw important conclusions from — and use them to form the basis of key decisions that impact not just the project itself, but also the overall vision and direction of the company.

Information Technology is a project-centric industry. Every task is either performed as a part of a project or constitutes rollup toward creating a new project. No individual, organization, department or company can escape the rigor of discipline and perseverance that project management enforces as prerequisites for success. However, information Technology often receives a bad rap for the relatively small number of successful initiatives as a percent of the total initiatives launched, compared with other departments.

Technologists are viewed as inherently more disciplined — and more capable of thinking and planning in a structured manner — than their “non-technical” counterparts. I believe this classification is unjust. No matter how trained the human mind, it still cannot replace the uber-productivity tools that assist project discipline today. Initiatives fail mid-stream or fail to take off not because they are not good initiatives, but because of the improper amalgamation of the prowess of the human mind with the appropriate technology (read tools) that it has created for its assistance….