Wednesday, April 28, 2010

Solution for multithreaded GTK+ GUI hang and Random Crash.


Here is a solution that i found for multi-threaded PyGTK+ GUI hang/Crash. After a long search i found this code in some where on the internet, but i can't remember where is it really placed.


For What:
GTK+ is not thread safe, So we have to use "gtk.gdk.threads_enter" and "gtk.gdk.threads_leave" for that. This will make threading safe on GTK+, Like this
#!/usr/bin/env python
# -*- coding: utf-8 -*-
gtk.gdk.threads_enter()
#Handling GTK+ GUI
gtk.gdk.threads_leave()

but some time GUI hangs when same thread acquire this lock  for more than one time like this.
gtk.gdk.threads_enter()
#Handling GTK+ GUI
gtk.gdk.threads_enter()  #************ 
#again Handling GTK+ GUI
gtk.gdk.threads_leave()
So we have to find is this thread has it's lock already or not and make lock.
here is the code that will track threads and find is that really has it lock or not and make correct Locks.

Code:Download
class Check_For_Lock:
        def __init__(self):
                self.lock = threading.Lock()
                self.thread = None
                self.locked = 0
        def __enter__(self):
                with self.lock: DoLock = (thread.get_ident()!=self.thread)
                if DoLock:
                        gtk.gdk.threads_enter()
                        with self.lock: self.thread = thread.get_ident()
                self.locked += 1
                return None

        def __exit__(self, exc_type, exc_value, traceback):
                with self.lock:
                        self.locked -= 1
                        if self.thread!=thread.get_ident():
                                print "!ERROR! Thread freenot locked lock!"
                                sys.exit(0)
                        else:
                                if self.locked == 0:
                                        self.thread = None
                                        #Added BY me  SEE WHY?:
                                        #http://library.gnome.org/devel/gtk-faq/stable/x491.html
                                        gtk.gdk.flush()
                                        gtk.gdk.threads_leave()
                return None
TLocker = Check_For_Lock()

def TLocked(f):
    def wraps(f):return f
    #@wraps(f)
    def wrapper(*args, **kwds):
        with TLocker.lock:
            if TLocker.thread == None or TLocker.thread==thread.get_ident():
                TLocker.thread = thread.get_ident()
                TLocker.locked += 1
                WeHold = True
            else:
                print "***ERROR: GtkLocked for non-owned thread!"
                WeHold = False
        ret = f(*args, **kwds)
        if WeHold:
            with TLocker.lock:
                TLocker.locked -= 1
                if TLocker.locked == 0: TLocker.thread = None
        return ret
    return wrappr
I used this code for my project RoxBird Download Manager.
I got so many crashes on RoxBird. after that i removed gdk.threads_enter()/leave() and used this, Now RoxBird have a stable GUI.

you can use it simply like this

with TLocker:
    #Make changes on GTK+ GUI.
    window.set_size_request(400, 300)
#Connecting Signal via threads
widget.connect('signal_name', TLocked(CallFunction), UsrArg1, UsrArg2, ...)


Notes: 
  • You should create "gtk.gdk.threads_init()" after importing "gtk" module.  
  • You should use only one Instance of TLocker for the all application. (you can use reference for TLocker)
  • In threads all GUI handling should be inside of the "with TLocker" block.
  • "widget.connect" should called with TLocked like above, and connect statement should not inside of the "with TLocker" 
if i miss something on code or notes, feel free to comment.

Sunday, April 18, 2010

Tutorial to Flash/Upgrade Nokia mobile (You can do it yourself)

If you don't know what is Flashing:

Flashing or Upgrading your mobile is just like installing OS in your PC. But
the only one difference is, in PC processor was designed to work with many OS'
software's, but mobiles are not like PC. That can only work with it's own
software.

Installing OS on PC can be done by connecting CD/DVD drive or Thumpdrive
with PC. Like that mobile Flashing can be done by connecting Mobile with PC via
Cable.

For PC you need Setup Package of OS, Like PC mobile need its setup files,
There is a software named Navifirm to obtain these files for
us. you can get it from here: Download Navifirm

PC os's have a small software that can copy all needed files to HardDrive
while installing. mobile OS does not have softwares like PC OS's, So we need
another software to do that thing. In this example we are using JAF . You can
get it from here: Download JAF


