Posting Code Blocks with your free WordPress Blog

February 27, 2015

Please visit https://en.support.wordpress.com/code/posting-source-code/ for detailed information about how to post source code blocks with your free wordpress.com blog.
A tip from me: Have a look at the source code of wordpress support page opened ;) you “MAY” get more ideas. Okay I didn’t say that!
Let us look at some samples:

1

Will produce the below, syntax highlighted code block for you

your code here

2

Refer the above image, the usage of additional tags within the code tag will syntax highlight a short VB script, avoiding the gutter (line numbers)

Public Class Form1
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim xmlFile As XmlReader
        xmlFile = XmlReader.Create("MyVMS.xml", New XmlReaderSettings())
        Dim ds As New DataSet
        ds.ReadXml(xmlFile)
        DataGridView1.DataSource = ds.Tables(0)
        DataGridView1.Columns(0).HeaderText = "Id"
        DataGridView1.Columns(1).HeaderText = "VM Name"
        DataGridView1.Columns(2).HeaderText = "Shutoff Mode"
  
    End Sub
End Class

Avoid leaving spaces between tags inside “code” tag, as doing so could totally mess-up the code blocks. Just put everything tightly spaced like following

language=”VB” gutter=”false”, there are no spaces between language & = or = & the opening ”

The language (or lang) parameter controls how the code is syntax highlighted. The following languages are supported:

  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml

If the language parameter is not set, it will default to “text” (no syntax highlighting).

Code in between the source code tags will automatically be encoded for display, you don’t need to worry about HTML entities or anything.

Configuration Parameters

The shortcodes also accept a variety of configuration parameters that you may use to customize the output. All are completely optional.

  • autolinks (true/false) — Makes all URLs in your posted code clickable. Defaults to true.
  • collapse (true/false) — If true, the code box will be collapsed when the page loads, requiring the visitor to click to expand it. Good for large code posts. Defaults to false.
  • firstline (number) — Use this to change what number the line numbering starts at. It defaults to 1.
  • gutter (true/false) — If false, the line numbering on the left side will be hidden. Defaults to true.
  • highlight (comma-seperated list of numbers) — You can list the line numbers you want to be highlighted. For example “4,7,19”.
  • htmlscript (true/false) — If true, any HTML/XML in your code will be highlighted. This is useful when you are mixing code into HTML, such as PHP inside of HTML. Defaults to false and will only work with certain code languages.
  • light (true/false) — If true, the gutter (line numbering) and toolbar (see below) will be hidden. This is helpful when posting only one or two lines of code. Defaults to false.
  • padlinenumbers (true/false/integer) — Allows you to control the line number padding. true will result in automatic padding, false will result in no padding, and entering a number will force a specific amount of padding.
  • title (string) — Set a label for your code block. Can be useful when combined with the collapse parameter.

regards,

rajesh


Windows7bugs | Script Copying Instructions

November 9, 2014

Hello guys

Once in a while we receive complaints about scripts copied from our blog causing issues. We regret those issues and apologizing to everyone who suffered due to. Our blog is totally free until date and unfortunately, different browsers behave differently while parsing the code tags.

We were using

 [ code ] [ /code ]

tag for long time, found that few scripts getting totally messed up with double quotes being showsn and &quote etc. This has forced us to start using

[ sourcecode ] [ /sourcecode ] 

and realized if we have more than one block of scripts, the 2nd and consecutive scripts blocks being totally garbled.

With reference to above said, we request you to kindly make sure that the scripts those you copy from our posts are thoroughly checked for special characters prior applied. Especially registry related scripts as such attempts could completely wreck your Windows registry databases.

We hope you read us clearly and continue supporting us.

Regards,


httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory

May 24, 2015

Originally posted on OracleAPPSDBA & Oracle DBA Blog:

Review the HTTP log file. The error is very clear about the missing soft link. It would show this error:

<physical Path>/10.1.3/Apache/Apache/bin/apachectl startssl: execing httpd
<physical Path>/10.1.3/Apache/Apache/bin/httpd: error while loading shared
libraries: libdb.so.2: cannot open shared object file: No such file or directory

cd /d01/oracle/VIS/inst/apps/VIS_r12/logs/ora/10.1.3/opmn

vi HTTP_Server~1.log
--------
14/03/04 00:54:51 Start process
--------
/d01/oracle/VIS/inst/apps/VIS_r12/ora/10.1.3/Apache/Apache/bin/apachectl startssl: execing httpd
/d01/oracle/VIS/apps/tech_st/10.1.3/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory
--------
14/03/04 00:54:53 Start process
--------
/d01/oracle/VIS/inst/apps/VIS_r12/ora/10.1.3/Apache/Apache/bin/apachectl startssl: execing httpd
/d01/oracle/VIS/apps/tech_st/10.1.3/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory
--------
14/03/04 10:22:12 Start process

To implement the solution, please execute the following steps:

