Showing posts with label ProblemSolve. Show all posts
Showing posts with label ProblemSolve. Show all posts

Thursday, February 11, 2016

Lenovo Thinkpad x1 carbon, auto disable touchpad when mouse attached

Couple days searching nothing found. then I found about this with not elegant way ( using registry )

tried this one
https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile/Option-to-disable-UltraNav-touchpad-trackpoint-when-external/td-p/447409


basically like this

Even though it passed some time from first post I'm writing a solution for auto disabling UltraNav touchpad and trackpoint when external mouse is connected.
I have Lenovo L530 that doesn't have shortcut on keyboard to disable Elantech touchpad so after a driver update (from about 20 March 2013) I tried to find a solution again -now with success.
To auto disable touchpad when external mouse is connected you have to set value in registry editor here is procedure (for Windows 7 procedure for other Windows editions is similar or same):
  1. Click Windows type in regedit and run it.
  2. Navigate to HKEY_CURRENT_USER\Software\Elantech\OtherSetting. (If you can't find Elantech\OtherSetting in HKEY_CURRENT_USER navigate to HKEY_LOCAL_MACHINE\Software\Elantech\OtherSetting.)
  3. Find DisableWhenDetectUSBMouse double click it and change value (from 0) to 1, hit OK.
     (If you don't have DisableWhenDetectUSBMouse in Elantech\OtherSetting create new DWORD with name DisableWhenDetectUSBMouse and set value to 1.)
  4. Restart computer.

and like this

@pastirTV: I found your answer very helpful , It led me to a similar solution for those of us with Synaptics rather than Elantech TouchPad. Synaptics too have a registry key for this purpose:
*Navigate to HKEY_CURRENT_USER\Software\Synaptics\SynTP
*Change or create DWORD DisableTouchPadIfMousePresent (from 0) to 1


but didnt work. 

And then tried this one to...

https://forums.lenovo.com/t5/ThinkPad-T400-T500-and-newer-T/Thinkpad-T440P-no-option-to-disable-touchpad-when-external-mouse/td-p/1785403

 basically like this one
ColonelOneill,

The guide put me in the right direction but I had to adjust the value in the HKEY_CURRENT_USER versus HKEY_LOCAL_MACHINE
Registry Change
HKEY_CURRENT_USER\Software\Synaptics\SynTPEnh\DisableIntPDFeature
Dword from hexadecimal 22 to 33.

It is a bit frustrating being a long time Dell Laptop user that other manufacturers are not as diligent in making sure this feature is externalized in the control panel for users that have no registry access. Like is often the case in a corporate issued computer.

So issue solved but again it would be great if this was in the Touchpad software versus having to change registry values.

Thanks!
 
surprisingly... its worked like a charm :D


if those method doesnt work, I think you should tried this application instead TouchFreeze

Friday, November 14, 2014

Compiling lazarus 1.3 ( trunk ) and FPC 2.7.1 ( trunk ) , Error and NOTE


Compiling and commit svn


Installing embarcardero x4 and tried to compiled lazarus 1.3 ( trunk ) and FPC 2.7.1. Its weird error, cannot compile bla bla bla....

Tried to executing this command 
make clean bigide 
and got error
Error makefile 14

After 8 hours pain and struggling with this bitch. Searching through google and found some of this:

http://www.cheatengine.org/forum/viewtopic.php?t=573992&postdays=0&postorder=asc&start=0&sid=1beeedd8204588714081d531bac2d919
http://forum.lazarus.freepascal.org/index.php?topic=18727.0
http://forum.lazarus.freepascal.org/index.php?topic=25526.0

http://forum.lazarus.freepascal.org/index.php?topic=16839.0
http://forum.lazarus.freepascal.org/index.php/topic,16898.msg92757.html#msg92757

http://wiki.freepascal.org/Installing_Lazarus

update and deleting svn, multiple times


http://mistikhati.wordpress.com/2014/03/06/compile-fpc-dan-lazarus-di-windows-xp-bag-3/
http://mistikhati.wordpress.com/2014/03/06/compile-fpc-dan-lazarus-di-windows-xp-bag-2/
http://mistikhati.wordpress.com/2014/03/06/compile-fpc-dan-lazarus-di-windows-xp-bag-1/


And yeah nothing worked -_- and then......
Finally, I found something that really the problem. Embarcardero x4 adding path to system environtment and the problem is: x4 have own make.exe . So make.exe from fpc conflict with make.exe from X4.

So I uninstalling embarcardero x4, add my path fpc to environtment and its work flawlessly.  I keep my mind to check first the make.exe using Print full path of an executable command in Windows first before doing same mistake.

 Proudly using Lazarus 1.3 r FPC 2.7.1 i386-win32-win32/win64
Proudly using Lazarus 1.3 r FPC 2.7.1 i386-win32-win32/win64

And now I can building my own FMD :D

fmd-0.8.5.22 unofficil build
 
#nb for myselft for updating svn
fpc_src
make clean all install INSTALL_PREFIX=C:\opt\fpc-2.7.1 PP=C:\opt\ppc386.exe DATA2INC=C:\opt\fpc-2.7.1\fpcsrc\utils\data2inc.exe
lazarus
make clean bigide

Tuesday, August 19, 2014

"The remote server returned an error: (417) Expectation Failed."



System.Net.HttpWebRequest adds the header 'HTTP header "Expect: 100-Continue"' to every request unless you explicitly ask it not to by setting


do this
System.Net.ServicePointManager.Expect100Continue = false;

Tuesday, July 29, 2014

Can not find unit httpsend used by Unit1. Check if package laz_synapse is in the dependencies

Can not find unit httpsend used by Unit1. Check if package laz_synapse is in the dependencies.


if you have those message, just do this


open the menu "project\project inspector", press the add button, select the New requirement tab and select the synapse package in the package name combo box and press Create New Requirement


Monday, June 16, 2014

Bug fix for Cookies container in C# .net 3.5

There is bug for .net 3.5 about cookies container, read here (CookieContainer domain handling issue (.NET 2.0-3.5)
) https://connect.microsoft.com/VisualStudio/feedback/details/541197/cookiecontainer-domain-handling-issue-net-2-0-3-5

I got three whole week with pain in my head about this issue. AND there is no solving problem for 3.5 ( its feeling like abandoned technology by microsoft ).

Anyways, here the solving code from http://dot-net-expertise.blogspot.com/2009/10/cookiecontainer-domain-handling-bug-fix.html

Here the solution:
  1. Don’t use .Add(Cookie), Use only .Add(Uri, Cookie) method.
  2. Call BugFix_CookieDomain each time you add a cookie to the container or before you use .GetCookie or before system use the container.
private void BugFix_CookieDomain(CookieContainer cookieContainer)
{
    System.Type _ContainerType = typeof(CookieContainer);
    Hashtable table = (Hashtable)_ContainerType.InvokeMember("m_domainTable",
                               System.Reflection.BindingFlags.NonPublic |
                               System.Reflection.BindingFlags.GetField |
                               System.Reflection.BindingFlags.Instance,
                               null,
                               cookieContainer,
                               new object[] { });
    ArrayList keys = new ArrayList(table.Keys);
    foreach (string keyObj in keys)
    {
        string key = (keyObj as string);
        if (key[0] == '.')
        {
            string newKey = key.Remove(0, 1);
            table[newKey] = table[keyObj];
        }
    }
}


Here example of piece my code, to help you better understanding.
Uri target = new Uri("http://yourwebsite.com/login");

HttpWebRequest Crequest = (HttpWebRequest)WebRequest.Create(target);

//reset MAINCookieContainer;
MAINCookieContainer = new CookieContainer();
Crequest.CookieContainer = MAINCookieContainer;
Crequest.Credentials = CredentialCache.DefaultCredentials;
((HttpWebRequest)Crequest).UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36";
Crequest.Method = "GET";
Crequest.ContentType = "application/x-www-form-urlencoded";
HttpWebResponse Cresponse = (HttpWebResponse)Crequest.GetResponse();
foreach (Cookie cookie in Cresponse.Cookies)
{
 //add Cookie's to the MAINCookieContainer (the next HttpWebRequest will use them)

 MAINCookieContainer.Add(target, cookie);
 BugFix_CookieDomain(MAINCookieContainer);
}

Saturday, October 26, 2013

Auto Multi Upload using C#, Selenium, and AUTOIT.

Files to upload ( with different path ):

"C:\40vid\Curse of Chucky\Curse of Chucky.mp4"
"C:\40vid\Restrepo\Restrepo.mp4" 


Using this method will not working, using Process.Start

'"C:\40vid\Curse of Chucky\Curse of Chucky.mp4" "C:\40vid\Restrepo\Restrepo.mp4"'
and this
""C:\40vid\Curse of Chucky\Curse of Chucky.mp4" "C:\40vid\Restrepo\Restrepo.mp4""

To work on windows ( using xp sp3 ) from commandline using Process.Start, space must inside double quote

like this:
" 'C:\40vid\Curse of Chucky\Curse of Chucky.mp4' 'C:\40vid\Restrepo\Restrepo.mp4' "
But if we use path like that, will not working on Upload windows.

Solutions

In C#

string gb1 = @"C:\40vid\Curse of Chucky\Curse of Chucky.mp4";
string gb2 = @"C:\40vid\Restrepo\Restrepo.mp4";
string jadikansatu = @"""" + "'" + gb1 + "'" + " " + "'" + gb2 + "'" + @"""";
 
 

 
In AutoIt v3
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=D:\Bara\selenium&autoit\youtubeauto.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
WinWait ("File Upload");
WinActivate("File Upload");
;Local $file = '"C:\40vid\Curse of Chucky\Curse of Chucky.mp4" "C:\40vid\Restrepo\Restrepo.mp4"';
;ControlSetText("File Upload", "", "[CLASS:Edit; INSTANCE:1]", ''&$file&'' )

$removedoublequotes = StringReplace($CmdLine[1], '"', '')
$gantisinglequotes2double = StringReplace($removedoublequotes, "'", '"')
ControlSetText("File Upload", "", "[CLASS:Edit; INSTANCE:1]", $gantisinglequotes2double)
ControlClick("File Upload", "", "[CLASS:Button; INSTANCE:2]")
;ControlClick("File Upload", "", "[CLASS:Button; INSTANCE:2]")



and compile to auto.exe

add this before clicking browse button and done
Process.Start(@"C:\auto.exe", jadikansatu);
Problem solve

Thursday, October 24, 2013

Local Area Network : How to fix slow LAN transfer speed of files in Windows 7 ( working to windows 8 )

Recently I had to solve a problem of a very slow transfer of files between two computers on a LAN network using Ethernet cable. Both machines had Windows 7 x64 installed and the transfer speed was ridiculously slow at 10-15kb/s. Using Task Manager under Networking tab, Network Utilization was showing only around 0.25% for Local Area Connection.
I looked around the web for solutions and found quite a few suggestions how to tackle this problem. Those that I tried and the one that finally solved my problem are discussed here.



Turning off “Remote Differential Compression”

One of the first suggestions that I came across was to turn off this Windows Feature in Windows 7.
This suggestion is common on the web but it turns out to be just a myth.
From TechNet:
This is 100% false. Neither Windows Update or file copy operations use RDC at all. 
So I ignored this suggestion and continued looking.


Disabling “TCP Auto-Tuning”

This is another common suggestion that I came across and it uses NETSH command-line utility used for displaying and modifying the network configuration. To make the necessary changes, we need to run that utility as an Administrator.
  1. Open Command Prompt as Administrator:
    • Click on Start Menu
    • Type Command in search box
    • Command Prompt will show up in results. Right-click on it to open Context Menu
    • Select Run as administrator
    • If User Account Control Window shows up asking if you want to allow the following program to make changes, select Yes
  2. Type: netsh interface tcp set global autotuning=disabled
  3. Restart the computer
  4. To verify that the auto-tuning is still disabled type in Command Prompt:
    netsh interface tcp show global
This suggestion still didn’t solve my problem, so I looked further but before doing that I wanted to set Auto-tuning back to the default value by typing this in the Command Prompt (running as an Administrator):
netsh interface tcp set global autotuning=normal

Disabling “Large Send Offload (LSO)”

Large Send Offload is a technique of improving network performance while at the same time reducing CPU overhead. Apparently it does not work very well, so it was suggested to disable it. If you would like to know about LSO, check this MSDN article from 2001.
LSO is an option located in a Device Manager under your network adapter, so this solution requires Administrator Privileges.
Follow these steps:
  1. Open Start Menu, right-click on Computer and select Properties
  2. Under Control Panel Home located on the left side of the window click on Device Manager
  3. You will get a list of all devices on your machine. Expand Network Adapters.
  4. Find your Network Card and double-click on it.
  5. Select Advanced tab. You will get a list filled with different options.
  6. Select Large Send Offload V2 (IPv4) and set the value to Disabled
  7. Do the same for Large Send Offload V2 (IPv6) if it is available
  8. Click OK
After clicking OK, I tried to send a file over the LAN network. The transfer speed started very slow, but it was gradually picking up speed. I decided to restart the computer and try to send that file again and this time it worked like a charm.
Now that sending of files worked as it should, I also checked speed for receiving files. It turned out that it was still slow but all I had to do to fix that was to disable Large Send Offload V2 on the other computer. Once done,  the problem was solved for receiving files as well.

Conclusion

In this post we examined different ways to solve slow speed on a LAN network. One of them is just a common myth, but for other two you need to have administrator privileges. I hope you found this article useful. Consider sharing it on a social networks. Comments are also welcome.
If you solved your slow LAN speed problem in a different way, let me know how and I might add that solution to the list.

Taken from:
http://www.howtosolutions.net/2013/06/fixing-slow-sending-or-receiving-of-files-through-lan-network-using-windows/


Tuesday, December 18, 2012

Ubuntu Freezing? Piece of Cake

Safely reboot after Ubuntu freezes.
===========================

Have you ever had the problem that Ubuntu freezes ? You type on your keyboard,
you move the mouse but nothing really happens. As last resort we use the
"Hard reset" button. Everybody knows this is bad for your pc,
it can causse severe damage to your hardware.

So now we ask ourselve... Is it possible to reboot the system in a safe way?
The answer is: YES!

First you got to find your SysRq button on your keyboard, mostly it's the same as Prt sc (print screen).

- To use this magic, you should check the value of "/proc/sys/kernel/sysrq" file by typing the following command:
cat /proc/sys/kernel/sysrq

- If it prints "1", your good to go. If not edit it with the following command :
sudo echo "1" > /proc/sys/kernel/sysrq

- When your Ubuntu freezes, simply press and hold :
Alt + SysRq

- While holding the Alt and SysRq keys down, type the following keys in order, pausing for several seconds in between each key:
reisub


Command list:
---------------------
r – Puts the keyboard into raw mode, taking control of it away from the X server.
e – Sends the terminate signal to all processes, asking them to end gracefully.
i – Sends the kill signal to all processes, forcing them to end immediately.
s – Flushes data from your cache to disk.
u – Remounts all file systems read-only.
b – Reboots your computer.

Saturday, December 15, 2012

[SOLVED] Installing Backtrack 5 R3 in Lenovo G475 AMD

Mau installing Backtrack menyebabkan sistem berantakan...

UNETBOOTIN, UNIVERSAL USB, POWERISO, no luck (LIVE USB), bahkan gw bela belain burning ke dvd, udah abis 2 DVD nggak mau install juga...

Nah kalau kalau nemuin masalah kayak gitu

Akhirnya gw pake ini

http://www.linuxliveusb.com

Dan WORKED Like charm...

Have a tried...

Saturday, December 8, 2012

[SOLVED] windows 8 no IPv4?

To install IPv4, run Command Prompt as an administrator, type this
netsh interface ipv4 install
Restart and you done....

Thursday, November 1, 2012

Atasi nggak bisa auto disable touchpad in notebook ( especially for lenovo g475 with synaptic v7.2)

Okeh intinya kemarin gw abis beli lenovo g475 ( amd gitu loh )... semuanya keren banget dah tapi pass gw coba teryata mampus nggak bisa disable synaptic touchpad...

ubek sana ubek sini teryata ada caranya eui...


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Synaptics\SynTPEnh]
"DisableIntPDFeature"=dword:00000033

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Synaptics\SynTPEnh]
"DisableIntPDFeature"=dword:00000033
simpan masing masing script diatas dengan extensi .reg example : autodisable1.reg and autodisable2.reg after down, tinggal di install dah... di jamin sekarang udah keren kayak tampang ane dah...

