Questions

Make a link use POST instead of GET

I'm not sure if this is even possible. But I was wondering if anyone knows how to make a hyperlink pass some variables and use POST (like a form) as opposed to GET.

14 Jul at 02:18

How can I force WebKit to redraw/repaint to propagate style changes?

I have some trivial JavaScript to effect a style change: ``` sel = document.getElementById('my_id'); sel.className = sel.className.replace(/item-[1-9]-selected/,'item-1-selected'); return false; ``` ...

15 Aug at 00:12

Java: Date from unix timestamp

I need to convert a unix timestamp to a date object. I tried this: ``` java.util.Date time = new java.util.Date(timeStamp); ``` Timestamp value is: `1280512800` The Date should be "2010/07/30 - 22...

19 Sep at 20:1

Fastest way to remove first char in a String

Say we have the following string ``` string data= "/temp string"; ``` If we want to remove the first character `/` we can do by a lot of ways such as : ``` data.Remove(0,1); data.TrimStart('/'); ...

9 Aug at 08:31

HTTP Basic Authentication credentials passed in URL and encryption

I have a question about HTTPS and HTTP Authentication credentials. Suppose I secure a URL with HTTP Authentication: ``` <Directory /var/www/webcallback> AuthType Basic AuthName "Restricted Area" Aut...

8 Nov at 07:33

Random number from a range in a Bash Script

I need to generate a random port number between `2000-65000` from a shell script. The problem is `$RANDOM` is a 15-bit number, so I'm stuck! `PORT=$(($RANDOM%63000+2001))` would work nicely if it was...

23 Aug at 12:3

What is the equivalent of bigint in C#?

What am I supposed to use when handling a value in C#, which is bigint for an SQL Server database?

9 Jul at 04:43

What is the email subject length limit?

How many characters are allowed to be in the subject line of Internet email? I had a scan of [The RFC for email](http://www.w3.org/Protocols/rfc822/) but could not see specifically how long it was all...

16 Dec at 21:40

Splitting a string into chunks of a certain size

Suppose I had a string: ``` string str = "1111222233334444"; ``` How can I break this string into chunks of some size? e.g., breaking this into sizes of 4 would return strings: ``` "1111" "2222" "33...

20 May at 10:52

jQuery selector for the label of a checkbox

``` <input type="checkbox" name="filter" id="comedyclubs"/> <label for="comedyclubs">Comedy Clubs</label> ``` If I have a check box with a label describing it, how can I select the label using jQuer...

25 Mar at 00:14

How to change an element's title attribute using jQuery

I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be sea...

12 Aug at 17:46

What's the difference between Perl's backticks, system, and exec?

Can someone please help me? In Perl, what is the difference between: ``` exec "command"; ``` and ``` system("command"); ``` and ``` print `command`; ``` Are there other ways to run shell comm...

12 Feb at 21:51

WiX tricks and tips

We've been using WiX for a while now, and despite the usual gripes about ease of use, it's going reasonably well. What I'm looking for is useful advice regarding: - - - -

25 Sep at 20:53

String vs string in C#

> [In C# what is the difference between String and string](https://stackoverflow.com/questions/7074/in-c-sharp-what-is-the-difference-between-string-and-string) In C# the string keyword (highl...

23 May at 12:32

Fluent and Query Expression — Is there any benefit(s) of one over other?

LINQ is one of the greatest improvements to .NET since generics and it saves me tons of time, and lines of code. However, the fluent syntax seems to come much more natural to me than the query expres...

7 Jun at 04:40

HTML.ActionLink method

Let's say I have a class ``` public class ItemController:Controller { public ActionResult Login(int id) { return View("Hi", id); } } ``` On a page that is not located at the Ite...

What is the best way to clone/deep copy a .NET generic Dictionary<string, T>?

I've got a generic dictionary `Dictionary<string, T>` that I would like to essentially make a Clone() of ..any suggestions.

15 Apr at 13:54

Using .NET, how can you find the mime type of a file based on the file signature not the extension

I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to [this question](https://stackoverflow.com/questions/51438/getting-a-files-mime...

23 May at 10:31

What is pyproject.toml file for?

### Background I was about to try Python package downloaded from GitHub, and realized that it did not have a `setup.py`, so I could not install it with ``` pip install -e <folder> ``` Instead, the...

5 Mar at 08:10

Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing

I had an Asp.Net core 2.2 project. Recently, I changed the version from .net core 2.2 to .net core 3.0 Preview 8. After this change I see this warning message: > using 'UseMvc' to configure MVC is...

Can I set state inside a useEffect hook

Lets say I have some state that is dependent on some other state (eg when A changes I want B to change). Is it appropriate to create a hook that observes A and sets B inside the useEffect hook? Wi...

23 Jul at 15:44

startForeground fail after upgrade to Android 8.1

After upgrading my phone to 8.1 Developer Preview my background service no longer starts up properly. In my long-running service I've implemented a `startForeground` method to start the ongoing notifi...

CSS grid wrapping

Is it possible to make a CSS grid wrap without using media queries? In my case, I have a non-deterministic number of items that I want placed in a grid and I want that grid to wrap. Using Flexbox, I'...

3 Nov at 12:30

Why is my asynchronous function returning Promise { <pending> } instead of a value?

My code: ``` let AuthUser = data => { return google.login(data.username, data.password).then(token => { return token } ) } ``` And when i try to run something like this: ``` let userToken = Auth...

27 Apr at 08:21

ReactJS: Warning: setState(...): Cannot update during an existing state transition

I am trying to refactor the following code from my render view: ``` <Button href="#" active={!this.state.singleJourney} onClick={this.handleButtonChange.bind(this,false)} >Retour</Button> ``` to a ...

23 May at 09:29