How to remove ads in WPS Office


So if you are using the WPS Office: The Most Compatible Free Office Suite, especially the free version, you have seen the annoying ads that show when you open the Writer, Spreadsheets or Presentation.

Now I have found a way to remove/disable the adds that show up on startup.

Solution 1: Blocking the wpscloudsvr.exe

Prerequisites

  • Installed WPS Office
  • Enabled Windows Firewall
  • Make sure that you have closed all instances of WPS Office – Writer, Spreadsheets or Presentation.

Removing/disabling the ads in WPS Office

First open Run by Win Key + R and write

wf.msc

This command will open the Windows Firewall with Advanced Security. After that go to Inbound Rules

Windows Firewall with Advanced Security New Rule

Now you search for wpscloudsvr.exe. The firewall should show three rules.

WPS Office Cloud Server Rules

Select the three rules and disable them with right click of the mouse and select Disable Rule

WPS Office Cloud Server Disable Rules

And for more heavier measures to make sure the ads are blocked. Open Properties of every rule and select Block the connection.

wpscloudsvr.exe Block the connection

Solution 2: Blocking the wpscenter.exe

This can be combined with the previous solution to make the blocking more powerful. In order to block the wpscenter.exe we have to make a New Inbound Rule. For this purpose open the Windows Firewall with Advanced Security and select New Rule.

Follow this picture guide to make the Inbound Rule active

That finalizes the ads removal procedure. Happy writing 🙂

 

Advertisements

Transliterating Russian to English in C#


Introduction

If you are struggling with transliterating the Russian names or sentences to the English latin letters, so do I.

  • Input Russian name: Олъга Виктровна Василенко
  • Output English transliteration: Olga Viktrovna Vasilenko

Contents

Source code:

First you need to add the following fields

 private static char cap_a = 'А'; // 1040
 private static char cap_be = 'Б'; // 1041
 private static char cap_ve = 'В'; // 1042
 private static char cap_ge = 'Г'; // 1043
 private static char cap_de = 'Д'; // 1044
 private static char cap_ye = 'Е'; // 1045
 private static char cap_zhe = 'Ж'; // 1046
 private static char cap_ze = 'З'; // 1047
 private static char cap_ee = 'И'; // 1048
 private static char cap_i = 'Й'; // 1049
 private static char cap_ka = 'К'; // 1050
 private static char cap_el = 'Л'; // 1051
 private static char cap_em = 'М'; // 1052
 private static char cap_en = 'Н'; // 1053
 private static char cap_o = 'О'; // 1054
 private static char cap_pe = 'П'; // 1055
 private static char cap_er = 'Р'; // 1056
 private static char cap_es = 'С'; // 1057
 private static char cap_te = 'Т'; // 1058
 private static char cap_u = 'У'; // 1059
 private static char cap_ef = 'Ф'; // 1060
 private static char cap_kha = 'Х'; // 1061
 private static char cap_tse = 'Ц'; // 1062
 private static char cap_che = 'Ч'; // 1063
 private static char cap_sha = 'Ш'; // 1064
 private static char cap_shcha = 'Щ'; // 1065
 private static char cap_hard = 'Ъ'; // 1066
 private static char cap_yeru = 'Ы'; // 1067
 private static char cap_soft = 'Ь'; // 1068
 private static char cap_e = 'Э'; // 1069
 private static char cap_yu = 'Ю'; // 1070
 private static char cap_ya = 'Я'; // 1071
 private static char cap_yo = 'Ё'; // 1025
 private static char blank = ' '; // 0032
 private static char cap_dot_i = Convert.ToChar(1030); // cyrillic capital letter byelorussian-ukrainian i
 private static char cap_fita = Convert.ToChar(1138); // cyrillic capital letter fita
 private static char cap_yat = Convert.ToChar(1122); // cyrillic capital letter yat
 private static char cap_izhitsa = Convert.ToChar(1140); // cyrillic capital letter izhitsa

Here are the methods that we need.

