How to use a TRIM function in SQL Server
I cannot get this TRIM code to work ``` SELECT dbo.COL_V_Cost_GEMS_Detail.TNG_SYS_NR AS [EHP Code], dbo.COL_TBL_VCOURSE.TNG_NA AS [Course Title], LTRIM(RTRIM(FCT_TYP_CD)& ') AND (' & LTRI...
- Modified
- 21 Jan at 22:16
Multiple glibc libraries on a single host
My linux (SLES-8) server currently has glibc-2.2.5-235, but I have a program which won't work on this version and requires glibc-2.3.3. Is it possible to have multiple glibcs installed on the same hos...
Getting String value from enum in Java
I have a enum defined like this and I would like to be able to obtain the strings for the individual statuses. How should I write such a method? I can get the int values of the statuses but would lik...
Makefiles with source files in different directories
I have a project where the directory structure is like this: ``` $projectroot | +---------------+----------------+ | | ...
How can I have two fixed width columns with one flexible column in the center?
I'm trying to set up a flexbox layout with three columns where the left and right columns have a fixed width, and the center column flexes to fill the available space. Despite setting up dimensions ...
Wrap long lines in Python
How do I wrap long lines in Python without sacrificing indentation? For example: ``` def fun(): print '{0} Here is a really long sentence with {1}'.format(3, 5) ``` Suppose this goes over th...
How to use JNDI DataSource provided by Tomcat in Spring?
It is said that in the Spring javadoc article about `DriverManagerDataSource` class, that this class is very simple and that it is recommended > to use a JNDI DataSource provided by the container. Su...
- Modified
- 10 Jan at 04:57
import sun.misc.BASE64Encoder results in error compiled in Eclipse
For this two imports; ``` import sun.misc.BASE64Encoder; import sun.misc.BASE64Decoder; ``` I got this error: ``` Access restriction: The type BASE64Decoder is not accessible due to restriction on...
Anaconda Installed but Cannot Launch Navigator
Anaconda (listed as "Python 3.6.0 (Anaconda 4.3.1 64 bit)" ) is in my programs and features list, but there is seeming . Could this be because I have the 32-bit version of Anaconda downloaded and I ha...
- Modified
- 30 Jun at 10:50
Is there a "do ... while" loop in Ruby?
I'm using this code to let the user enter in names while the program stores them in an array until they enter an empty string (they must press enter after each name): ``` people = [] info = 'a' # mus...
How to make a smooth image rotation in Android?
I'm using a `RotateAnimation` to rotate an image that I'm using as a custom cyclical spinner in Android. Here's my `rotate_indefinitely.xml` file, which I placed in `res/anim/`: ``` <?xml version="1...
make: *** [ ] Error 1 error
I am trying to compile a Pro*C file on gcc and I am getting this error : ``` make: *** [MedLib_x.o] Error 1 ``` This is the command printed by make: ``` /usr/bin/gcc -g -fPIC -m64 -DSS_64BIT_SERVE...
How to pass dictionary items as function arguments in python?
My code 1st file: ``` data = {'school':'DAV', 'standard': '7', 'name': 'abc', 'city': 'delhi'} my_function(*data) ``` 2nd file: ``` my_function(*data): schoolname = school cityname = cit...
- Modified
- 15 Aug at 15:39
Base64 length calculation?
[wiki](http://en.wikipedia.org/wiki/Base64#Padding) I'm trying to figure out the formula working : Given a string with length of `n` , the base64 length will be ![enter image description here](ht...
Send HTML in email via PHP
How can I send an HTML-formatted email with pictures using PHP? I want to have a page with some settings and HTML output which is sent via email to an address. What should I do? The main problem is ...
Display array values in PHP
So, I'm working with PHP for the first time and I am trying to retrieve and display the values of an array. After a lot of googling, the only methods I can find for this are `print_r`, `var_dump` or `...
- Modified
- 22 Dec at 14:47
nodeJs callbacks simple example
can any one give me a a simple example of nodeJs callbacks, I have already searched for the same on many websites but not able to understand it properly, Please give me a simple example. ``` getDbFil...
- Modified
- 4 Nov at 07:44
npm install vs. update - what's the difference?
What is the practical difference between `npm install` and `npm update`? When should I use which?
Read and write into a file using VBScript
How can we read and write some string into a text file using VBScript? I mean I have a text file which is already present so when I use this code below:- ``` Set fso = CreateObject("Scripting.FileSys...
- Modified
- 22 Mar at 19:37
JWT (JSON Web Token) automatic prolongation of expiration
I would like to implement JWT-based authentication to our new REST API. But since the expiration is set in the token, is it possible to automatically prolong it? I don't want users to need to sign in ...
- Modified
- 13 Feb at 09:13
Should I use px or rem value units in my CSS?
I am designing a new website and I want it to be compatible with as much browsers and browser settings as possible. I am trying to decide what unit of measurement I should use for the sizes of my font...
- Modified
- 4 Oct at 13:57
How can I parse String to Int in an Angular expression?
A number string '5' ``` var num_str = '5'; ``` How can I parseInt and let below answers correct at the same time? ``` {{num_str + 1}} // 6 {{num_str - 1}} // 4 ``` parseInt can't be used in an...
- Modified
- 4 Feb at 12:36
How to convert a string into double and vice versa?
I want to convert a string into a double and after doing some math on it, convert it back to a string. How do I do this in Objective-C? Is there a way to round a double to the nearest integer too?
- Modified
- 5 Aug at 22:2
RestSharp JSON Parameter Posting
I am trying to make a very basic REST call to my MVC 3 API and the parameters I pass in are not binding to the action method. ``` var request = new RestRequest(Method.POST); request.Resource = "Ap...
- Modified
- 10 Jun at 23:18
jquery-ui-dialog - How to hook into dialog close event
I am using the [jquery-ui-dialog](https://jqueryui.com/dialog/) plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a clos...
- Modified
- 28 Dec at 08:0