1. Shut down all Oracle Application Services.

2. As the unix root user, create a soft link as follows:

ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2

3. Start up all Oracle Application Services.

View original


Windows 8 | Wan miniport | device disconnected

May 18, 2015

For unknown reasons, the Wan miniport(s) available with Windows 7/8 could start showing errors & giving the user no apparent solutions to fix them, including uninstalling them.

I had the same situation when all of a sudden one of my PPTP connections started giving errors like “Device disconnected”, properties for the PPTP connection not shown and not allowing me to delete the connection in the corrupt state.

After few attempts, I came across a workable solution, posted with Microsoft support site. Unfortunately, this time I forgot to bookmark the page, however, still remember the entire steps. Please find them listed below

View – > Show hidden devices

1

Right click the Wan Miniport device with yellow exclamation mark

(Enlarge the images for more details)

2

3

4

5

Now force install the driver. Once the installation is over, you can safely uninstall this device. Follow the same for all the Miniport devices those are showing the exclamation mark. Once you are done with the uninstall processes, don’t do anything else. Just restart the computer and start creating the VPN connections once again.

The above exercises must have fixed the Wan miniport issues for you.

Regards,

rajesh


Windows 10 on Virtual Box | Unable to allocate and lock memory | Virtualbox Guru Meditation error

May 3, 2015

As Microsoft is continuously updating their technical preview for Windows 10, we are sure many of you out there are trying out the latest release 10074, that adds(?) many features. As a precaution, we always use Oracle VirtualBox for testing such releases and never had more issues than with the pre-releases of Windows 10!

One of the regular errors we came across were about “Unable to allocate and lock memory” while the VM started, and gradually pops up another window titled “Guru Meditation”, asking us to view the log files (/me chuckles, when Google can do that for us). We came across a wonderful post, that explains how to resolve this particular dreadful situation with VMs!

and here we are linking the same POST for you! Enjoy and Enjoy your Windows 10 VM

regards,

rajesh


Windows 10 Technical Preview | VirtualBox | Full Screen

April 26, 2015

Trust me, I never try a new OS without testing it thoroughly using Oracle VirtualBox! So is the case with bugs filled Technical Previews of Windows 10 as well. One of the annoyance I had with the builds was, the VirtualBox display driver failing to load/install when the extension packs are installed. That forced me to browse through  multiple VirtuaBox forum entries and there were multiple suggestions (few of them using setextradata switch), and came across one of them suggesting, enabling the Virtual Machine with 3D enabled under display properties.

Does it work? Yes!

Currently I am using VirtualBox 4.3.26, the latest release with Hyper-V disabled over my Windows 8.1 as host and Windows 10 Technical Preview build 10061 as guest OS

fullscreen

Please find below the VM’s display settings

Windows 10 TP Display Settings

Enjoy guys!

for Windows7bugs

rajesh


Windows 10 Technical Preview, Issues downloading updates

April 23, 2015

A technical preview is NOT meant for everyone, a many things have bleeding edges, many of favorite programs may not work, so such releases are meant for brave hearts, who want to jump in savor the raw taste of painfully ripening fruit.

Well, less said, if you are one of them and came to a situation like all of a sudden your Windows 10 preview build stops downloading updates, however, showing “downloading 0%” you may try the following

Open Windows services (run -> services.msc)
Stop the Windows Update Service (You have to try couple of times to stop it successfully)
Using explorer or run command %windir% to access “Windows” folder
Locate “SoftwareDistribution” folder
Open the folder and delete all the content (Please note, this will possibility remove all the log entries for previously installed updates). Administrator privileges will be required for completing this act
Once the files are deleted, restart the windows update service.
Return to Windows update page, retry the update

That should fix the annoyance until next occurrence!

Cheers guys,

for Windows7bugs

rajesh


ASP.Net | Learn the basics of developing your first website using VB.Net or C#

March 8, 2015

You are here, seeking some information and we are more than happy to re-direct you to http://webproject.scottgu.com, a right place to start learning how to develop a website using Visual Studio IDE. Though the posts with scottgu.com mostly deal with VS 2005, almost everything they mentioned with their lessons are still applicable to the latest VS releases.
So give it a try, and you will be more than glad to visit one of the best beginners place.

regards,

rajesh


Visual Studio 2013 | HRESULT 0x80070002 exception

March 2, 2015

Scenario

A brand new installation of Visual Studio 2013

You are trying to create a new project/solution and immediately after choosing the type of the application (eg: Single page web application) an error raised saying referenced file cannot be found, followed by the error code HRESULT 0x80070002

Solution

Go to http://docs.nuget.org/consume/installing-nugget

Select the build of your Visual Studio NuGet client and move to the download page

Download the package (After closing down the Visual Studio, if yet open) and install the package

Restart Visual Studio and the error must have been gone by now.

Happy Programming guys ;)

regards,

rajesh


Follow

Get every new post delivered to your Inbox.

Join 54 other followers