الاستخارة للزواج

الزواج من أهم الخطوات والقرارات المصيرية التي يمكن أن يتّخذها أي إنسان في حياته كلها، ومن أهم الأمور التي يحتاجُ فيها إلى الاستشارةِ والتفكيرِ بهدوءٍ وتريّثٍ قبل الإقدامِ عليهِا، فالزواج له أبعادٌ تمتدُّ طيلةَ حياةِ الإنسانِ، وبنجاحهِ يتميز الفرد عن غيره، وإن حصل وفشل الزواج، فقد يؤدي في بعض الأحيان إلى فشل الفرد في حياته العلمية والعملية، وبالتالي فإنّه من المهم أن يستعين المسلم بالله سبحانه، وتتجلى الاستعانة بالله من خلال صلاة الاستخارة، فهنا تظهر أهمية الاستخارة للفرد المسلم عند الإقدام على الزواج، فلن يجدَ العبد في الحياة الدنيا أكثر إعانةً ونُصحاً من الله، فهو المُطّلعُ على الغيبِ، يعلم خفايا النفوسِ، ويعلم ما تُكنّهُ الصدور من خيرٍ أو شرٍ، وإن ظهر للعبد الخير في زواجه، فقد يكون عاقبة هذا الزواج شراً له، فجاءت صلاةُ الاستخارةِ؛ لتُعين العبدَ وتُساعده على انشراحِ صدرِه، وقرارةِ عينِه، وراحةِ نفسِه في أمره، فقد فوّضَ أمره لله سبحانه، وترك الأمورَ كلها له سبحانه لتيسيرِ أمرهِ وحيرته في اتخاذ قرار الزواج.

Error:Failed to open zip file. Gradle’s dependency cache may be corrupt

This usually happens when something goes wrong in Android Studio’s first launch (eg. system crash, connection loss or whatever).

To resolve this issue close Android Studio and delete the following directory’s content, necessary files will be downloaded on IDE’s next launch.

macOS: ~/.gradle/wrapper/dists

Windows: C:\Users\your-username\.gradle\wrapper\dists

While downloading Gradle manually works, I recommend letting Android Studio itself to do it.

java.lang.OutOfMemoryError: GC overhead limit exceeded

After upgrading Google Play services library from 9.4.0 to 10.2.0 Gradle build fails with following error:

Information: Gradle tasks [:app:assembleDebug]
Error: UNEXPECTED TOP-LEVEL ERROR:
Error: java.lang.OutOfMemoryError: GC overhead limit exceeded
Error: Execution failed for task ‘:app:transformClassesWithDexForDebug’.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
Information:BUILD FAILED

The issue was resolved by adding following code to build.gradle within  android {…}:

dexOptions {
    javaMaxHeapSize "2g"
}

APK Hack Tool in Mac

When I want to hack an apk, I always run some cmd , but now one click.

ApkHackTool

When I want to hack an apk, I always run some cmd , but now one click.

How to use

  • brew install apktool
  • cd {path}/ApkHackTool
  • ./ApkHackTool.sh path.apk ## I can also drag an apk into terminal ##

Effect

Files : https://github.com/lipangit/ApkHackTool/archive/master.zip

 

Install apktool on Mac OSX

About the App

Install the App

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Run in Terminal app:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
    and press enter/return key. Wait for the command to finish.
  3. Run:
    brew install apktool

Done! You can now use apktool.

Installing Cordova and SDKs on OS X

Installing Cordova and SDKs on OS X

This document describes how to install Apache Cordova and SDKs for iOS and Android on an OS X machine.

Install Cordova
Follow these steps to install Cordova:

Install Node.js. Cordova runs on the Node.js platform, which needs to be installed as the first step. Download installer from: http://nodejs.org

Go ahead an run the downloaded installation file.

To test the installation, open a terminal window (make sure you open a new terminal window to get the settings made by the Node.js installation), and type:

node –version
If the version number is displayed, Node.js is installed and working!
Install Git. Git is a version control system, which is used by Cordova behind-the-scenes. Download the installer from: http://git-scm.com.

Install Cordova. Cordova is installed using the Node Package Manager (npm). Type the following in the terminal window to install:

sudo npm install -g cordova
Test the Cordova install by typing:

cordova –version
If you see the version number, you have successfully installed Apache Cordova!
Install Xcode for iOS development
If you wish to develop iOS apps, go ahead and install Xcode, which is Apple’s development tool for iOS app development:

To access iOS development resources, you need to sign up for an Apple account if you have not already done that.

To deploy apps on devices (iPhone and iPad) and to publish apps on the AppStore, you should join Apple’s iOS Developer Program. This costs 99 USD per year.

Install Xcode from: https://developer.apple.com/xcode/downloads

When the install is complete, launch Xcode and enable the command line tools for Xcode (these are used by Cordova).

From the Xcode menu, select Preferences…

Select the Downloads tab.