private static string DisplayInEnglish(string text)
 {
 string result = string.Empty;

 for (int i = 0; i < text.Length; i++)
 {
 int charCode = 0x0;
 char russianLetter = '\0';

 russianLetter = Convert.ToChar(text.ToUpper()[i]);

 string englishLetter = string.Empty;

 if (russianLetter == cap_a)
 {
 englishLetter = "A";
 }
 else if (russianLetter == cap_be)
 {
 englishLetter = "B";
 }
 else if (russianLetter == cap_ve)
 {
 englishLetter = "V";
 }
 else if (russianLetter == cap_ge)
 {
 englishLetter = "G";
 }
 else if (russianLetter == cap_de)
 {
 englishLetter = "D";
 }
 else if (russianLetter == cap_ye || russianLetter == cap_yat)
 {
 if (AtStart(i, text) ||
 IsVowel(PrevChar(i, text)) ||
 PrevChar(i, text) == cap_hard ||
 PrevChar(i, text) == cap_soft)
 {
 englishLetter = "Ye";
 }
 else
 {
 englishLetter = "E";
 }
 }
 else if (russianLetter == cap_zhe)
 {
 englishLetter = "Zh";
 }
 else if (russianLetter == cap_ze)
 {
 englishLetter = "Z";
 }
 else if (russianLetter == cap_ee || russianLetter == cap_izhitsa)
 {
 englishLetter = "I";
 }
 else if (russianLetter == cap_i)
 {
 englishLetter = "Y"; // J ???
 }
 else if (russianLetter == cap_ka)
 {
 englishLetter = "K";
 }
 else if (russianLetter == cap_el)
 {
 englishLetter = "L";
 }
 else if (russianLetter == cap_em)
 {
 englishLetter = "M";
 }
 else if (russianLetter == cap_en)
 {
 englishLetter = "N";
 }
 else if (russianLetter == cap_o)
 {
 englishLetter = "O";
 }
 else if (russianLetter == cap_pe)
 {
 englishLetter = "P";
 }
 else if (russianLetter == cap_er)
 {
 englishLetter = "R";
 }
 else if (russianLetter == cap_es)
 {
 englishLetter = "S";
 }
 else if (russianLetter == cap_te)
 {
 englishLetter = "T";
 }
 else if (russianLetter == cap_u)
 {
 englishLetter = "U";
 }
 else if (russianLetter == cap_ef ||
 russianLetter == cap_fita)
 {
 englishLetter = "F";
 }
 else if (russianLetter == cap_kha)
 {
 englishLetter = "Kh";
 }
 else if (russianLetter == cap_tse)
 {
 englishLetter = "Ts";
 }
 else if (russianLetter == cap_che)
 {
 englishLetter = "Ch";
 }
 else if (russianLetter == cap_sha)
 {
 englishLetter = "Sh";
 }
 else if (russianLetter == cap_shcha)
 {
 englishLetter = "Shch";
 }
 else if (russianLetter == cap_soft)
 {
 englishLetter = "";
 }
 else if (russianLetter == cap_yeru)
 {
 englishLetter = "Y";
 }
 else if (russianLetter == cap_hard)
 {
 englishLetter = "";
 }
 else if (russianLetter == cap_e)
 {
 englishLetter = "E";
 }
 else if (russianLetter == cap_yu)
 {
 englishLetter = "Yu";
 }
 else if (russianLetter == cap_ya)
 {
 englishLetter = "Ya";
 }
 else if (russianLetter == cap_yo)
 {
 englishLetter = "Yo";
 }
 else if (russianLetter == cap_dot_i)
 {
 englishLetter = "I";
 }
 else if (russianLetter == blank)
 {
 englishLetter = " ";
 }
 else if (russianLetter == (char)769) // '́ <- this sign
 {
 englishLetter = string.Empty;
 }
 else
 {
 englishLetter = russianLetter.ToString();
 }

 result += englishLetter;
 }

 return result.ToUpper();
 }

private static bool IsVowel(char c)
 {
 return c == cap_a || c == cap_ye || c == cap_ee || c == cap_o || c == cap_u ||
 c == cap_yeru || c == cap_e || c == cap_yu || c == cap_ya;
 }

 private static char PrevChar(int i, string text)
 {
 if (AtStart(i, text))
 {
 return '\0';
 }

 return text[i - 1];
 }

 private static bool AtStart(int i, string text)
 {
 return ((i == 0) || (text[i - 1] == ' '));
 }

