Simple (non-secure) hash function for JavaScript?
> [Generate a Hash from string in Javascript/jQuery](https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery) Can anyone suggest a simple (i.e. tens of lin...
- Modified
- 23 May at 12:2
How can I get an HTTP response body as a string?
I know there used to be a way to get it with Apache Commons as documented here: [http://hc.apache.org/httpclient-legacy/apidocs/org/apache/commons/httpclient/HttpMethod.html](http://hc.apache.org/http...
- Modified
- 18 Feb at 08:51
How to write Unicode characters to the console?
I was wondering if it was possible, in a console application, to write characters like `℃` using .NET. When I try to write this character, the console outputs a question mark.
- Modified
- 23 Apr at 02:14
How to get last inserted id?
I have this code: ``` string insertSql = "INSERT INTO aspnet_GameProfiles(UserId,GameId) VALUES(@UserId, @GameId)"; using (SqlConnection myConnection = new SqlConnection(myConnectionString)) { ...
- Modified
- 8 Mar at 05:48
Enable 'xp_cmdshell' SQL Server
I want to execute `EXEC master..xp_cmdshell @bcpquery` But I am getting the following error: > SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this compo...
- Modified
- 28 Feb at 09:59
Php multiple delimiters in explode
I have a problem, I have a string array, and I want to explode in different delimiter. For Example ``` $example = 'Appel @ Ratte'; $example2 = 'apple vs ratte' ``` and I need an array which is expl...
Your project contains error(s), please fix it before running it
I am developing a simple Android application. But when I run Eclipse, it shows the following error: > Your project contains error(s), please fix it before running it. I can't find any error in my pr...
Differences between Html.TextboxFor and Html.EditorFor in MVC and Razor
Why by default were these changed when adding a new "edit" view? What are advantages when using `EditorFor()` vs. `TextboxFor()`? I found this > By default, the Create and Edit scaffolds now use the ...
- Modified
- 2 May at 07:7
Why should we NOT use sys.setdefaultencoding("utf-8") in a py script?
I have seen few py scripts which use this at the top of the script. In what cases one should use it? ``` import sys reload(sys) sys.setdefaultencoding("utf-8") ```
- Modified
- 15 Nov at 22:3
MYSQL Truncated incorrect DOUBLE value
When the SQL query below is executed: ``` UPDATE shop_category SET name = 'Secolul XVI - XVIII' AND name_eng = '16th to 18th centuries' WHERE category_id = 4768 ``` The following error is ra...
- Modified
- 12 Dec at 15:42
Get query from java.sql.PreparedStatement
In my code I am using `java.sql.PreparedStatement`. I then execute the `setString()` method to populate the wildcards of the prepared statement. Is there a way for me to retrieve (and print out) the...
- Modified
- 11 Jul at 12:29
How to iterate through a DataTable
I need to iterate through a `DataTable`. I have an column there named `ImagePath`. When I am using `DataReader` I do it this way: ``` SqlDataReader dr = null; dr = cmd.ExecuteReader(); while (dr.Re...
What is the point of Lookup<TKey, TElement>?
The MSDN explains Lookup like this: > A [Lookup<TKey, TElement>](http://msdn.microsoft.com/en-us/library/bb460184%28v=vs.90%29.aspx) resembles a [Dictionary<TKey, TValue>](http://msdn.microsoft.com...
What is the difference between Server.MapPath and HostingEnvironment.MapPath?
Is there any difference between `Server.MapPath()` and `HostingEnvironment.MapPath()`? Does `Server.MapPath()` have any advantages over `HostingEnvironment.MapPath()`? My original problem was mapping...
What's a good hex editor/viewer for the Mac?
What's a good hex editor/viewer for the Mac? I've used xxd for viewing hexdumps, and I think it can be used in reverse to make edits. But what I really want is a real hex editor.
- Modified
- 5 May at 23:5
Passing a Bundle on startActivity()?
What's the correct way to pass a bundle to the activity that is being launched from the current one? Shared properties?
- Modified
- 25 Sep at 01:35
Is it possible to use the SELECT INTO clause with UNION [ALL]?
In SQL Server this inserts 100 records, from the Customers table into tmpFerdeen :- ``` SELECT top(100)* INTO tmpFerdeen FROM Customers ``` Is it possible to do a SELECT INTO across a UNION ALL SE...
- Modified
- 26 Feb at 16:57
C++ Dynamic Shared Library on Linux
This is a follow-up to [Dynamic Shared Library compilation with g++](https://stackoverflow.com/q/483797/1288). I'm trying to create a shared class library in C++ on Linux. I'm able to get the librar...
- Modified
- 23 May at 10:31
C++ cout hex values?
I want to do: ``` int a = 255; cout << a; ``` and have it show FF in the output, how would I do this?
Why is it considered a bad practice to omit curly braces?
Why does everyone tell me writing code like this is a bad practice? ``` if (foo) Bar(); //or for(int i = 0 i < count; i++) Bar(i); ``` My biggest argument for omitting the curly braces is...
- Modified
- 19 Aug at 17:7
Tools to search for strings inside files without indexing
I have to change some connection strings in an incredibly old legacy application, and the programmers who made it thought it would be a great idea to plaster the entire app with connection strings all...
- Modified
- 18 May at 08:48
Test if string is a guid without throwing exceptions?
I want to try to convert a string to a Guid, but I don't want to rely on catching exceptions ( - - - In other words the code: ``` public static Boolean TryStrToGuid(String s, out Guid value) { ...
.Net Core 3.0 possible object cycle was detected which is not supported
I have 2 entities that are related as one to many ``` public class Restaurant { public int RestaurantId {get;set;} public string Name {get;set;} public List<Reservation> Reservations {get;se...
- Modified
- 31 Jan at 11:24
Distribution certificate / private key not installed
Using Xcode 9.1, after building an iOS app, I want to archive it and upload it to the appStore for beta-testing. But I get the following issue after clicking the button `Upload to the App Store...` an...
- Modified
- 29 Oct at 16:40
Laravel 5.5 ajax call 419 (unknown status)
I do an ajax call but I keep getting this error: > 419 (unknown status) No idea what is causing this I saw on other posts it has to do something with csrf token but I have no form so I dont know how...