Under Components, locate Command Line Tools and click the download icon.

If you get stuck, try out the Cordova documentation for iOS.

Xcode is now ready to be used with Cordova. The way this works that that you create and build a Cordova project, the build process generates an Xcode project, that you just double-click to open. When your project is open in Xcode, you can run it in the iOS simulator or deploy the app to a device. Follow the instructions in the Cordova Guide to try this!

Install the Android SDK
To develop Android apps, you need to install Java, the Ant build tool, and the Android SDK.

Install Java
To use the Android SDK the Java SDK needs to be installed (minimum version 1.6). How to install:

To check if Java is already installed, type this in a terminal window:
javac -version
If you see a version number at or above 1.6 you should be good to go.
If Java is not installed, get the Java for OS X installer from Apple’s download page. Direct link: support.apple.com/kb/DL1572.

Install Ant
Apache Ant is a build system for Java, which is used by Cordova and the Android SDK. Use Homebrew to install Ant, using the following steps:

Start by checking if you have Ant installed by opening a terminal window and run:

ant -version
If you see a version number, Ant is already installed.
Next, check if you have Homebrew installed by typing:

brew –version
If you see a version number, Homebrew in installed.
If you have Homebrew installed, but not Ant, install Ant from a terminal window using these commands:

brew update
brew install ant
If neither Homebrew nor Ant is installed, install both of them with the following commands:

ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”
brew install ant
Now test the install with:

ant -version
Install Android Developer Tools (ADT)
Download the Android Developer Tools (Eclipse ADT) from developer.android.com/sdk. The install is a zip-file, which you can unpack to a location of your choice. Make a note of there you install the SDK files, as you will have to add these to the system path.

Add the path to the folder where you unzipped the Android SDK tools to the files .bash_profile and .bashrc (these files are located in your home directory). This is needed for Cordova to find the Android build tools.

Edit .bashrc in nano (or any editor you prefer) by typing the following in a terminal window (the cd command takes you to your home directory).

cd
nano .bashrc
In the nano editor, add the following line, with “/Users/username/android” substituted by the actual location of the Android SDK (note that there are two paths in one line, separated by a colon):

export PATH=/Users/username/android/sdk/platform-tools:/Users/username/android/sdk/tools:$PATH

Save and exit by typing CTRL+O (the letter key O) and CTRL+X.
Next, check that .bashrc is loaded by .bash_profile (.bash_profile is loaded when you open a terminal window, and we want the path set for terminal windows). Open the file .bash_profile in nano:

nano .bash_profile
If not present already, add the following lines to .bash_profile:

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
Now test the install. Close any open terminal windows, open a new terminal window and type:

adb version
This should display the version of the Android Debug Bridge.
As the final step, you need to get the specific Android SDK version used by Cordova. This is done by running the Android SDK Manager by typing the command:

android
This launches a window where you can select to install specific Android SDKs.
First time you launch the Android SDK Manager there will be preset selections. It is recommended to leave these untouched. Also select the entry “Android 4.4.2 (API 19)”. This is the version used by the current Cordova 3.5 version. Note that the Android SDK required by Cordova will change in the future, as new versions of Cordova and Android are released. When this happens, open the Android SDK Manager again, and install the required API version(s).

If you get stuck, consult the Cordova documentation for Android. You are also welcome to ask for help at the Evothings Forum.

The fun begins
Next step is to create and build a Cordova project. Go to the Cordova Guide to learn more.

Use Evothings Studio for Cordova app development
Evothings Studio makes it easy to develop Cordova apps. Check out how to use your Cordova project with the fast Evothings workflow.

It is easy and fun to get started with Evothings Studio. Download now and be up and running in 5 minutes!

Customize color for your app, for Material Theme, using Android Studio

The new material theme provides:

  • System widgets that let you set their color palette
  • Touch feedback animations for the system widgets
  • Activity transition animations

You can customize the look of the material theme according to your brand identity with a color palette you control. You can tint the action bar and the status bar using theme attributes, as shown in Here.

 

reference: https://developer.android.com/training/material/theme.html

Create values/colors.xml to define our custom color.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="primary">#FFFF00</color>
    <color name="primary_dark">#502020</color>
    <color name="text_primary">#FF00ff00</color>
    <color name="text_secondary">#FFff0000</color>
    <color name="window_background">#000000</color>
    <color name="nav_color">#505050</color>
</resources>

Edit values-v21/styles.xml to use our custom color.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AppTheme" parent="android:Theme.Material.Light">
        <item name="android:colorPrimary">@color/primary</item>
        <item name="android:colorPrimaryDark">@color/primary_dark</item>
        <item name="android:textColorPrimary">@color/text_primary</item>
        <item name="android:textColor">@color/text_secondary</item>
        <item name="android:windowBackground">@color/window_background</item>
        <item name="android:navigationBarColor">@color/nav_color</item>
    </style>
</resources>

reference: Customize the Color Palette