Usage:

 string result = DisplayInEnglish("Олъга Виктровна Василенко");
// output: Olga Viktrovna Vasilenko

That finishes this tutorial.

Complete Guide to Lenovo P70-A CyanogenMod 13


I’ve been searching the internet for a simple step by step guide to do this not very difficult operation but you need some guidelines to do so.

You are doing this on your own risk be careful!

Warning: Before anything to do make sure you’ve backed up your files from internal memory like pictures,documents,apps etc. all information will be erased as well as current firmware on your Lenovo P70 when you flash firmware via Sp flash tool. DO IT AT YOUR OWN RISK!

In other words I will provide you all the files you need to download and install in order to have a working CyanogenMod 13 on your Lenovo P70-A.

CM13 it’s 64bit based ROM and you need first to install Andoid Lollipop 5.1 64bit then CyanogenMod otherwise it will not work.

Required files:

  1. Drivers for Lenovo P70-A (link)
  2. Sp Flash Tool for Lenovo P70 (link)
  3. Android Lollipop 5.1 64bit for Lenovo P70 (link)
  4. CyanogenMod 13.0-v1 64bit for Lenovo P70 (link)
  5. GAPPS for CM13  (link) – select ARM64/6.0/pico
  6. Root package (link)
  7. Fully working CyanogenMod 13.0 v2.4 ROM for Lenovo P70-A (link)

Now let the guide begin

  • First we are installing the drivers. By default the extracting directory is the desktop.
    There will be couple of folders but go with Driver_Auto_Installer_.1612 folder and start DriverInstall.exeextracting-directory
  • After that you go to the SP Flash Tool zip file. Extract it to root directory C:\. Open the directory and find flash_tool.exe. Run as Administrator

sp-flash-tool

Go to OptionsDownload

sp-flash-tool-options

Close the window. By closing it the settings are saved!

  • Extract the P70A_AOSP_5.1_64bit_v2 zip file to the C:\ directory. Now open the MT6752_Android_scatter_Other.txt file with the Flash Tool.
    open-scatter-fileThe Lenovo P70-A has to be powered off. Select Download Only and Click Download. Plug the one side of the cable to the computer and the other to the Lenovo P70-A. A red bar will appear after that a yellow Flash bar. And in the end

finished-flashing

This whole process is called Flashing a ROM. You actually flashed your 32 bit ROM to a 64 bit one 🙂

  • Then we unzip cm-13.0-v1-UNOFFICIAL-P70 file. The procedure is the same. We flash it by selecting the MT6752_Android_scatter_146 (CyanogenMod 13.0 for Lenovo P70-A [ FULLY WORKING ]).txt scatter file then Download. (If it does not start automatically the replug the USB cable to the phone or PC).
  • Here is a little bit tricky. I hope the phone is turned off. You have to hold POWER Button + Volume Up until this pops upselect-boot-mode
    Select Recovery. It should look like something like this when it loads up
    twrp-home-screen
    From this menu you select Mount and you mount the sd card  with choosing External SDccard and you transfer from your PC to the sd card the files:

    • the ROOT_SuperSU-Pro-v2.46.zip
    • open_gapps-arm-6.0-pico-2017xxxx.zip
  • After you have installed the Root and Gapps file to the system then you go to Reboot and select Power Off
  • Now you will have to flash the CyanogenMod 13.0 v2.4 ROM
    • You open the scatter file MT6752_Android_scatter_146 (CyanogenMod 13.0 for Lenovo P70-A [ FULLY WORKING ]).txt from the folder CM-13.0-v2.4-UNOFFICIAL-P70-arm64
      • If you want to use external storage, like SDcard, rename the file boot2sd.img to boot.img (the other boot.img file you can call it boot1sd.img)
    • Still select Download only and the click Download
    • Wait the process to finish
  • You are ready to start the phone. It will take up to 10 minutes to load fully.

Final thougths

