Senger CodeLab 🚀

: All Posts

How do I raise the same Exception with a custom message in Python

How do I raise the same Exception with a custom message in Python

I have this try block in my code try dosomethingthatmightraiseanexception except ValueError as err errmsg My custom error message raise ValueErrorerrmsg

Read more →

How do I run a Python script from C

How do I run a Python script from C

This sort of question has been asked before in varying degrees but I feel it has not been answered in a concise way and so I ask it again I want to run a

Read more →

how to access iFrame parent page using jquery

how to access iFrame parent page using jquery

I have an iframe and in order to access parent element I implemented following code windowparentdocumentgetElementByIdparentPriceinnerHTML How to get the same

Read more →

How to achieve function overloading in C

How to achieve function overloading in C

Is there any way to achieve function overloading in C I am looking at simple functions to be overloaded like foo int a foo char b foo float c int d I think

Read more →

How to check if a folder exists

How to check if a folder exists

I am playing a bit with the new Java 7 IO features Actually I am trying to retrieve all the XML files in a folder However this throws an exception when the

Read more →

How to declare array of zeros in python or an array of a certain size duplicate

How to declare array of zeros in python or an array of a certain size duplicate

This question already has answers here Create an empty list with certain size in Python duplicate 18 answers Closed 8 years ago I am trying to build a

Read more →

How to detect query which holds the lock in Postgres

How to detect query which holds the lock in Postgres

I want to track mutual locks in postgres constantly I came across Locks Monitoring article and tried to run the following query SELECT blpid AS blockedpid

Read more →

How to Empty Caches and Clean All Targets Xcode 4 and later

How to Empty Caches and Clean All Targets Xcode 4 and later

Jonathan suggest here Xcode Includes xib files that have been deleted that cleaning all targets and empty the caches will fix the problem with Xcode including

Read more →

How to grep for case insensitive string in a file

How to grep for case insensitive string in a file

I have a file file1 which ends with Success OR success I want to grep for the word success in a way which is not case sensitive way I have written the

Read more →