jump to navigation

Vista: Register DLLs Elevated Using the Context Menu Июль 7, 2009

Posted by russenreaktor in addictive.
add a comment

“To add the Register command in the context menu that’ll run the Regsvr32.exe command under elevated rights, you need to use the runas verb. Here is a REG file that I created, adds the runas verb for DLL and OCX file types in the following registry keys:
HKEY_CLASSES_ROOT \ Dllfile \ runas
HKEY_CLASSES_ROOT \ Ocxfile \ runas

1. Download the file register_runas.reg and save to Desktop.

2. Right-click on the file and choose Merge.

3. Click Yes when you’re asked for confirmation.

You should now see the Register (as Administrator) command in the right-click menu for DLL and OCX file types.

winhelponline.com

Remove ugly sound on HTC HERO boot (SuperHero) Июнь 30, 2009

Posted by russenreaktor in android.
Tags: , , ,
add a comment

You should write in your windows console (do not forget install Android SDK)

adb remount
adb shell
#cd /system/media
#rm boot.mp3
#reboot

Alternatively you can replace boot image and sound
http://forum.xda-developers.com/showthread.php?t=508078

Using a Horizontal Progress Bar in Android Июнь 23, 2009

Posted by russenreaktor in android, develop, programming.
Tags: ,
add a comment

“I was working on my Android downloader application yesterday, when I ran into a bit of a snag. I wanted to display a list of downloads (similar to the Firefox downloads window). Each item in the list should show the file name and a horizontal progress bar. I started to implement this, and several hours later stumbled upon the archaic solution. I wanted to share this, both to help anybody who may be trying to do something similar, and also to illustrate how the lack of good documentation is hurting aspiring Android developers.

I thought that I could put a ProgressBar instance in my xml, set it to be indeterminate, give it a max and a value, and be done. However, it wasn’t nearly that easy. After a few hours of hunting on Google and the Android Groups, I stumbled upon the solution in an online preview of The Busy Coder’s Guide to Android Development. In short, I had to set the following on my ProgressBar’s XML:

style="?android:attr/progressBarStyleHorizontal"

WTF?

http://bytecrafter.blogspot.com/2008/12/using-horizontal-progress-bar-in.html

to get horizontal progressbar just put

<ProgressBar
android:id="@+id/ProgressBar01"
android:indeterminateOnly="false"
android:progressDrawable="@android:drawable/progress_horizontal"
android:indeterminateDrawable="@android:drawable/progress_indeterminate_horizontal"
android:minHeight="20dip"
android:maxHeight="20dip" android:layout_width="fill_parent"></ProgressBar>

into your \res\layout\main.xml

yGuard – Java™ Bytecode Obfuscator and Shrinker Июнь 18, 2009

Posted by russenreaktor in programming.
add a comment

“yGuard is a free Java bytecode obfuscator and shrinker that improves your software deployment by prohibiting unwanted access to your source code and drastically shrinking the processed Jar files at the same time.
Features

* yGuard is absolutely free! Contrary to expensive commercial products of our competitors providing the same amount of features as yGuard or less, yGuard is free.
* yGuard is an Ant task! Existing tools use proprietary mechanisms to invoke or configure the task of obfuscation. As an Ant task, yGuard can be seamlessly integrated into your deployment process using XML syntax.
* yGuard provides highly configurable name obfuscation that will protect your intellectual property from reverse engineering.
* yGuard provides elaborate code shrinking functionality through dependency analysis.
* yGuard 2.0 offers a new powerful and easy to use XML syntax that allows the effortless definition of code entities e.g. based on pattern sets or inheritance.
* yGuard will correctly obfuscate and shrink programs that depend on external libraries.
* yGuard can automatically rename and adjust textual resource files according to the obfuscation scheme.
* yGuard can scramble and unscramble or shrink line number table information. This means that debugging an obfuscated program is still achievable without weakening the obfuscation.
* yGuard can create patches! During each obfuscation run, yGuard produces XML output that can be used to create subsequent patches of already deployed obfuscated applications.
* yGuard supports JDK 1.5 features and correctly obfuscates classes compiled with its new features. ” yworks.com

How do I pass parameters to a batch file? Май 18, 2009

Posted by russenreaktor in windows.
add a comment

“A. When you call a batch file, you can enter data after the command that the batch file refers to as %1, %2, etc. For example, in the batch file hello.bat, the following command
@echo hello %1 boy

would output
hello john boy

if you called it as
hello john

The following table outlines how you can modify the passed parameter.
Parameter Description
%1 The normal parameter.
%~f1 Expands %1 to a fully qualified pathname. If you passed only a filename from the current directory, this parameter would also expand to the drive or directory.
%~d1 Extracts the drive letter from %1.
%~p1 Extracts the path from %1.
%~n1 Extracts the filename from %1, without the extension.
%~x1 Extracts the file extension from %1.
%~s1 Changes the n and x options’ meanings to reference the short name. You would therefore use %~sn1 for the short filename and %~sx1 for the short extension.

The following table shows how you can combine some of the parameters.
Parameter Description
%~dp1 Expands %1 to a drive letter and path only.
%~sp1 For short path.
%~nx1 Expands %1 to a filename and extension only.

To see all the parameters in action, put them into the batch file testing.bat, as follows.
@echo off
echo fully qualified name %~f1
echo drive %~d1
echo path %~p1
echo filename %~n1
echo file extension %~x1
echo short filename %~sn1
echo short file extension %~sx1
echo drive and directory %~dp1
echo filename and extension %~nx1

Then, run the file with a long filename. For example, the batch file run on the file c:\temp\longfilename.long would produce the following output.
fully qualified name c:\TEMP\longfilename.long
drive c:
path \TEMP\
filename longfilename
file extension .long
short filename LONGFI~1
short file extension .LON
drive and directory c:\TEMP\
filename and extension longfilename.long

