Questions

Chrome: Uncaught SyntaxError: Unexpected end of input

When loading my page in Google Chrome, I get a vague error in the console: > Uncaught SyntaxError: Unexpected end of input I have no idea what is causing it. How would I go about debugging this erro...

How do I get monitor resolution in Python?

What is the simplest way to get monitor resolution (preferably in a tuple)?

18 May at 01:44

A transport-level error has occurred when receiving results from the server

I'm getting a SQL Server error: > A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The handle is invalid.) I'm runni...

18 Dec at 06:13

Best C# API to create PDF

Can you recomend any PDF API for C#. Free is the best, but I don't mind paying for it.

17 Jan at 15:27

How to set username and password for SmtpClient object in .NET?

I see different versions of the constructor, one uses info from web.config, one specifies the host, and one the host and port. But how do I set the username and password to something different from th...

18 Apr at 20:9

What are the calling conventions for UNIX & Linux system calls (and user-space functions) on i386 and x86-64

Following links explain x86-32 system call conventions for both UNIX (BSD flavor) & Linux: - [http://www.int80h.org/bsdasm/#system-calls](http://www.int80h.org/bsdasm/#system-calls)- [http://www.free...

PHP: How to remove specific element from an array?

How do I remove an element from an array when I know the element's value? for example: I have an array: ``` $array = array('apple', 'orange', 'strawberry', 'blueberry', 'kiwi'); ``` the user enters `...

22 Aug at 20:37

Pass Array Parameter in SqlCommand

I am trying to pass array parameter to SQL commnd in C# like below, but it does not work. Does anyone meet it before? ``` string sqlCommand = "SELECT * from TableA WHERE Age IN (@Age)"; SqlConnectio...

20 Jan at 20:50

Best way to add Activity to an Android project in Eclipse?

When adding an activity to an existing Android project, I manually create a new class - is that the best / preferred way? How do others handle that?

2 Jul at 03:59

Search for a string in Enum and return the Enum

I have an enumeration: ``` public enum MyColours { Red, Green, Blue, Yellow, Fuchsia, Aqua, Orange } ``` and I have a string: ``` string colour = "Red"; ``` I want to...

19 Mar at 14:29

Why does javascript replace only first instance when using replace?

I have this ``` var date = $('#Date').val(); ``` this get the value in the textbox what would look like this 12/31/2009 Now I do this on it ``` var id = 'c_' + date.replace("/", ''); ``` and t...

27 Dec at 22:0

How to change string into QString?

What is the most basic way to do it?

27 Jan at 23:55

Determining the path that a yum package installed to

I've installed ffmpeg using yum under Redhat, and I'm having difficulty figuring out where (what path) it installed the package to. Is there an easy way of determining this without resorting to findin...

19 Nov at 20:43

Creating .pem file for APNS?

How do I create a .pem file to be stored in the hosting server for APN payload data?

Is there a limit on how much JSON can hold?

I am using jquery, JSON, and AJAX for a comment system. I am curious, is there a size limit on what you can send through/store with JSON? Like if a user types a large amount and I send it through JSO...

11 Aug at 19:54

How to select distinct rows in a datatable and store into an array

I have a dataset objds. objds contains a table named Table1. Table1 contains column named ProcessName. This ProcessName contains repeated names.So i want to select only distinct names.Is this possible...

3 Jan at 13:21

Pass Additional ViewData to a Strongly-Typed Partial View

I have a strongly-typed Partial View that takes a ProductImage and when it is rendered I would also like to provide it with some additional ViewData which I create dynamically in the containing page. ...

Where IN clause in LINQ

How to make a where in clause similar to one in SQL Server? I made one by myself but can anyone please improve this? ``` public List<State> Wherein(string listofcountrycodes) { string[] ...

6 Jun at 14:47

Number of rows affected by an UPDATE in PL/SQL

I have a PL/SQL function (running on Oracle 10g) in which I update some rows. Is there a way to find out how many rows were affected by the UPDATE? When executing the query manually it tells me how ma...

8 Mar at 17:23

Push origin master error on new repository

I just started using git with github. I followed their instructions and ran into errors on the last step. I'm checking in an existing directory that isn't currently source-controlled (project about a ...

6 Mar at 23:22

How do I use LINQ to obtain a unique list of properties from a list of objects?

I'm trying to use LINQ to return a list of ids given a list of objects where the id is a property. I'd like to be able to do this without looping through each object and pulling out the unique ids tha...

15 Aug at 19:23

WCF service startup error "This collection already contains an address with scheme http"

I built a web application containing a WCF service contract and a Silverlight control which makes calls to that WCF service. On my development and test servers it works great. When I deploy to our l...

17 Nov at 15:16

Java array reflection: isArray vs. instanceof

Is there a preference or behavior difference between using: ``` if(obj.getClass().isArray()) {} ``` and ``` if(obj instanceof Object[]) {} ``` ?

20 Oct at 20:56

How do I handle the window close event in Tkinter?

How do I handle the window close event (user clicking the 'X' button) in a Python Tkinter program?

23 Mar at 02:44

How to do INSERT into a table records extracted from another table

I'm trying to write a query that extracts and transforms data from a table and then insert those data into another table. Yes, this is a data warehousing query and I'm doing it in MS Access. So basica...

16 Sep at 16:26