Questions

Javascript Thousand Separator / string format

Is there any function in Javascript for formatting number and strings ? I am looking for a way for thousand separator for string or numbers... (Like String.Format In c#)

20 Sep at 18:55

What is [Serializable] and when should I use it?

I found out that some classes use the `[Serializable]` attribute. - - -

13 May at 09:39

Batch Script to Run as Administrator

I'm writing a client/server checking program but it needs to run as Administrator. I want this to run silently on my network and users, and I don't want the "Run as" Administrator" prompt. Is there a...

3 Jul at 06:47

Excel Formula to SUMIF date falls in particular month

I have excel data in following format. ``` Date Amount 03-Jan-13 430.00 25-Jan-13 96.00 10-Jan-13 440.00 28-Feb-13 72.10 28-Feb-13 72.30 ``` I need to sum the amount field onl...

10 Mar at 15:25

How to call javascript function from code-behind

I wrote a javascript with a asp.net page. In Asp.net Page ``` <HTML> <HEAD> <script type="text/javascript"> function Myfunction(){ document.getElementId('MyText').value="hi"; ...

31 Jan at 07:57

How to break line in JavaScript?

Please let me know how to break line in JavaScript. ``` <input type='submit' name='Submit' value='Submit' onClick="parent.location='mailto:er.saurav123@gmail.com?subject=Thanks for writing to me &bo...

13 Apr at 13:15

cd into directory without having permission

When `cd`ing into one of my directories called `openfire` the following error is returned: ``` bash: cd: openfire: Permission denied ``` Is there any way around this?

3 Dec at 23:51

What is the difference between "is None" and "== None"

I recently came across this syntax, I am unaware of the difference. I would appreciate it if someone could tell me the difference.

21 Jan at 22:36

ASP.NET MVC Dropdown List From SelectList

I am building the following `SelectList` in my controller. ``` var u = new NewUser(); u.UserTypeOptions = new SelectList(new List<SelectListItem> { new SelectListItem { Selected = true, Text = s...

27 Nov at 13:0

How to copy a folder via cmd?

I want to make a .bat file that when opened will copy a folder and all it contains into another folder on another partition. Here is exactly what I am trying to do: Copy `C:\Documents and Settings\us...

23 Apr at 01:56

XMLHttpRequest cannot load an URL with jQuery

I'm trying to get some json data from a "remote" website. I run my web service on the 99000 port then, I launch my website on the 99001 port (http://localhost:99001/index.html). I get the following m...

29 Sep at 09:13

How to add default signature in Outlook

I am writing a VBA script in Access that creates and auto-populates a few dozen emails. It's been smooth coding so far, but I'm new to Outlook. After creating the mailitem object, ? 1. This would ...

20 Jun at 23:10

How to truncate string using SQL server

i have large string in SQL Server. I want to truncate that string to 10 or 15 character Original string ``` this is test string. this is test string. this is test string. this is test string. ``` ...

28 Feb at 18:1

How to decode a Base64 string?

I have a normal string in Powershell that is from a text file containing Base64 text; it is stored in `$x`. I am trying to decode it as such: ``` $z = [System.Text.Encoding]::Unicode.GetString([Syste...

24 Oct at 15:24

How do I call an Angular 2 pipe with multiple arguments?

I know I can call a pipe like this: ``` {{ myData | date:'fullDate' }} ``` Here the date pipe takes only one argument. What is the syntax to call a pipe with more parameters, from component's templ...

21 Dec at 19:44

Functions are not valid as a React child. This may happen if you return a Component instead of from render

I have written a Higher Order Component: ``` import React from 'react'; const NewHOC = (PassedComponent) => { return class extends React.Component { render(){ return ( ...

Access to XMLHttpRequest has been blocked by CORS policy

I've a problem when I try to do PATCH request in an angular 7 web application. In my backend I have: ``` app.use((req, res, next) => { res.set({ "Access-Control-Allow-Origin": "*", ...

16 Jan at 08:59

How to get character for a given ascii value

How can I get the ascii character of a given ascii code. e.g. I'm looking for a method that given the code 65 would return "A". Thanks

10 Jan at 16:8

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'?

When I run: C:\Users\ashahria\Downloads>java -jar schemaSpy_5.0.0.jar I get the error below. What is wrong? How can I fix it? > Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\Current...

Is there a way to run Bash scripts on Windows?

I have bought and I use Windows 7 Ultimate, and I like to use it to develop applications. One of the down sides (as with every OS) is that I can not run Bash scripts. Is there a way to run Bash script...

20 Jun at 15:10

Display only 10 characters of a long string?

How do I get a long text string (like a querystring) to display a maximum of 10 characters, using JQuery? Sorry guys I'm a novice at JavaScript & JQuery :S Any help would be greatly appreciated.

android:drawableLeft margin and/or padding

Is it possible to set the margin or padding for the image which we added with the `android:drawableLeft`?

UnicodeEncodeError: 'latin-1' codec can't encode character

What could be causing this error when I try to insert a foreign character into the database? ``` >>UnicodeEncodeError: 'latin-1' codec can't encode character u'\u201c' in position 0: ordinal not in r...

15 Oct at 13:57

Comment shortcut Android Studio

I'm searching for useful Android Studio keyboard shortcut for commenting code, as in Sublime Text or Eclipse. When I press either + or ++ nothing happens...

30 Apr at 11:55

Phone mask with jQuery and Masked Input Plugin

I have a problem masking a phone input with jQuery and [Masked Input Plugin](http://digitalbush.com/projects/masked-input-plugin/). There are 2 possible formats: 1. (XX)XXXX-XXXX 2. (XX)XXXXX-XXXX ...