This method also works on the second and subsequent parameters. You simply substitute the parameter for 1 (e.g., %~f2 for the second parameter’s fully qualified path name).

The %0 parameter in a batch file holds information about the file when it runs and indicates which command extensions you can use with the file (e.g., %~dp0 gives the batch file’s drive and path).” windowsitpro.com

svn:externals Май 15, 2009

Posted by russenreaktor in development.
Tags:
add a comment

“This assumes that your project layout looks something like this:

project/
branch/
production/
tag/
trunk/

* In the top of your project trunk, execute the following:

svn propedit svn:externals .

* This will open an editor session. In the file opened by your editor, each line indicates a different external svn repo to pull. The first segment of the line is the directory where you want the pull to exist. The last segment is the svn repo URL to pull. You can have an optional middle argument indicating the revision to use. Some examples:
o Pull framework repo from head:

framework http://framework.zend.com/svn/framework/trunk

o Pull framework repo from revision 2616:

framework -r2616 http://framework.zend.com/svn/framework/trunk

* After saving and exiting, update the repo:

svn up

* Commit changes:

svn commit

One thing to note: any directory you specify for an svn:externals checkout should not already exist in your repository. If it does, you will get an error like the following:

svn: Working copy ’sharedproject’ locked
svn: run ’svn cleanup’ to remove locks
weierophinney.net

After that add default username for svn host (because we do not have username of external repository)

  • Linux
vi ~/.ssh/config
Host svn.wn.d-o-m.org
User <svnuser>
  • Windows – set default username for <svn-host> via putty

I got an error saying “This client is too old to work with working copy ‘…’ “. How can I fix it without upgrading Subversion? Май 6, 2009

Posted by russenreaktor in develop.
add a comment

“Sometimes the working copy metadata format changes incompatibly between minor releases. For example, say you have a working copy created with Subversion 1.4.4, but one day you decide to try out Subversion 1.5.0. Afterwards, you attempt to switch back to 1.4.4, but it doesn’t work — it just gives the above error.

This is because 1.5.0 upgraded your working copy format to support some new features (in this case, changelists, the keep-local flag, and variable-depth directories). Although 1.4.4 doesn’t know anything about these new features, it can at least recognize that the working copy format has been upgraded to something higher than it can handle.

1.5.0 upgraded the working copy for a good reason: it realizes that 1.4.4 does not know about these new features, and that if 1.4.4 were to meddle with the working copy metadata now, important information might be lost, possibly causing corruption (see issue #2961, for example).

But this automatic upgrade behavior can be annoying, if you just want to try out a new release of Subversion without installing it permanently. For this reason, we distribute a script that can downgrade working copies when doing so is safe:

http://svn.collab.net/repos/svn/trunk/tools/client-side/change-svn-wc-format.py

Run that script with the “–help” option to see how to use it. As future versions of Subversion are released, we will try to keep this FAQ entry up-to-date with potential downgrade scenarios and their implications.” subversion.tigris.org

HTTP Status Codes Апрель 27, 2009

Posted by russenreaktor in programming.
Tags:
add a comment

  • 100 Continue
  • 101 Switching Protocols
  • 102 Processing
  • 200 OK
  • 201 Created
  • 202 Accepted
  • 203 Non-Authoritative Information
  • 204 No Content
  • 205 Reset Content
  • 206 Partial Content
  • 207 Multi-Status
  • 226 IM Used
  • 300 Multiple Choices
  • 301 Moved Permanently
  • 302 Found
  • 303 See Other
  • 304 Not Modified
  • 305 Use Proxy
  • 306 (Unused)
  • 307 Temporary Redirect
  • 400 Bad Request
  • 401 Unauthorized
  • 402 Payment Required
  • 403 Forbidden
  • 404 Not Found
  • 405 Method Not Allowed
  • 406 Not Acceptable
  • 407 Proxy Authentication Required
  • 408 Request Timeout
  • 409 Conflict
  • 410 Gone
  • 411 Length Required
  • 412 Precondition Failed
  • 413 Request Entity Too Large
  • 414 Request-URI Too Long
  • 415 Unsupported Media Type
  • 416 Requested Range Not Satisfiable
  • 417 Expectation Failed
  • 418 I’m a teapot
  • 422 Unprocessable Entity
  • 423 Locked
  • 424 Failed Dependency
  • 425 (Unordered Collection)
  • 426 Upgrade Required
  • 500 Internal Server Error
  • 501 Not Implemented
  • 502 Bad Gateway
  • 503 Service Unavailable
  • 504 Gateway Timeout
  • 505 HTTP Version Not Supported
  • 506 Variant Also Negotiates
  • 507 Insufficient Storage
  • 510 Not Extended

see also : RFC2616 HTTP/1.1, RFC2324 HTCPCP/1.0

status-code.com

WirelessKeyView – Recover lost wireless network key Апрель 23, 2009

Posted by russenreaktor in software.
add a comment

“WirelessKeyView recovers all wireless network keys/passwords (WEP/WPA) stored in your computer by the ‘Wireless Zero Configuration’ service of Windows XP and by the ‘WLAN AutoConfig’ service of Windows Vista. It allows you to easily save all keys to text/html/xml file, or copy a single key to the clipboard.

nirsoft.net

Vi: Undo Апрель 22, 2009

Posted by russenreaktor in linux.
add a comment

“u | Undo the latest change. U | Undo all changes on a line, while not having | moved off it (unfortunately). :q! | Quit vi without writing. :e! | Re-edit a messed-up file.” unix.t-a-y-l-o-r.com