Ads 468x60px

Thursday, November 22, 2018

Movie : Peppermint (2018)

(1)
[ 00:01:39 - 00:01:42 ]
ـ لا تتذكّرني، صحيح؟ ـ تبًا لكِ! اللعنة
You don't remember me do you? Fuck you! Fuck

(2)
[ 00:03:03 - 00:03:05 ]
نعناع
Jose she's here

(3)
[ 00:03:18 - 00:03:20 ]
خوسية، إنها هنا
Jose she's here

(4)
[ 00:03:21 - 00:03:22 ]
هل وجدته؟
Did she find it

(5)
[ 00:03:40 - 00:03:42 ]
لا تلوح
Don't wave

(6)
[ 00:03:54 - 00:03:55 ]
حسنًا
All right

(7)
[ 00:05:23 - 00:05:25 ]
أمي، اسرعي
Mom hurry up

(8)
[ 00:05:26 - 00:05:27 ]
أمي
Mom

(9)
[ 00:05:27 - 00:05:29 ]
قبل 5 أعوام
Mom

(10)
[ 00:05:30 - 00:05:33 ]
ـ رايلي ـ لقد عادت
Riley! She's back

Movie : Ice Age: Collision Course (2016)

(1)
[ 00:00:46 - 00:00:48 ]
الكون
The universe

(2)
[ 00:00:48 - 00:00:51 ]
الامتداد الشاسع للفضاء والمادة
a vast expanse of space and matter

(3)
[ 00:00:52 - 00:00:55 ]
يشمل كل ما رأيناه وكل ما نعرفه
It includes all that we see, and all that we know

(4)
[ 00:00:56 - 00:01:01 ]
منذ بداية الوقت ونحن نتساءل كيف أصبحنا؟
we have wondered how it came to be

(5)
[ 00:01:01 - 00:01:04 ]
خطة متقنة بشكل عظيم ؟
A gloriously orchestrated plan

(6)
[ 00:01:04 - 00:01:06 ]
سلسلة أحداث عشوائية ؟
A chance series of events

(7)
[ 00:01:06 - 00:01:11 ]
أو شئ أكثر حماقة
Or something much, much dumber

(8)
[ 00:05:17 - 00:05:20 ]
العصر الحجري مسار التصادم
It's a beautiful day out here on the ice

(9)
[ 00:05:26 - 00:05:28 ]
أنه يوم جميل هنا علي الثلج
It's a beautiful day out here on the ice

(10)
[ 00:05:28 - 00:05:31 ]
يتنازع الأب مع الأبنة علي سيادة لعبة الهوكي
in a quest for hockey supremacy

Wednesday, January 24, 2018

How to use Embedded Resources in .NET Applications


Today we are going to present how to use embedded files in Visual Studio.


  1. Add your file into your project by right click on the project icon, then click on Add => Add Existing Item.
  2. Go to file properties, and choose the option "Build Action" to "Embedded Resrouce"
  3. Copy the following function that retrieve resources as Stream:
    Public Function GetFileFromResource(ByVal FileName As String, ByVal ProjectName As String) As IO.Stream
    Dim assmbly As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly()
    Dim stream As IO.Stream = assmbly.GetManifestResourceStream(ProjectName + "." + FileName )
     Return stream
    End Function
  4. Now you have a stream connection with the resource that you want to deal with.

Exampe:
If you have a sample project "TestProj" with the embedded resource file "Capture.PNG"
Then you call the function as : GetFileFromResource("Capture.PNG", "TestProj")

Wednesday, December 27, 2017