Thursday, October 25, 2012

Weird Error Di imacros


pass testing automated blogpost dengan imacros, gw sering nemuin begini

RuntimeError: Invalid DATASOURCE_LINE value: 14, line: 17 (Error code: -951

tapi waktu itu gw mengunakan palemoon dengan versi terbaru, gw pikir pikir data csvnya yang ngaco... eh teryata nggak emang ada masalah dengan palemoon.. ehem.. weird...

Pass gw gunain mozilla, ehh malah aman jaya sentosa dan sejahtera... Goblok. -_-"

pass di test di komputer lain tetep aja error... what happen ini?

akhirnya pass gw ganti

SET !LOOP 17

teryata lancar jaya... mungkinkah masalah encoding penyebab masalah ini?

Weirdbugs

Update teryata errornya ketahuan begini, untuk beberapa xp versi lama..


<img
  src='http://ecx.images-amazon.com/images/I/31oOGM7t%2BbL.jpg'
  alt='HOME-THEATER Surround-Sound-System 5.1 mit Fernbedienung' />


perhatikan tanda %2 di url tersebut teryata masalah adalah itu....

Trus bagaimana cara mengatasinya...

kasihlah sebuah tanda begini "" ( double quote )
jadi

*note penting ini kita mengunakan csv sebagai datasource ya...

,"<img src='https://ecx.images-amazon.com/images/I/31oOGM7t%2BbL.jpg' alt='HOME-THEATER Surround-Sound-System 5.1 mit Fernbedienung' />",