Wednesday, December 21, 2016

Front load Vs. top load washing machine

A lot of people are always wondering and asking the common question: which is better front load or top load washing machine? The diplomatic answer will always be "It depends, on your needs", but my answer seems to push for the front load based on:

[1] Experience of some friends working in the field of fabric care machines
[2] Studying customer reviews over the internet
[3] Getting direct feedback from people who already have these types of washing machines
[4] and finally, my engineering background


This comparison seems to be different from most comparisons over the internet. The following is a comparison between front load washing machine and top load washing machine:


Point of comparison
Front loading
Top loading
Concept
 
Twin tub converted to one tub
Washing action
Tumbling
Wobbling
Functions
Soak, wash, rinse, and spin
Soak, wash, rinse, and spin
Clothes loading and unloading direction
From front
From top
Market
Domestic and commercial
Domestic
Customer
v  Urban
v  Small families
v  Country
v  Large families
Weight
Large
Smaller
Good for moving and cleaning under the washing machine
Geometry
Size
More compact
Higher height
Drum size (volume)
Small
Large
One of the best uses of this feature is soaking and spinning of large blankets after being manually washed or washed in this washing machine
Dry weight capacity [kg]
Small because of smaller drum size
Large because of larger drum size
Drum axis
Horizontal
Vertical
Vertical stacking
Yes
Can be stacked with other washing machine or tumble drier
No
Pedestal
Yes (optional)
No
Built-in configuration
Yes: can be used under worktop in kitchen
No
Door opening direction
Requires washing machine to be placed in mid side or left side of the wall. If it is placed adjacent to right side of wall it will be difficult to use
Can be placed in any location relative to rear wall
Agitator
No
Old models
Matching drier
Yes
Yes
All-in-one (combination) washer and drier
Yes: some models
No at all
Elegant decoration shape
Yes
Some models
Performance
Washing capacity [kg]
Same as declared
Almost half of the declared. In most cases the wobbler (motor) stalls at half load
Water consumption per 1 kg of cloths
Less: good where the water is pricy
More
Overall energy consumption
More (only when hot water settings are used)
Less (only if external water heater is used)
Energy efficiency
More
Less
Washing efficiency
More
Typically less
Rinsing efficiency
Less
Typically more
Spinning efficiency
More
Less
Spin speed
More
Less
Soaking
Yes
Yes
Soaking volume
Small
Large
Program duration
Long
Short, especially when it uses hot water from instant water heater
Gentle wash
Imagine tomatoes are placed in both types!!!
More: Reduces cloths worn.
Less
Program interruption
No
Imagine a water bottle filled with water and you want to open it while it is horizontal. If you open it water will spill out. For this reason, you can not interrupt the program. Some advanced models allow you to add small cloth pieces during program like AddWash™ technology introduced by Samsung
Yes
Noise
High
Less
Detergent precipitation
Less
More
Washing pillows
Small ones
Large ones
Washing blankets
Baby blankets
Large blankets
Washing shoes
Yes
Yes
Hand wash
No
Some models
Requirements
Detergent type
Automatic (high efficiency)
Automatic or manual
Water supply
One cold water supply
Two: cold and hot (optional). The installation location needs to be prepared. Using external hot water supply will save much time and energy if instant gas water heater is used or in case of central heating systems
Hot water demand
Zero
High
Requires large capacity water heater
Manual water supply
Yes
Through the dispenser drawer
Yes
Water can be added directly from top lid opening. This is a very useful feature if there is no water pipe network, the city water pressure is so low, or the city water is so hard to be used for washing and a distilled or mineral water will be used instead.
Water quality
 
