JavaScriptWhat is $ (the Dollar Sign) in JavaScript scripts ?We all use the call to document.getElementById() a lot. So, the industry made an informal standard. function $(element) { var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var oneArg = arguments[i]; if (typeof oneArg == string) { element = document.getElementById(oneArg); } if (arguments.length == 1) { return element; } elements.push(element); } return elements; } You can of course implement your own, or use any of public JavaScript libraries that use it. Some advanced example can be JQuery, which uses $() as the selector. Usage consist of calls: $('#id') - this would "select" element by id $('.xxx') - this would "select" all elements, which have CSS class "xxx" attached and gives more - just read about selectors in JQuery documentation. OperaWhere does Opera store cookies?
LinuxHow to delete all files in subdirectories using wildcards ?Try understanding and then using one of these lines:find . -name "*.d" -exec rm -rf {} \; Warning: you are messing with files removal... Do not remove too much :)find . -name "*.d" -exec rm {} \; How to remove all .svn directories?To remove all .svn dirs:find . -name .svn -exec rm -rf {} \; To be sure you won't remove too much, try listing them before removal:find . -name .svn -exec ls {} \; How to run Linux programs on linux machine, but display graphics using X-Server on Windows machineYou can do it simply installing and configuring X-Ming and ssh on windows and then running some scripts...Read the "Short XMING how-to" (somewhere around on this site). Short XMING how-to
How to disable .bash_historyin ~/.bashrcadd line: HISTFILE=/dev/null allow login to Gnome as rootLogin as root to Linux graphic environment is generally not recommended. That's why Gnome and KDE in most distros have root login disabled.To allow login to Gnome as root: add to file /etc/gdm/custom-conf [security] AllowRoot=yes AllowRemoteRoot=yes Windows 7 or Windows Vista installationchanging user logon policy (works on 7 and Vista)
disable UACcontrol panel -> User Account and Family -> Change security settings in windows PL:panel sterowania -> konta uzytkownikow -> wlacz lub wylacz kontrola konta uzytkownika turn off the hibernationThis kills the big hibernation file (hiberfill.sys).powercfg -h off Notice, this may need administrator privileges (try opening command prompt as administrator).open command prompt as administrator on windows 7There are many ways, which give same result:1. open the Start Menu, type "cmd", then press CTRL+SHIFT+ENTER. 2. open the Start Menu -> All Programs -> Accesories, then RIGHT CLICK on Command prompt, and click on RUN AS ADMINISTRATOR. 3. open the Start Menu, type "cmd", then RIGHT CLICK on cmd in "found" pane, and click on RUN AS ADMINISTRATOR. turn off the explorer view settings storage per folderwww.vistax64.com/tutorials/70819-windows-explorer-folder-view-settings.htmlSamba authentication problemsenter regedit, edit the key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa change the value "3" to value "1".Meanings of that value can be found here: technet.microsoft.com/en-us/library/cc960646.aspx Also for reference: 0 – Clients use LM and NTLM authentication, but they never use NTLMv2 session security. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 1 – Clients use LM and NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 2 – Clients use only NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controller accepts LM, NTLM, and NTLMv2 authentication. 3 – Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 4 – Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controller refuses LM authentication responses, but it accepts NTLM and NTLMv2. 5 – Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controller refuses LM and NTLM authentication responses, but it accepts NTLMv2. Samba performance problemsTry this if you experience low bandwidth or long seek times during transfers to/from Samba server.This happens mostly due to multi-media related transfers - e.g. when jumping to different part of a movie or mp3. Try:
network problems related to MTUTo check what MTU is not going out through your network gateways, run:ping -f -l 1432 kongregate.com where 1432 is a size of a packet, and kongregate.com is a server you got the problems with.Try starting from a packet size of 1500, then decrease it by steps of 8 (1492, 1484, 1476 and so on) to probe for a best value. You should go down to the number, that makes you pass the ping packets without problems (e.g. 1432). Then use this value in following commands: netsh interface ipv4 show subinterfaces Find the name for your connection (e.g. "local connection") and use the following formula:netsh interface ipv4 set subinterface "THE CONNECTION NAME" mtu=1432 store=persistent |