Skip to content

Instantly share code, notes, and snippets.

@tomaszkubacki
tomaszkubacki / gist:628374
Created October 15, 2010 15:23
other error
/opt/mono/bin/gmcs -debug -codepage:utf8 -warnaserror -debug -out:../../../build/bin/MonoDevelop.Projects.Formats.MSBuild.exe -target:winexe -r:Microsoft.Build.Engine -r:Microsoft.Build.Framework -r:Microsoft.Build.Utilities -r:System -r:System.Runtime.Remoting ./AssemblyInfo.cs ./Main.cs ./MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs ./MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs ./MonoDevelop.Projects.Formats.MSBuild/IBuildEngine.cs ./MonoDevelop.Projects.Formats.MSBuild/ILogWriter.cs ./MonoDevelop.Projects.Formats.MSBuild/IProjectBuilder.cs ./MonoDevelop.Projects.Formats.MSBuild/LocalLogger.cs ./MonoDevelop.Projects.Formats.MSBuild/MSBuildResult.cs ./MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs
./MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs(167,60): error CS0618: `System.Threading.Thread.ApartmentState' is obsolete: `Deprecated in favor of GetApartmentState, SetApartmentState and TrySetApartmentState.'
Compilation failed: 1 error(s), 0 warnings
make[4]: *** [../../../
@tomaszkubacki
tomaszkubacki / gist:792174
Created January 23, 2011 16:12
result with with header... on mono and .net the same empty xml
string transform = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
"<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> " +
"<xsl:template match=\"*\"> " +
"<xsl:variable name=\"a\" select=\"'a'\"/> " +
"<xsl:value-of select=\"*[@a=$a]\"/> " +
"</xsl:template> " +
"</xsl:stylesheet>";
XmlReader rd = new XmlTextReader( new StringReader(transform));
@tomaszkubacki
tomaszkubacki / gist:882751
Created March 23, 2011 07:30
mono 2-10 compile error
make[4]: Entering directory `/home/tomek/projekty/not_my_projects/mono_readonly/mono/mono/utils'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/tomek/projekty/not_my_projects/mono_readonly/mono/mono/utils'
make[3]: Leaving directory `/home/tomek/projekty/not_my_projects/mono_readonly/mono/mono/utils'
Making all in io-layer
make[3]: Entering directory `/home/tomek/projekty/not_my_projects/mono_readonly/mono/mono/io-layer'
CC io.lo
io.c: In function ‘GetDriveTypeFromPath’:
io.c:3925: error: storage size of ‘buf’ isn’t known
@tomaszkubacki
tomaszkubacki / gist:905685
Created April 6, 2011 13:57
typo fix in postgresql schema provider
From a245d4278e1e83d11be17cf65ffba1b0777de5b4 Mon Sep 17 00:00:00 2001
From: Tomasz Kubacki <tomasz.kubacki@gmail.com>
Date: Wed, 6 Apr 2011 15:53:22 +0200
Subject: [PATCH] typo fix
---
.../NpgsqlSchemaProvider.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/extras/MonoDevelop.Database/MonoDevelop.Database.Sql.Npgsql/NpgsqlSchemaProvider.cs b/extras/MonoDevelop.Database/MonoDevelop.Database.Sql.Npgsql/NpgsqlSchemaProvider.cs
public interface IAliasProvider {
string GetModelAlias(Type modelType);
string GetPropertyAlias(PropertyInfo propertyInfo);
}
public class DefaultAliasProvider : IAliasProvider
{
public string GetModelAlias(Type modelType)
{
var modelAliasAttr = modelType.FirstAttribute<AliasAttribute>();
@tomaszkubacki
tomaszkubacki / gist:1986287
Created March 6, 2012 13:31
ServiceStack headers
public override void Configure(Container container)
{
SetConfig(new EndpointHostConfig{
GlobalResponseHeaders = {
{ "Access-Control-Allow-Origin", "*" },
{ "Access-Control-Allow-Headers", "Content-Type" },
{ "Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS" },
}
});
@tomaszkubacki
tomaszkubacki / README.md
Created October 6, 2012 11:14
monotouch keyboard editor and combobox enum editor as UITextField exntesions

ios default keyboard editor does not have close button if you need show editor for numeric value or edit enum val code below may be helpful. Just copy and paste to your project.

copy/paste utils file from second file and then this is all you need to display number pad with close button

myTextField.SetKeyboardEditorWithCloseButton(UIKeyboardType.NumberPad); 
public class CorsHeadersFilter implements Filter {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
if (response instanceof HttpServletResponse) {
HttpServletResponse httpServletResponse = (HttpServletResponse) response;
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
httpServletResponse.addHeader("Access-Control-Allow-Origin", "http://127.0.0.1:3030");
httpServletResponse.addHeader("Access-Control-Allow-Credentials", "true");
httpServletResponse.addHeader("Access-Control-Expose-Headers", "true");
@tomaszkubacki
tomaszkubacki / gist:7679223
Created November 27, 2013 17:00
Skype (https://launchpad.net/ubuntu/+source/skype/4.2.0.11-0ubuntu0.12.04.2) configuration file for Ubuntu 13.10 amd64 /usr/share/applications/skype.desktop
[Desktop Entry]
Name=Skype
Comment=Skype Internet Telephony
Exec=env PULSE_LATENCY_MSEC=30 skype %U
Icon=skype.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
MimeType=x-scheme-handler/skype;
@tomaszkubacki
tomaszkubacki / gist:8783531
Created February 3, 2014 13:10
redis_client redis_client_tests.dart error on Linux/64 Redis 2.6.13
unittest-suite-wait-for-done
Uncaught Error: Expected: '16.800000000000001'
Actual: '16.8'
Which: is different. Both strings start the same, but the given value is missing the following trailing characters: 0000000000 ...
Unhandled exception:
Expected: '16.800000000000001'
Actual: '16.8'
Which: is different. Both strings start the same, but the given value is missing the following trailing characters: 0000000000 ...