Soft water (especially if hot temperature setting is used frequently. Hard water may destroy the electric heater inside after time. This may be overcome by running a no-load hot wash program and using anti-scale agent)
Soft or hard water (for sure hard water will result in low washing efficiency)
Ergonomics
Comfort
Less comfortable as the user has to bend or knee down. Good for short people and non-adults. Good for people with impairment in their legs
More comfortable. Because of deep drum, it is not good for short people as they need to stand in tiptoes or use step stool to reach small items in the bottom
Loading easiness
Less
The user has to prevent loads from falling out while loading
More
Control
Electronic
Yes
Yes
Water level
Automatic
Manual input by user depending on amount of cloths
Water temperature control
Yes
Yes (only when the two water supplies are connected)
Water temperature
Automatic based on user setting
Automatic based on user setting.
Spin speed control
Yes
Yes
Fuzzy logic
In premium models
In premium models
Control panel location
Always in forehead
Forehead or back
Safety
Control panel accessible by baby
Yes
It is almost difficult to be accessed by children
Child lock during running
Yes
Yes
Door open while it is powered off
Yes: in certain cases, if door left open this may be non-safe for babies or pets
Yes: but it is difficult to be accessed by babies
Opening detergent dispenser during program
Possible (unsafe)
Not possible (safe)
Losing small cloths
Small cloths, socks, coins, rings can be lost between internal and external drum.
No losing
Door lock during operation
Yes (mandatory)
No (optional)
Reliability
Broken door operation
Not possible
Possible (with some simple hack)
Extra features and data
Monitoring
Remote
Local
Privacy
No
Yes
Motor direct drive
Some models
Some models
Transparent door
All models
Some models
Door slamming
No
Unless the user did this himself
Yes due to free fall
Some models have damper
Counter weight
Yes
No
Damping system
Radial
Axial
Bearing
Radial bearing
Radial + axial bearing
Detergent and softener dispenser
All models
Not in old models
Yes in new models
Wrinkling
Less
More in old models
Less in new models
Intercooling of drained water
Yes
No
Shipment bolts
Yes
Requires a professional for installation
No
Cleanness
Mold formation
More likeable to take place at door gasket and other locations because of low water consumption, lack of light ingress to the drum, trapped moisture which are the best place for mold to grow up
Less likeable
Bad smell
More likeable. For more info visit this link
Less likeable
Matching drier
Yes
Yes
Financial
Manufacture price
High
Lower
Price (in Egypt)
Cheap
Pricy for the same performance of equivalent front load because most of these models of this type are  imported from outside
Serviceability (in Egypt)
A lot of professional technicians can service this kind of washing machines
Rare professionals can service this type
Spare parts
Available and cheap
Not available and pricy
Reselling
Yes: most resold models are old
Yes: most resold models are new

Sunday, December 18, 2016

Excel VBA wait until typing is finished

Assume that you have an ActiveX textbox (or any input control that accepts typing text) in your user-form or work-sheet that will be used for instant search or filter. This instant search will be called from the event handler of textbox change. When the user is typing too fast in this textbox the search command will be triggered so fast as well which may cause the application screen to flash multiple times or slow down.

Consider this example: the user want to search for "123", the normal code will search for "1" when "1" is typed, search for "12" when "2" is typed, and finally search for "123" when "3" is typed.  This leaded to three search commands while the required is only one search command. For large data sets, this will be a huge problem.

So, how to make the application understands that fast typing is finished and it has to start the search?
The answer is: when the textbox text changes; start a small timer function after which the search will start. If the user is typing too fast, the new timer will overwrite the last one before it has been ended. In other words, the timer will be reset each time the user is typing.

This post answer the question asked in http://www.mrexcel.com/forum/excel-questions/682986-my-textbox-change-reacts-too-quickly.html

To apply this concept, write the following code in a module

' Test whether you are using the 64-bit version of Office 2010.
#If Win64 Then
   Declare PtrSafe Function GetTickCount64 Lib "kernel32" () As Long
#Else
   Declare PtrSafe Function GetTickCount Lib "kernel32" () As Long
#End If
 
' Define timer sub that will wait for 1000 milliseconds
Sub WaitTyping()
t1 = GetTickCount()
Do Until (GetTickCount() - t1) > 1000
DoEvents
Loop
End Sub

Write this code inside the textbox change event handler
 
Private Sub SearchTextBox_Change()
WaitTyping    ' We defined this function in module
SearchForText     ' Search will be done after 1000 millisecond
End Sub





Tags:

Excel VBA delay function

Excel VBA instant search textbox speed

Excel VBA wait until user has finished typing

Excel VBA instant search slow response

Excel VBA instant search trick

Improve Excel VBA instant search performance

Excel VBA smart instant search

Tuesday, December 13, 2016

Storing hidden data to Excel

Assume you are creating an Excel workbook  for commercial use and you want to store some hidden data related to installation date, license period, license key, No. of licenses, Licensed users, user password etc. Also you want to have some of these data configurable like user password that can be changed later by the user. Then you have to save these data to hidden (invisible) locations within the workbook so the user can't edit or copy.  Explicitly, the workbook is only protected using three protection modes:

[1] Workbook protection
[2] Sheet protection
[3] VBA project protection

For this reason, any kind of protection schemes you will make, will always rely on one or more of the previous protection modes. The following help article from Microsoft about the document inspector shows the most possible locations for storing hidden data:
https://support.office.com/en-gb/article/Inspect-workbooks-for-hidden-data-and-personal-information-c794c108-b592-4955-b573-90b18dc29afc

The following are some ways to store and protect these hidden data:

[1] Save value to predefined random cell. Set cell format to custom ";;;" so it will not be visible. Lock cell from being selected and protect sheet. Protect VBA project with a password

[2] Save data to a column or row, hide column or row, protect the sheet, protect VBA project with a password

[3] Insert shape, place it in a random place, set its fill and line colors to transparent (no fill), set its Alt text title or body to your value, and/or resize your shape to 0 width and 0 height. Lock shape for editing. Protect sheet, Protect VBA project as well

[4] If your sheet has shapes, then you can store data to a shape and place it in the back of another shape using the previous method

