Questions

Call ASP.NET function from JavaScript?

I'm writing a web page in ASP.NET. I have some JavaScript code, and I have a submit button with a click event. Is it possible to call a method I created in ASP with JavaScript's click event?

9 Dec at 17:23

How to use comparison operators like >, =, < on BigDecimal

I have a domain class with `unitPrice` set as `BigDecimal` data type. Now I am trying to create a method to compare price but it seems like I can't have comparison operators in `BigDecimal` data type....

4 Jan at 20:4

How to use LDFLAGS in makefile

I am new to Linux OS. I am trying to compile a `.c` file using a makefile. The math library has to be linked. My makefile looks like this: ``` CC=gcc CFLAGS=-Wall -lm all:client .PHONY: clean clean...

19 Jan at 13:45

What is PEP8's E128: continuation line under-indented for visual indent?

Just opened a file with Sublime Text (with Sublime Linter) and noticed a PEP8 formatting error that I'd never seen before. Here's the text: ``` urlpatterns = patterns('', url(r'^$', listing, name...

15 Mar at 15:10

Pass object to javascript function

I have recently been messing around with jQuery on my website, and I have a fairly limited knowledge of Javascript. I am beginning to like the jQuery ability to pass variables to a jQuery function ins...

Generate MD5 hash string with T-SQL

Is there a way to generate MD5 Hash string of type varchar(32) without using fn_varbintohexstr ``` SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', 'email@dot.com')), 3, 32) ``` So it could ...

19 Aug at 20:47

Last executed queries for a specific database

I know how to get the last executed queries using the following SQL in SSMS - ``` SELECT deqs.last_execution_time AS [Time], dest.text AS [Query] FROM sys.dm_exec_query_stats AS deqs CROSS APPLY sys....

30 Nov at 03:27

jQuery set radio button

I am trying to set a radio button. I want set it by using the value or the id. This is what I've tried. ``` $('input:radio[name=cols]'+" #"+newcol).attr('checked',true); ``` `newcol` is the id of ...

13 Sep at 19:55

Python equivalent of a given wget command

I'm trying to create a Python function that does the same thing as this wget command: ``` wget -c --read-timeout=5 --tries=0 "$URL" ``` `-c` - Continue from where you left off if the download is in...

21 Jun at 23:46

Set up git to pull and push all branches

I'd like to push and pull all the branches by default, including the newly created ones. Is there a setting that I can define for it? Otherwise, when I add a new branch, locally and I want to pull i...

16 Dec at 13:18

Bootstrap: add margin/padding space between columns

I'm trying to put some extra margin/padding space between columns on my Bootstrap grid layout. I've tried [this](https://stackoverflow.com/questions/18738712/twitter-bootstrap-grid-system-spacing-betw...

find: missing argument to -exec

I was helped out today with a command, but it doesn't seem to be working. This is the command: ``` find /home/me/download/ -type f -name "*.rm" -exec ffmpeg -i {} -sameq {}.mp3 && rm {}\; ``` The she...

19 Jun at 03:59

Control cannot fall through from one case label

I am trying to write a switch statement that would type the search term in the search field depending on whichever search textbox is present. I have the following code. But I am getting a "Control can...

20 Jun at 09:12

How to fix "Referenced assembly does not have a strong name" error

I've added a weakly named assembly to my [Visual Studio 2005](http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2005) project (which is strongly named). I'm now getting the error: > "...

What are REST API error handling best practices?

I'm looking for guidance on good practices when it comes to return errors from a REST API. I'm working on a new API so I can take it any direction right now. My content type is XML at the moment, but ...

4 Nov at 18:33

Converting file into Base64String and back again

The title says it all: 1. I read in a tar.gz archive like so 2. break the file into an array of bytes 3. Convert those bytes into a Base64 string 4. Convert that Base64 string back into an array of ...

css to make bootstrap navbar transparent

I use bootstrap and I have a navbar in my html file I would like to make this nav bar transparent to show the background image. Can some one teach me how to do this with css? I tried the following css...

6 May at 06:12

How to solve npm install throwing fsevents warning on non-MAC OS?

Following warning is being thrown on `npm install` command - ``` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\rea ct-scripts\node_modules\fsevents): npm WARN notsup SK...

25 Oct at 10:29

android splash screen sizes for ldpi,mdpi, hdpi, xhdpi displays ? - eg : 1024X768 pixels for ldpi

I have to design splash screens(images that fit screen while loading) for android application using phonegap. I have to design 4 size images that fit for 4types of screens like ldpi, mdpi , hdpi, xhdp...

17 Oct at 10:50

PHP PDO: charset, set names?

I had this previously in my normal mysql_* connection: ``` mysql_set_charset("utf8",$link); mysql_query("SET NAMES 'UTF8'"); ``` Do I need it for the PDO? And where should I have it? ``` $connect ...

28 Apr at 16:16

Polymorphism vs Overriding vs Overloading

In terms of Java, when someone asks: > what is polymorphism? Would or be an acceptable answer? I think there is a bit more to it than that. I think is not the right answer for sure.

How does System.out.print() work?

I have worked with Java for a quite a long time, and I was wondering how the function `System.out.print()` works. Here is my doubt: Being a function, it has a declaration somewhere in the package. ...

12 Jul at 16:23

Node.js create folder or use existing

I already have read the documentation of Node.js and, unless if I missed something, it does not tell what the parameters contain in certain operations, in particular [fs.mkdir()](http://nodejs.org/api...

4 Dec at 04:34

Split string in C every white space

I want to write a program in C that displays each word of a whole sentence (taken as input) at a seperate line. This is what I have done so far: --- ``` void manipulate(char *buffer); int get_words...

19 Dec at 22:3

Writing/outputting HTML strings unescaped

I've got safe/sanitized HTML saved in a DB table. How can I have this HTML content written out in a Razor view? It always escapes characters like `<` and ampersands to `&amp;`.

1 May at 16:30