Applies to:
  • Apimo Webservice 2.0 (apimo.com)
  • PHP v5.5
What?
This is an article on how I connected to the Apimo WebService. The Apimo Webservice is an API provided by apimo.com and requires a server request over HTTPS using the GET method.

Why?
This was quite difficult to connect to and to determine what was wrong with each step of the development as the error messages were somewhat vague. I thought I'd quickly write this article so I don't have to spend so much time on it again.

Note that the below examples, demonstrate a script on a Non-SSL-Enabled host.

How?

Applies to:
  • TravelPort Universal API
  • PHP 4 or 5
  • cURL
What?
An article on how to resolve errors and setup a standard ping request using the TravelPort Universal API. This is to be achieved using PHP as the server-side programming language and cURL, a sub-component of PHP that allows you to send and receive requests as the server (as opposed to the client device).

Why?
Yes there's documentation online that TravelPort provide you with but it didn't help. The error I'm going to address has to do with getting the latest schemas but as I couldn't find anything using Google regarding these errors or how to set up a basic ping request, I thought I'd write this article.

How?
Using PHP and cURL, here is the full script for a standard ping request. Before you say it doesn't work, it has to be updated every time a new schema is introduced to the system. See my errors section for how you can resolve this.

What?
A quick article on how to create a middleware script which accepts the values from a submitted HTML form and sends it to a server on another domain for processing. This applies to Linux Apache MySQL and PHP (LAMP) setups.

Why?
A customer wanted to connect their Mobile App to a third-party API. The third-party only accepts requests from a static and permitted IP address. If the end-user were to make the request, then their own IP address would be the one checked against, and it just wouldn't be manageable to add every new user's IP address to their service. The request has to come from a permitted server with a single IP address.

How?
It's likely that you already know how to submit a HTML form to a server via your Mobile application so the following will only document the process of sending data under the server IP address. We're going to use a PHP script with the cURL function to receive and send the data. cURL is a standard feature on most LAMP setups. If not you can install it from here: http://curl.haxx.se/download.html

Applies to:
  • Microsoft Windows 7 Professional
  • Ms-DOS Command Prompt (6.1.7601)

What?
A quick article on how to rename multiple files using the command prompt and a bit of string manipulation. This example will rename files which contain the string " (Copy)" and replace it with nothing (so removes it). The challenge here is the space character and delimiting by a string.

The Gist
copyraw
-- What I have
Image00001 (Copy).jpg
Image00002 (Copy).jpg

-- What I want
Image00001.jpg
Image00002.jpg
  1.  -- What I have 
  2.  Image00001 (Copy).jpg 
  3.  Image00002 (Copy).jpg 
  4.   
  5.  -- What I want 
  6.  Image00001.jpg 
  7.  Image00002.jpg 

How?
Before I continue, the undo may work in MS Windows (Control key + Z) but don't count on it. I'm going to use a short batch process but to save time on the different ways of doing this, the example below uses a command prompt to a) create a batch file b) use it to rename the files c) delete the batch file.
Category: MS-DOS :: Article: 574

Applies to:
  • Microsoft Windows 7 Enterprise
  • AutoHotkey (see code for AHK version)

What?
Someone suggested an app that counts the days I have left serving my notice. I thought I'd go one better and have it calculate to the nearest second. I call this latest app "byeBU" and this is version 0.4 Beta (unofficial app).

Why?
Something to do...

How?

What?
A quick note on how to copy files and folders over without overwriting existing files. It's easy to say "Yes" and replace all files. What I need is something that synchronizes files on an internal hard drive to an external one. I wanted it to copy only the files that were new in the original folder and only copy those over (reason being, the archive is 4 terabytes and backing up only the changed files would speed things up).

Applies to:
  • Microsoft Windows XP
  • Microsoft Windows 7
  • Microsoft Windows 8
  • for Vista and Windows 2008 without XCOPY, try ROBOCOPY.

How?
We're going to use MS-DOS because I'm that old.


What?
A quick note for myself as I'd forgotten how to do this (we're talking technology belonging to the 90s - MS-DOS v6.22). The example wants to loop through a directory and then loop through the line it finds.

Why?
I use another technology for automation but sometimes the simpler solution is the one I make for other people to use. Explaining MS-DOS batch programs is a lot easier and colleagues trust these more than my all-in-one GUI applications.

How?
Note: we're using the code in a DOS Batch program so our variables have to be prefixed with a double-percent rather than just the one:

What?
So this is an article to list methods of retrieving the number of files in a folder/directory.

Why?
Why can't we just use a loop and file pattern native to the Autohotkey programming language:
copyraw
UserFolder:="C:"
-- UserFolder := RegExReplace( MyInputField, "\\$")  ; gets rid of trailing slash if required

-- Method #1
count := 0
Loop, %UserFolder%\*.*, 0, 1 
  count++

-- note for future use:
; if A_LoopFileAttrib contains H,R,S
;	continue
  1.  UserFolder:="C:" 
  2.  -- UserFolder := RegExReplace( MyInputField, "\\$")  ; gets rid of trailing slash if required 
  3.   
  4.  -- Method #1 
  5.  count :0 
  6.  Loop, %UserFolder%\*.*, 0, 1 
  7.    count++ 
  8.   
  9.  -- note for future use: 
  10.  ; if A_LoopFileAttrib contains H,R,
  11.  ;    continue 
This works fine at home on your local host on a local drive. Try using this over a networked drive and more time will be spent counting the files then the actual processing (or whatever your script is trying to do).

Category: AutoHotkey :: Article: 512

Intro
Prefixing lines with their respective line number in a text file using a Microsoft Windows Operating System... I've just googled this as I couldn't remember how I did this last time and a number of people showing off their MS-DOS batch skills have proposed stupid extensive solutions when all you need is one command-line.


Why?
Working with programming languages, I often need to write the accompanying documentation. Within the documentation, I may want to refer to a line of code within a text file. I also find myself copying amounts of code into the same document and then needing lines prefixed so that I can explain the code.


What?
Change contents of "original_file.txt"
copyraw
The first line of my code
The second line of my code
The third line of my code
  1.  The first line of my code 
  2.  The second line of my code 
  3.  The third line of my code 
To "results_file.txt"
copyraw
1:  The first line of my code
  2:  The second line of my code
  3:  The third line of my code
  1.  1:  The first line of my code 
  2.    2:  The second line of my code 
  3.    3:  The third line of my code 


How?
Category: MS-DOS :: Article: 419

Well yes you could just use the Unicode version of Autohotkey. If you're looking for some up and down arrows which is all I wanted, then you don't have to use Unicode and you can use the Chr() function:

copyraw
msgbox % Chr(24) ; upwards arrow
msgbox % Chr(25) ; downwards arrow, unstable
  1.  msgbox % Chr(24) ; upwards arrow 
  2.  msgbox % Chr(25) ; downwards arrow, unstable 

Category: AutoHotkey :: Article: 389

Ok so there are more fun things to do out there. If you're the type of AutoHotkey programmer that doesn't like having to use the command prompt to write to an extra text file which your program has to read, then this is for you. DllCall will usually run contained in the program and can be hidden from the end-user.

The one to rule them all:
This is a function I pulled from the Autohotkey forums submitted by SKAN which lists all the functions for a specified Dynamic Link Library (DLL) along with an inputbox for convenience:

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

table   system   windows   find   value   work   need   user   joomla   version   create   data   database   following   mysql   source   display   license   list   form   using   added   deluge   note   case   zoho   file   name   creator   function   used   order   would   time   client   first   files   parameter   report   page   error   uploaded   website   field   code   where   server   google   script   date   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.