[5] Insert sheet, write your data to this sheet, then hide it. Protect workbook so it is not possible to unhide this sheet. Protect VBA project with a password

[6] Insert sheet, write your data to this sheet, then hide it by on the following ways:

(A) Programmatically using Excel VBA by setting the visibility of this sheet to "xlSheetVeryHidden".
(B) Select your sheet, select developer tab, in the "Controls" group, click "properties", and set the "Visible" property to "xlSheetVeryHidden".

You don't need to protect workbook because it will not be visible even the user unhide all sheets. It can only set back to visible programmatically from VBA. Protect VBA project with a password

[7] Insert sheet, write each character of password in a predefined random cell, hide sheet, lock workbook. Protect VBA project with a password

[8] Save password in any hidden place with complex encryption scheme of your own

[9] Save data in data validation input message title or body or error message title or body of predefined random cell

[10] Save data in screen tip of hyperlinked cell (the hyperlink is set to the cell itself) predefined random cell

[11]  Insert dialog sheet , insert form control outside the user dialog and place it in a random far place, hide the dialog sheet, protect sheet, protect workbook, and protect the VBA project.

[12] Use N formula which can stores data in cell without being seen, lock sheet, and protect the VBA project.

[13] Using work sheet custom properties.


' Save owner name
 
Sheets("Sheet Name").CustomProperties.Add Name:="Owner",Value:= "Shady Mohsen"
 
' Get owner name
Debug.print Sheets("Sheet Name").CustomProperties.Item(1).Value
 


Tags:

Save hidden data to Excel workbook

Create commercial Excel workbooks

Save data to hidden locations inside workbook

 

Friday, December 9, 2016

Excel VBA unique function

There is no built-in Excel function that can return unique values of range or array of values. In this post I will show the easiest method that can return unique values of array or range.

Consider the following example: In Range("A1:A10") we have 10 strings and we want to write the unique ones in column "B". Hereunder the code:





Private Sub GetUniqueValues()

UniqueValues = "-"      ' Delimited string. Delimiter "-" which used as a bullet. You may use different delimiter

' ########### Get unique values from range("A1:A10") ##############
For i = 1 To 10
If InStr(UniqueValues, "-" + CStr(Cells(i, 1))+"-") < 1 Then     ' If cell value is not found in the unique values delimited string then add it
UniqueValues = UniqueValues + CStr(Cells(i, 1))+"-"
End If
Next i

' Create the array of unique values
UniqueArray = Split(mid(UniqueValues,1,len(UniqueValues)-1), "-")

' Write unique values to column "B"
Application.ScreenUpdating = False
For i = 1 To UBound(UniqueArray)
Cells(i, 2) = UniqueArray(i)
Next i
Application.ScreenUpdating = True

Debug.Print UBound(UniqueArray)     'Print down number of unique values in the immediate window
End Sub
 
This method has the following Pros and Cons...


Pros:

[1] This method is one of the easiest methods to get unique values
[2] It works for both strings, numbers, or mixed data of strings and numbers
[3] The best solution to populate lists of combo boxes and list boxes
[4] You may make a little modification to code to ignore case-sensitive and extra leading/trailing/in-between blanks easily. The code -after modification- will look like the following
[5] Easily, you can count number of unique values
[6] It can be used to highlight unique values



Private Sub GetUniqueValues()

UniqueValues = "-"      ' Delimited string. Delimiter "-" which used as a bullet. You may use different delimiter

' ########### Get unique values from range("A1:A10") ##############
For i = 1 To 10
If InStr(UCase(UniqueValues), "-" + UCase(Trim(Cstr(Cells(i, 1))))+"-") < 1 Then     ' If cell value is not found in the unique values delimited string then add it
UniqueValues = UniqueValues+ Trim(Cstr(Cells(i, 1)))+"-"
End If
Next i

' Create the array of unique values
UniqueArray = Split(mid(UniqueValues,1,len(UniqueValues)-1), "-")

' Write unique values to column "B"
Application.ScreenUpdating = False
For i = 1 To UBound(UniqueArray)
Cells(i, 2) = UniqueArray(i)
Next i
Application.ScreenUpdating = True

Debug.Print UBound(UniqueArray)     'Print down number of unique values in the immediate window
End Sub

Cons:


[1] As it relies on string processing, this method is not the fastest or the optimum for computer resources
[2] It may not work or it may get slower with large data sets having large number of unique values
[3] The delimiter should be carefully selected to make sure that no character will be processed as delimiter. For example, you can not use the "-" delimiter to get unique values of array of negative numbers.



Tags:


Excel VBA unique function

Excel VBA get unique strings

Excel VBA get unique values

Excel VBA get unique numbers

Excel VBA simplest unique function

Excel VBA shortest unique function

Excel VBA easiest unique function

Excel VBA how to get unique values

Excel VBA count unique values

Excel VBA number of unique values