You need:

You can get flash files on the internet. just google for "FLASH FILE (NOKIA
BB-5)" you'll get what you want.

OR

Use Navifirm (see above for download).

How to use Navifirm:

First of all you need to know your mobile RM number and SW version. see
underneath the battery.

Navifirm Download


eg:

Type: RM-84
CODE: 0539276
Model: N70-1

after this open Navifirm then select like this: Your RM number > SW
version > any language/color you want

then download only *.mcusw, *.ppm and Image files.

after that rename *.mcusw file to *.c0r.

Now we have Flash files for selected mobile, and JAF installed on system.


ToDo:

Note: Don't miss any steps below. READ CAREFULLY****

◆ Disable and Uninstall PC suite if you have. and also Uninstall Nokia Software Updater (NSU).

◆ Open JAF (see above for download.)

◆ Clike on tab what mobile you have (like BB5 or WD2) see/know more:BB5

◆ Connect phone in "PC suite" mode.

◆ Tick manual flash, factory set and normal mode. Also CRT 308 but it's already ticked.

◆ If you're flashing a DEAD phone, tick the manual flash, Factory set, Normal mode and dead flash. And remove tick from CRT308

◆ select the
MCU (the renamed **.c0r file),
PPM,
CNT (the **.image file)

◆ Plug in the phone to charger.

In case of dead flashing, don't connect the charger yet.

◆ Check cable connection for stable and then HIT "FLASH" .

◆Hit "OK"

In case of dead flashing, When jaf says "PRESS POWER ON NOW" , connect the charger and turn on the phone.

◆ the screen should go white and stay that way.

◆ Don't touch phone or cable till JAF says "done".

You may need to WAIT upto 10min for JAF finish.


Disclaimer:You should know some basic ideas about what you doing. I am not responsible for any loses due to wrong process, incorrect hardware's,careless.

Thursday, November 12, 2009

Spyware Doctor 6.1.0.447 license[2009]

Spyware Doctor with AntiVirus Full Version Information
Current Version: 6.0.1.447*
File Size: 25,558 KB
Operating System: Designed for Windows? Vista? 64-bit SP1, Vista? 32-bit, XP (Home and Professional Editions) and 2000.Windows? 98 users click here.
Release Date: June 24, 2009
Protection Against: Spyware, Adware, Trojans, Viruses, Worms, Keyloggers, Identity Theft, Hijackers, Tracking Threats, Rogue Anti-Spyware, Unwanted Software, Phishing, Popups and Bad Websites.
Add-ons: Free optional plug-ins are available for Spyware Doctor with AntiVirus including Behavior Guard
Trial Limitations: The trial offers time unlimited real-time protection (free spyware blocking), but does not remove threats detected during on-demand scans, updates may also differ to those supplied to registered users.
Starter Edition: The Starter Edition offers full scan and removal of threats, and basic real-time protection, is available for free as part of the Google Pack.


Windows XP (home, pro and 2000) 32 and 64bits
Windows Vista 32 and 64bits

Download:
http://hotfile.com/dl/13282625/35d2829/sdsetup.exe.html

ConceptDraw Office 1.2.4

ConceptDraw Office 1.2.4
ConceptDraw Office 1.2.4 | 182 MB

ConceptDraw Office is a powerful business productivity software suite. As the only integrated business solution on the market that supports the management of projects, ConceptDraw Office walks you through the first stage of brainstorming ideas, to the successful completion of a project. The powerful software integration of ConceptDraw Office provides superior process management capabilities.
ConceptDraw Office contains a comprehensive toolset that is designed to enable knowledge workers, in any size business, to streamline daily work and organize the information flow in a business process.

Core to ConceptDraw Office is the revolutionary InGyre technology developed by CS Odessa. Our InGyre technology tightly integrates the applications in ConceptDraw Office into one seamless and interactive business solution:

* ConceptDraw MINDMAP:
Mind mapping and business productivity tool
* ConceptDraw PROJECT:
Project management software
* ConceptDraw PRO:
Professional business graphics application

