Questions

Pass variables to Ruby script via command line

I've installed RubyInstaller on Windows and I'm running [IMAP Sync](http://wonko.com/post/ruby_script_to_sync_email_from_any_imap_server_to_gmail) but I need to use it to sync hundreds of accounts. If...

7 Oct at 21:44

Shortcut to create properties in Visual Studio?

I have seen some people creating properties in C# really fast, but how did they do it? What shortcuts are available in Visual Studio (currently using Visual Studio 2010) to create properties? I am u...

How do I check if file exists in jQuery or pure JavaScript?

How do I check if a file on my server exists in jQuery or pure JavaScript?

7 Nov at 15:3

Calling a function every 60 seconds

Using `setTimeout()` it is possible to launch a function at a specified time: ``` setTimeout(function, 60000); ``` But what if I would like to launch the function multiple times? Every time a time ...

How to hide elements without having them take space on the page?

I'm using `visibility:hidden` to hide certain elements, but they still take up space on the page while hidden. How can I make them totally disappear visually, as though they are not in the DOM at all...

26 Jul at 16:8

How can I read command line parameters from an R script?

I've got a R script for which I'd like to be able to supply several command-line parameters (rather than hardcode parameter values in the code itself). The script runs on Windows. I can't find info ...

27 Jan at 23:40

Maven parent pom vs modules pom

There seem to be several ways to structure parent poms in a multiproject build and I wondering if anyone had any thoughts on what the advantages / drawbacks are in each way. The simplest method of ha...

2 Jan at 18:3

Find a class somewhere inside dozens of JAR files?

How would you find a particular class name inside lots of jar files? (Looking for the actual class name, not the classes that reference it.)

Create tap-able "links" in the NSAttributedString of a UILabel?

Many applications have text and in this text are web hyperlinks in rounded rect. When I click them `UIWebView` opens. What puzzles me is that they often have custom links, for example if words starts ...

MSBuild doesn't copy references (DLL files) if using project dependencies in solution

I have four projects in my Visual Studio solution (everyone targeting .NET 3.5) - for my problem only these two are important: 1. MyBaseProject <- this class library references a third-party DLL fil...

How do I copy the contents of a String to the clipboard in C#?

If I have some text in a String, how can I copy that to the clipboard so that the user can paste it into another window (for example, from my application to Notepad)?

15 Jan at 15:22

How can I read SMS messages from the device programmatically in Android?

I want to retrieve the SMS messages from the device and display them?

20 Jan at 07:23

How to store decimal values in SQL Server?

I'm trying to figure out decimal data type of a column in the SQL Server. I need to be able to store values like 15.5, 26.9, 24.7, 9.8, etc I assigned `decimal(18, 0)` to the column data type but thi...

11 Sep at 08:31

Sorting a list using Lambda/Linq to objects

I have the name of the "sort by property" in a string. I will need to use Lambda/Linq to sort the list of objects. Ex: ``` public class Employee { public string FirstName {set; get;} public stri...

27 Dec at 07:27

Formatting code snippets for blogging on Blogger

My blog is hosted on Blogger and I frequently post code snippets in `C` / `C#` / `Java` / `XML` etc. but I find the snippet gets "mangled". Are there any web sites that I could use to parse the snipp...

23 May at 12:2

Why can't I define a default constructor for a struct in .NET?

In .NET, a value type (C# `struct`) can't have a constructor with no parameters. According to [this post](https://stackoverflow.com/questions/203695/structure-vs-class-in-c#204009) this is mandated by...

23 May at 12:34

Reading/writing an INI file

Is there any class in the .NET framework that can read/write standard .ini files: ``` [Section] <keyname>=<value> ... ``` Delphi has the `TIniFile` component and I want to know if there is anything...

12 May at 20:41

Landscape printing from HTML

I have a HTML report, which needs to be printed landscape because of the many columns. It there a way to do this, without the user having to change the document settings? And what are the options amo...

8 Sep at 10:26

What is the Windows version of cron?

A [Google search](http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=windows+cron) turned up software that performs the same functions as cron, but nothing built into Windows. ...

CASCADE DELETE just once

I have a Postgresql database on which I want to do a few cascading deletes. However, the tables aren't set up with the ON DELETE CASCADE rule. Is there any way I can perform a delete and tell Postgr...

23 May at 12:26

Hidden Features of Java

After reading [Hidden Features of C#](https://stackoverflow.com/questions/9033/hidden-features-of-c) I wondered, What are some of the hidden features of Java?

23 May at 12:26

How can I prevent Google Colab from disconnecting?

Is there a way to programmatically prevent [Google Colab](https://colab.research.google.com/) from disconnecting on a timeout? [](https://i.stack.imgur.com/lkvoo.jpg) The following describes the condi...

Property 'value' does not exist on type 'Readonly<{}>'

I need to create a form that will display something based on the return value of an API. I'm working with the following code: ``` class App extends React.Component { constructor(props) { super(...

16 May at 18:5

Dynamic tag name in React JSX

I am trying to write a React component for HTML heading tags (`h1`, `h2`, `h3`, etc.), where the heading level is specified via a prop. I tried to do it like this: ``` <h{this.props.level}>Hello</h{th...

10 Jul at 11:15

What's does the dollar sign ($"string") do?

I have been looking over some C# exercises in a book and I ran across an example that stumped me. Straight from the book, the output line shows as: ``` Console.WriteLine($"\n\tYour result is {result}....

29 Jan at 23:39