Note: If you have problems with making calls, receiving calls, SMS and etc. connection problems. You need to restore your IMEI number. In order you to do that you have to install Chamelephon, if you have difficulties in finding an apk file , here is a link.

Note2: If you mess up something and the phone is not working, you can flash this to recycle to factory settings.

That wraps it up. Leave a comment if any errors occur along the way.

How to import multiple vCards into one


I have a bunch of vCards (212 to be precise) that I transferred from my phone (via Bluetooth) to my PC.  Now I want to bulk import them into my Google Contacts but…  I don’t see a multi-select feature on the import section.  Am I missing something?  To make matters worse, the vCards are named sequentially, not by the contact name so it’s hard to pick and choose what I want imported.  If you are not sure how to convert vCards into a CSV formatted text file.
It is very easy:
  1. Copy all your .vcf files into one directory

    all contacts

  2. Open Windows command prompt.
    By holding SHIFT + Right click mouse button (Only with this combination will show)

    open-with-command-window

  3. Enter the following CMD command:
    copy *.vcf all.vcf
    
  4. Import all.vcf into your Google account or etc.

How to add text at position in iTextSharp


Probably you know the library for PDF  iTextSharp.

And you are searched for a solution how to add text at particular XY coordinates to an existing PDF

In this example I will get the coordinates in Foxit Reader

First you set up the Measurement Units to be in Points (File – Preferences – Documents)

Foxit-Reader-Preferences

Then in the document you put the Ruler with Ctrl + R and will see

Foxit-Reader-Coordinates

public static void AddTextToPdf(string inputPdfPath, string outputPdfPath, string textToAdd, Point point)
 {
     //variables
 string pathin = inputPdfPath;
 string pathout = outputPdfPath;

 //create PdfReader object to read from the existing document
 using (PdfReader reader = new PdfReader(pathin))
 //create PdfStamper object to write to get the pages from reader
 using (PdfStamper stamper = new PdfStamper(reader, new FileStream(pathout, FileMode.Create)))
 {
 //select two pages from the original document
 reader.SelectPages("1-2");

 //gettins the page size in order to substract from the iTextSharp coordinates
 var pageSize = reader.GetPageSize(1);

 // PdfContentByte from stamper to add content to the pages over the original content
 PdfContentByte pbover = stamper.GetOverContent(1);

 //add content to the page using ColumnText
 Font font = new Font();
 font.Size = 45;

 //setting up the X and Y coordinates of the document
 int x = point.X;
 int y = point.Y;

 y = (int) (pageSize.Height - y);

 ColumnText.ShowTextAligned(pbover, Element.ALIGN_CENTER, new Phrase(textToAdd, font), x, y, 0);
       }
 }

The usage is very simple


string text = "Hello World";
Point textPoint = new Point(480, 1440);
AddTextToExistingPdf("inputPdf.pdf", "outputPdf.pdf", text, textPont);

Настройки за Интернет на мобилни оператори


Здравейте, днес ще ви науча как да си настроите телефона ръчно, за да може да ползвате мобилен Интернет (GPRS). Първоначалните стъпки са основни и за трите оператора.

Директно към GPRS настройките

  1. Първо пускате начален екран на телефона си и се в настройки1.Home Screen
  2. След това в Още2.Settings
  3. Мобилни мрежи3.More-Menu
  4. Access Points Names4.Mobile-Network-Settings
  5. Добавяне на Access Points Name

APN Settings

И тук се пишат следните настройки за съответния оператор:

 

Тип настройка telenor-logo logo-mtel vivacom-logo
Име telenor internet MTEL INTERNET VIVACOM INTERNET GPRS
Име на точка за достъп (APN) telenorbg wap-gprs.mtel.bg internet.vivacom.bg
Тип на името на точката за достъп default default default
Прокси сървър (proxy)  192.168.88.11 213.226.006.065 192.168.123.123
Порт  8004 8080 8080
Потребителско име  – mtel VIVACOM
Парола  – mtel VIVACOM
Мобилен код на държавата (MCC) 284 284 284
Код на мобилна мрежа (MNC) 05 01 03