What's new in version 1.2.4
The latest release of ConceptDraw Office contains many improvements and feature enhancements. Each of the products that comprise ConceptDraw Office (ConceptDraw MINDMAP, ConceptDraw PRO and ConceptDraw PROJECT) have been updated and improved with new features.
Full Screen Mode in ConceptDraw MINDMAP
With full editing capability, easy navigation and product feature keyboard shortcuts, you get now more space to display ideas and present mind maps during meetings.
New Drag and Drop feature in ConceptDraw MINDMAP to organize project related documentation
Easily create hyperlinks from files associated with topics, making it a dynamic program for project related documentation and resource management. Hyperlinks are automatically created, and accurately organized around related topics.
Make you mind maps available to view for all team members.
ConceptDraw MINDMAP makes it easy to share map content with other project team members who do not have the ConceptDraw MINDMAP application installed. When MINDMAP users send mind maps via email, a PNG view attachment is automatically generated and attached to the email message.
New Visual Reports in ConceptDraw PROJECT
More visual reports to help project managers manage and control everyday activities and project progress. Project and task status can rapidly be presented in a visual, easy to understand manner, improving information flow within a project team.
New libraries in ConceptDraw PRO
The update features new libraries for the Transport industry, and professional themes that have been added to build professional looking business graphics and presentations.

http://file-rack.com/files/PwHAMuzsyd35/ConDrawOf124.part1.rar.html
http://file-rack.com/files/U6YpcDbhrSox/ConDrawOf124.part2.rar.html

Xilisoft HD Video Converter v5.1.26.1023 fullpack



Xilisoft HD Video Converter can easily convert HD video formats such as AVCHD (mts, m2ts), H.264/AVC, MKV, MPEG-2 (ts), DivX, HD WMV, MPEG-4 and Quick Time. Sit back and let Xilisoft HD Converter do the job for you, convert from HD videos to Standard-Definition (SD), or even upgrade an SD video to HD!Besides converting amongHD video formats, the Video Converter can also extract and convert audio files, capture pictures from various videos, make videos out of pictures with JPG, GIF, BMP or PNG extensions and even set the output file size.

* Supports HD videos such as AVCHD (mts, m2ts), TS, H.264/AVC, MKV
* Create videos and SWF/FLV file from pictures
* Convert popular formats like AVI, MPEG, WMV, MP4, DivX, RM, MOV, and FLV
* Convert HD to SD videos and audios

Key Features:
  • Video conversion
  • Easy conversion of video formats, especially with top support for decoding and encoding of all High-Definition video formats, including HD ASF, HD AVI, HD H.264/AVC, HD Quick Time, HD MPEG2 (MPEG, MPG), HD MPEG2 TS, HD MPEG4, HD MPEG4 TS, HD WMV, etc.;
  • Audio conversion :A few steps to extract audio from video and convert audio from one to another;
  • Picture conversion: Capture pictures from video and save as JPG, PNG, GIF, BMP and SWF, and create stylish video from your photos.
  • Split one source file to several or output certain segment by setting exact time length;
  • Customize the output file size for compatibility with different digital devices;
  • Set multiple output formats simultaneously from one for efficient output;
  • Luxuriant and optimized profiles listed to meet almost all needs for PS3, XboX, PSP, iPod, iPhone, and even to create your own profile for later use;
  • Source video, customized video and clipped video segment can be previewed, and you can also compare source video and customized video to view the effect more clearly;
  • Besides APE and CUE decoding support, converting from Audio CD to other audio formats is also available;
  • Detailed video, audio and picture output settings are adjustable to achieve better conversion effect, and you can also choose to run in background for conversion.
http://ugotfile.com/file/519648/Xilisoft.HD.Video.Converter.v5.1.26.1023.rar?rid=8238

Portable Registry Repair Wizard 2009 v6.21 -full

Portable Registry Repair Wizard 2009 v6.21 --full

Registry Repair Wizard scans the Windows registry and finds incorrect or obsolete information in the registry. By repairing these obsolete information in Windows registry, your system will run faster and error free. The backup/restore function of the tool let you backup your whole Windows Registry so you can use it to restore the registry to the current status in case you encounter some system failure. Besides above, the startup and BHO organizer feature let you manage your startup and IE BHO items with ease, and you can control the programs started with Windows and IE more handy with this feature!

http://hotfile.com/dl/17245446/3803a2a/Portable_Registry_Repair_Wizard_2009_v6.21_.rar.html