Questions

GetType used in PowerShell, difference between variables

What is the difference between variables `$a` and `$b`? ``` $a = (Get-Date).DayOfWeek $b = Get-Date | Select-Object DayOfWeek ``` I tried to check ``` $a.GetType $b.GetType MemberType : ...

19 Feb at 14:6

How to cast Object to its actual type?

If I have: ``` void MyMethod(Object obj) { ... } ``` How can I cast `obj` to what its actual type is?

2 Sep at 07:18

How can I disable a button in a jQuery dialog from a function?

I have a jQuery dialog that requires the user to enter certain information. In this form, I have a "continue" button. I would like this "continue" button to only be enabled once all the fields have co...

8 Feb at 00:49

How to get row count using ResultSet in Java?

I'm trying to create a simple method that receives a ResultSet as a parameter and returns an int that contains the row count of the ResultSet. Is this a valid way of doing this or not so much? ``` int...

3 Jun at 04:55

How do I convert from BLOB to TEXT in MySQL?

I have a whole lot of records where text has been stored in a blob in MySQL. For ease of handling I'd like to change the format in the database to TEXT... Any ideas how easily to make the change so as...

26 Nov at 13:52

How do I concatenate two strings in Java?

I am trying to concatenate strings in Java. Why isn't this working? ``` public class StackOverflowTest { public static void main(String args[]) { int theNumber = 42; System.out...

12 Oct at 08:18

How do I close an open port from the terminal on the Mac?

I opened port #5955 from a java class to comunicate from a client. How do i close this port after I am done? and also which command can show me if port open or closed?

28 Sep at 06:4

Match two strings in one line with grep

I am trying to use `grep` to match lines that contain two different strings. I have tried the following but this matches lines that contain either which not what I want. ``` grep 'string1\|string2...

10 Jul at 22:57

Text border using css (border around text)

Is there a way to integrate a border around text like the image below? ![text border](https://i.stack.imgur.com/DeWjI.jpg)

20 Jun at 09:12

How to prevent favicon.ico requests?

I don't have a favicon.ico, but my browser always makes a request for it. Is it possible to prevent the browser from making a request for the favicon from my site? Maybe some META-TAG in the HTML head...

29 Aug at 08:1

Difference between except: and except Exception as e:

Both the following snippets of code do the same thing. They catch every exception and execute the code in the `except:` block Snippet 1 - ``` try: #some code that may throw an exception except:...

6 Apr at 11:55

Datatables: Cannot read property 'mData' of undefined

I have an issue with `Datatables`. I also went through [this link](http://datatables.net/forums/discussion/20273/uncaught-typeerror-cannot-read-property-mdata-of-undefined) which didn't yield any resu...

9 Jun at 19:8

How do I filter query objects by date range in Django?

I've got a field in one model like: ``` class Sample(models.Model): date = fields.DateField(auto_now=False) ``` Now, I need to filter the objects by a date range. How do I filter all the objec...

Get MIME type from filename extension

How can I get the MIME type from a file extension?

18 Apr at 02:13

The import javax.servlet can't be resolved

I'm trying to use for to develop web applications. I need to use as my . I've downloaded Tomcat and it's running. But my program doesn't compile. I get the following error: > The import javax...

6 Feb at 11:33

How to check if type is Boolean

How can I check if a variable's type is of type Boolean? I mean, there are some alternatives such as: ``` if(jQuery.type(new Boolean()) === jQuery.type(variable)) //Do something.. ``` But th...

2 Mar at 16:23

I can't install intel HAXM

I installed Android Studio and I had no problems with that. However, when I tried to run the emulator, it said that Intel HAXM was not installed. So I found the installer, ran it, and it even though ...

Deleting an object in java?

I want to delete an object I created, (a oval which follows you), but how would I do this? ``` delete follower1; ``` didn't work. EDIT: Okay, I'll give some more context. I'm making a small game...

28 Aug at 11:37

Python Save to file

I would like to save a string to a file with a python program named `Failed.py` Here is what I have so far: ``` myFile = open('today','r') ips = {} for line in myFile: parts = line.split(' ') ...

22 Oct at 17:40

Searching if value exists in a list of objects using Linq

Say I have a class `Customer` which has a property `FirstName`. Then I have a `List<Customer>`. Can LINQ be used to find if the list has a customer with `Firstname = 'John'` in a single statement.. h...

28 May at 12:16

Calculating difference between two timestamps in Oracle in milliseconds

How do I calculate the time difference in milliseconds between two timestamps in Oracle?

23 Jul at 18:13

How can I return pivot table output in MySQL?

If I have a MySQL table looking something like this: Is it possible to run a MySQL query to get output like this: The idea is that `pagecount` can vary so the output column amount should reflect...

16 Dec at 22:10

What does %w(array) mean?

I'm looking at the documentation for FileUtils. I'm confused by the following line: ``` FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6' ``` What does the `%w` mean? Can you poin...

17 Apr at 18:33

How do I Set Background image in Flutter?

I am trying to set a background image for the home page. I am getting the image place from start of the screen and filling the width but not the height. Am I missing something in my code? Are there im...

19 Jun at 11:26

Adding a new SQL column with a default value

I am looking for the syntax to add a column to a MySQL database with a default value of 0 [Reference](http://dev.mysql.com/doc/refman/5.1/en/alter-table.html)

30 Jan at 10:44