Friday, May 31, 2013

.pop() in JavaScript will throw away the last item on an array, as if almost the opposite of .push()

In keeping with my silly supreme court example, if a file named defineyesmen.js merely contained:

var yesmen = ['Alito', 'Kagan', 'Kennedy', 'Roberts', 'Scalia', 'Thomas'];

 
 

...then the dropdown list given in the HTML below would end up with the contents of the array minus Clarence Thomas.

<html lang="en">
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1,maximum-
            scale=1,minimum-scale=1,user-scalable=no"/>
      <meta name="apple-mobile-web-app-capable" content="yes" />
      <title>Whatever</title>
      <link rel="stylesheet" type="text/css" href="styles.css" media="screen">
      <style type="text/css" media="all">
         #list {
            width: 220px;
         }
      </style>
   </head>
   <body style="overflow-y:hidden; overflow-x:hidden;">
      <select id="list">
         <option selected>change me to something else</option>
      </select>
      <script src="defineyesmen.js" type="text/javascript"></script>
      <script type="text/javascript">
         yesmen.pop();
         for (var i=0; i<yesmen.length; i++)
         {
            var opt = document.createElement("option");
            opt.text = yesmen[i];
            opt.value = yesmen[i];
            document.getElementById("list").options.add(opt);
         }
      </script>
   </body>
</html>

 
 

If an array is empty it will just stay empty upon a .pop() which seems to cause no error.

To keep Google Chrome from opening http://mysearch.avg.com/

...I had to uninstall a toolbar from the control panel.

Agent Ransack

...is a grep tool. Go get it here. Actually, this source may not be the best place to grab the code. When I got it from CNET it ended up putting something called Uniblue SpeedUpMyPC on my laptop. Grrr. Anyways, I digress. The tool itself seems to work. I can specify a folder and then search all the files in that folder and nested folders within for a magic string. A list of files that have a match is returned. Yay!

Addendum 6/2/2013: http://www.mythicsoft.com/agentransack/download is a better place to download from.

Trolling Google Images is a good way to find mouse pointer images for Photoshop play!

I like this one.

Oracle's Asset Management interface can be challenging in defining associations at lists.

To assign an employee to an operation within a work order in Oracle's Asset Management interface you need to select the employee with both:

  1. the radio button in the Select column shown above at the far left
  2. the checkbox in the Assign column shown above at the far right

 
 

If need to check both and then click "Apply" or else the assignment just won't happen. Oracle's interface is... interesting in this regard. You get to the screen above to begin with by finding a work order at the Work Orders tab, going to the Details tab within the Operations tab at the work order, and then changing the "Select Row:" setting to "Assign Employee" before pressing the Go button.

Addendum 6/21/2013: You don't need to check the radio button, just the checkbox.

Thursday, May 30, 2013

Ctrl-F

I am realizing that Ctrl-F pretty much does the same thing in most apps in Windowsland in that it allows you to search the copy at hand for a string. At the moment, I'm using it in Google Chrome's Developer Tools.

F8 continues past a breakpoint in Chrome Developer Tools debugging.

...not F5. Duh.