How to store .NET Project Options as XML in the Project's settings



  1. Right click on your project link, then click on "Properties"
  2. Navigate into "Settings" tab, then add a string parameter. i.e. "ProjectOptions"
  3. The idea is to store multiple Key/Value properties in a single variable using XML format.
  4. Use the function SetProjectOption to store options
        Public Sub SetProjectOption(ByRef ProjectOptions As String, ByVal Key As String, ByVal Value As String)
            Dim Options As Dictionary(Of String, String)
            Options = Me.GetDictoinary(ProjectOptions)
            If Options.ContainsKey(Key.ToLower) Then
                Options(Key) = Value
            Else
                Options.Add(Key.ToLower, Value)
            End If
     
            Me.storeDictionaryInString(Options, ProjectOptions)
     
        End Sub
  5.  Use the function GetProjectOption to get options values
        Public Function GetProjectOption(ByRef ProjectOptions As String, ByVal Key As String) As String
            Try
                Dim Options As Dictionary(Of String, String)
                Options = Me.GetDictoinary(ProjectOptions)
                Return Options(Key.ToLower)
            Catch ex As Exception
                Return Nothing
            End Try
        End Function
  6. Helper Function:
      Private Function storeDictionaryInString(ByRef dic As Dictionary(Of String, String), ByRef ProjectOption As String) As String
            Dim doc As New XmlDocument()
            doc.CreateXmlDeclaration("1.0", "utf-8", Nothing)
            doc.AppendChild(doc.CreateElement("AllSettings"))
            Dim root As XmlNode = doc.GetElementsByTagName("AllSettings")(0)
            For Each key As String In dic.Keys
                Dim e As XmlElement = doc.CreateElement(key)
                e.InnerText = dic(key)
                root.AppendChild(e)
            Next
            ProjectOption = doc.OuterXml
            Return doc.OuterXml
        End Function
     
        Private Function GetDictoinary(ByRef ProjectOption As String) As Dictionary(Of String, String)
            Try
                Dim doc As New XmlDocument()
                doc.LoadXml(ProjectOption)
                Dim dic As New Dictionary(Of String, String)
                Dim root As XmlNode = doc.GetElementsByTagName("AllSettings")(0)
                For Each n As XmlNode In root.ChildNodes
                    dic.Add(n.Name.ToLower, n.InnerText)
                Next
     
                Return dic
            Catch ex As Exception
                Return New Dictionary(Of String, String)
            End Try
         
        End Function
Example:
1. Store Options
        Me.SetProjectOption(My.Settings.ProjectOptions, "General.CompanyName", "ABC Company Inc")
        Me.SetProjectOption(My.Settings.ProjectOptions, "General.PurchasedDate", "27 Dec 2017")
        Me.SetProjectOption(My.Settings.ProjectOptions, "General.OFlAG", "True")

2. Read Options
        MsgBox(Me.GetProjectOption(My.Settings.ProjectOptions, "General.OFlAG"))
3. How options stored in the variable:
<?xml version="1.0" encoding="UTF-8"?> <AllSettings> <general.companyname>ABC Company Inc</general.companyname> <general.purchaseddate>27 Dec 2017</general.purchaseddate> <general.oflag>True</general.oflag> </AllSettings>

Thursday, August 24, 2017

How to make instructions video with Machine Voice and Hard-coded Subtitles

In this blog, we are going to learn how to make a video with machine voice commentary and hard-coded subtitles.


  1. Get the video you want to start with, if you plan to make a video related to something in your PC,  you can record your screen using IceCream Screen Recorder.
    You can record up to 5 minutes, but continue reading you would know how to record more than that by merging files together.

  2. The next idea is to get advantage of [Text to Speech] technique to make an MP3 file, that we are going to use later in our video. There are a few websites and applications that does this
    1. From Text to Speech Site [George's voice is the best]
    2. Sound of Text Site: they use the Google Translate voice. You can only convert up to 100 letters.

  3. It's time now to manipulate our video, cut some audio or video parts, bring different portions together, and so on.
    1. The best choice to do such things is Windows Movie Maker.

    2. OpenShot Video Editor is an alternative to Windows Movie Maker, but it's a hassle since it keeps hanging and freezing. But both almost have the same functionalities.
      Note: There are plenty of Youtube video tutorials on both Windows Movie Maker and Open Shot.
  4. we need to create a subtitle (.SRT) text file to the video. Subtitle Edit is an open source software application that does this.
    1. Just import the video file: the application doesn't support certian video formats, so you need to install their codecs.
      The system gives you a message what video codec packages you have to install, so don't worry, i.e. LAVFilters Package.

  5. The last step we need to do is to burn/hardcore subtitles inside the video itself, because not all media players support displaying subtitles. Specially if you want to embed the video in your website, email, etc.
    we have two applications to achieve this
    1. FormatFachtory.

    2. HandBrake.

Thursday, August 10, 2017

SubMerge - Learn Language by Merging Subtitles

Create Daily Backup - Using Windows Tasks

In this lesson we are going to learn how can we create automatic backups for our files, specially those files that change on daily basis.


  1. Install WinRar in your machine.

    it provides a command line tool (rar.exe) in which we can compress files from the Command Line Prompt.
  2. Open a new empty text file [via notepad], and save it with extension (.bat) on your disk.
  3. Fill the file with the following command.
    [rar.exe location] a -ep1 -r [Compressed File Location] [Your Project Folder]
    1. As Example, suppose I have a project on my local machine at [C:\MyProject], and I want to write the command above, of course I will add the date attached to my project name to make sure it has a unique name, then the command would be like:
       "C:\Program Files\WinRAR\Rar.exe" a -ep1 -r MyProject_%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%%time:~6,2%.rar "C:\MyProject"
  4. Open Windows Task Scheduler
     

  5.  Click on "Create Basic Task..." from the right upper menu