Minnesota Web Developer | A little something about everything...

Minnesota Web Developer

A little something about everything...

Windows Explorer 10 is Slow, unusable, unstable, high CPU, issues

I've run into this issue several times now where windows explorer 10 has some sort of conflict with windows search service. This happens on clean installs and more frequently to those that have upgraded from windows 7 or 8 to windows 10.

Here is the quick fix to resolve this:

Ctrl+Alt+Del > Select "Task Manager"

Once task manager opens select the wind and type "w" until it selects "Windows Explorer", right click and end task. This will cause all of your windows explorer items to be removed from the windows interface and you should notice the pc has returned to normal, no longer slow.

If this is the case continue with the next step,

Choose "file" from "Task Manager" then enter "services.msc" and click "ok", now scroll down to "Windows Search" double click and change the startup type to "Disabled" then "Stop" the service.

(please note, this will disable your windows search function)

To restore windows explorer select "file" from the task manager and "run new task" enter "explorer.exe" and click ok. Everything should now be working properly other than "Windows Search" which is now disabled.

lightweight Javascript toggle function without jquery to display block/none for an element

Here is a quick lightweight javascript toggle function for sites where you dont want to use jquery.

The JavaScript:

<script>
function toggle(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
var list = document.getElementsByClassName("tmc");
for (var i = 0; i < list.length; i++) {
list[i].style.display="none";
e.style.display = 'block';
}
}
</script>

Some example CSS:

<style>
.dbn {
display:block;
float:right;
width:40vw;
border:.05em solid #000;
padding:.8em;
margin:1em;
box-shadow:0 0 .3em #000;
}
#aa {background-color:#f00;}
#bb {background-color:#0f0;}
#cc {background-color:#00f;}
</style>

Some excmple HTML:

<ul>
<li><a onclick="toggle('aa');" style="cursor:pointer ">one</a></li>
<li><a onclick="toggle('bb');" style="cursor:pointer ">two</a></li>
<li><a onclick="toggle('cc');" style="cursor:pointer ">three</a></li>
</ul>
<div id="aa" class="dbn">
Content of Div aa
</div>
<div id="bb" class="dbn">
Content of Div bb
</div>
<div id="cc" class="dbn">
Content of Div cc
</div>

Example:

Content of Div aa
Content of Div bb
Content of Div cc

Launch of new International Tax Law Firm Website: Moskowitz LLP 2016

Today is the launch of new site for Moskowitz LLP. The new design uses reactive design concepts, not to be confused with adaptive design which generally folds up on itself as you re-size the screen or switch devices.

Moskowitz LLP is an international tax law firm located in the financial district of San Francisco, California. Steve Moskowitz is the Senior Partner and Lead tax Attorney at the firm. The full team at Moskowitz LLP has impressive experience in tax law and related services. If you are looking for a tax law firm with experience and motivation give them a call at 888 829-3325.


Site information:

Code: HTML5, CSS3, JS, ASP.Net, Perl

Website: http://moskowitzllp.com

The desktop layout:


Here is the same site on mobile:


If you're looking for a new site design or marketing for your law firm or business, give me a call to discuss your next project: 507 358-4242

PIWIK, There is no data for this report under Actions

This is caused by a database design issue in PIWIK, you can fix it by opening MySQL workbench or phpmyadmin and editing the database table column as follows.



As you can see we've edited the piwik_log_link_visit_action.idlink_va design "Data Type" from INT(11) to BIGINT(11)

INT is too small to run larger segments, so we need to switch it to BIGINT, the number just specifies the columns "display width" when output.

BIGINT

8 Bytes, -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)

INT 

4 Bytes, -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)

After you've done this apply and rerun your reports from either opening the piwik stats page or by command line, cron job, task manager task if you have one of these setup.

If using windows server, you can setup a batch file to run via task manager every 15 minutes or as needed depending on traffic and number of sites your run stats for. Here is what you update.bat file should looke like

mode con: cols=140 lines=40
php "(Drive):\PathtoPWIKwebsite\console" core:archive
timeout 30

  1. The first line is optional and I included it because it allows me to specify the size of the CMD window it will open on the server, this is nice because you can make it as large or small as you would like.
  2. The second line is your command line to run the actual PIWIK archive, this will update all of the stats under actions and a few other things, This is considered archive for PIWIK.
  3. The third line is optional, I use this to specify a timer so you can see that the script is running correctly. 

Now set windows task manager to run this every x number of minutes.

That's it your done.

http error, PHP 7.x, 5.6 on windows IIS server: 0xc0000135 500 php.cgi.exe

This error can be caused by not installing the related Visual C++ Redistributable for Visual Studio

That is it.