Questions

How do multiple clients connect simultaneously to one port, say 80, on a server?

I understand the basics of how ports work. However, what I don't get is how multiple clients can simultaneously connect to say port 80. I know each client has a unique (for their machine) port. Does t...

Increase number of axis ticks

I'm generating plots for some data, but the number of ticks is too small, I need more on the reading. Is there some way to increase the number of axis ticks in ggplot2? I know I can tell ggplot to ...

21 Mar at 08:35

Could not locate Gemfile

I'm certainly no Ruby developer but I have an application on my server using Ruby, Gems, and Bundler. I am trying to install another Ruby on under a different user account but on the same VPS. When I ...

25 Jul at 16:16

How to convert the background to transparent?

I have no experience with any image processing/editing tools. I am doing a project which requires me to convert the images(small icon) with background colour(red/blue/white) to transparent for the web...

9 Feb at 20:23

Long vs Integer, long vs int, what to use and when?

Sometimes I see API's using `long` or `Long` or `int` or `Integer`, and I can't figure how the decision is made for that? When should I choose what?

2 May at 13:48

How to sum up an array of integers in C#

Is there a shorter way than iterating over the array? ``` int[] arr = new int[] { 1, 2, 3 }; int sum = 0; for (int i = 0; i < arr.Length; i++) { sum += arr[i]; } ``` --- clarification: Be...

4 Apr at 15:50

Unable to resolve host "<URL here>" No address associated with host name

In my Android application for reading [RSS](http://en.wikipedia.org/wiki/RSS) links, I am getting this error: > java.net.UnknownHostException: Unable to resolve host "example.com"; No address ass...

21 Jan at 12:3

Laravel - Eloquent or Fluent random row

How can I select a random row using Eloquent or Fluent in Laravel framework? I know that by using SQL, you can do order by RAND(). However, I would like to get the random row doing a count on the nu...

16 Jun at 04:38

How do I remove the title bar from my app?

In my app there is this title bar at the top where the overflow menu would be, but I don't need settings and only have one screen. When I change the theme like described in many other questions I get ...

28 Dec at 21:15

Array slices in C#

How do you do it? Given a byte array: ``` byte[] foo = new byte[4096]; ``` How would I get the first x bytes of the array as a separate array? (Specifically, I need it as an `IEnumerable<byte>`) T...

3 Jan at 07:19

ASP.NET Web Application Message Box

In an asp.net windows forms application, in the C# code behind you can use: ``` MessageBox.Show("Here is my message"); ``` Is there any equivalent in a asp.net web application? Can I call somethin...

How do I specify the exit code of a console application in .NET?

I have a trivial console application in .NET. It's just a test part of a larger application. I'd like to specify the "exit code" of my console application. How do I do this?

20 Nov at 15:31

Delete all the records

How to delete all the records in SQL Server 2008?

JTable How to refresh table model after insert delete or update the data.

This is my jTable ``` private JTable getJTable() { String[] colName = { "Name", "Email", "Contact No. 1", "Contact No. 2", "Group", "" }; if (jTable == null) { jTable = n...

14 Apr at 11:26

How to make Twitter bootstrap modal full screen

``` <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-body"> <%= image_tag "Background.jpg" %> </div> <...

12 Sep at 23:57

How would you do a "not in" query with LINQ?

I have two collections which have property `Email` in both collections. I need to get a list of the items in the first list where `Email` does not exist in the second list. With SQL I would just use "...

6 Mar at 20:25

Insert HTML with React Variable Statements (JSX)

I am building something with React where I need to insert HTML with React Variables in JSX. Is there a way to have a variable like so: ``` var thisIsMyCopy = '<p>copy copy copy <strong>strong copy</s...

31 Jan at 09:35

How do I test a website using XAMPP?

This is a fairly general query as I'm very confused about how to do this. I want to use the apache server which I have downloaded as part of XAMPP in order to test the website I am building, which wil...

23 May at 12:26

How to find Oracle Service Name

I have an Oracle database on my network which I am able to connect to with Oracle SQL Developer, using hostname, port, username, password and the SID. I need to connect another application (Quantum G...

14 Mar at 08:32

Using async/await for multiple tasks

I'm using an API client that is completely asynchrounous, that is, each operation either returns `Task` or `Task<T>`, e.g: ``` static async Task DoSomething(int siteId, int postId, IBlogClient client...

ssh script returns 255 error

In my code I have the following to run a remote script. ``` ssh root@host.domain.com "sh /home/user/backup_mysql.sh" ``` For some reason it keeps 255'ing on me. Any ideas? I can SSH into the box j...

19 Feb at 17:50

Error: Cannot pull with rebase: You have unstaged changes

I have started collaborating with a few friends on a project & they use the heroku git repository. I cloned the repository a few days ago and they have since made some changes so I am trying to get t...

7 May at 13:4

How do I create delegates in Objective-C?

I know how delegates work, and I know how I can use them. But how do I create them?

ALTER table - adding AUTOINCREMENT in MySQL

I created a table in MySQL with on column `itemID`. After creating the table, now I want to change this column to `AUTOINCREMENT`. ? Table definition: `ALLITEMS (itemid int(10) unsigned, itemname varc...

2 Jan at 11:9

How to change the size of the font of a JLabel to take the maximum size

I have a `JLabel` in a Container. The defaut size of the font is very small. I would like that the text of the `JLabel` to take the maximum size. How can I do that?

8 Jun at 11:4