• Got a Tipila, google, windows live or facebook account ?
All Tips
7
votes
If you want to use a http proxy like charles or fiddler on localhost addresses, add a . to localhost like this, http://localhost.:4050/api/
3
votes
Defining the function var $var = (function(){return 1 + 2;})(); Accessing the variable window.alert($var); // 3
3
votes
Here's how to create CSS3 buttons with gradients which are cross browser compatible. Just like the ones in gmail and you tube. Note - Rounded corners does not work with gradients in IE. So rounded corners are not used for IE. .button { color: #666; border: 1px solid #ccc; -moz-border-radius: 3px; -webkit-border-radius: ...
2
votes
The mxmlc cannot work with the 64bit JRE. So you need to install the 32bit jre and set the path in the flex_home/jvm.config as below. java.home=C:/Progra~2/Java/jre7 Note that the slashes in the path are forward slashes (/)!!! not back, and progra~2 means program files x86
1
votes
When visiting a url like http://localhost:4050/api/tips/c%23/meta wcf webhttp service returns http 405 method not allowed. This happens only in casini and it works perfectly in IIS 7
1
votes
When there is a + sign in the path section url, the IIS 7 sends an HTTP 404 error. ex: tipila.com/tips/a+b Add the following to resolve the issue, to root web.config <system.webServer> <security> <requestFiltering allowDoubleEscaping="true" /> </security> </system.webserver> Note however replacing space with a + sign i ...
1
votes
Ex. If 540 degrees need to be clamped between -360 to 360 => ClampAngle(540, 360) Similarly if you want to clamp -75 between -180 to 180 => ClampAngle(-75,180) fn ClampAngle(angle, betweenAngle){ return angle%betweenAngle; }
1
votes
IF you use facebook to log in to a webpage, the return url has # appended to it. This is a bug with the facebook and add the following javascript inside the head tag of the web page remove it. <script type="text/javascript"> if (window.location.hash == '#_=_') window.location.hash = '';</script>
1
votes
You need to set the Access-Control-Allow-Origin http header to allow cross domain calls. Add the following to your sites root web.config <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="content-type" /> </customHeaders ...
1
votes
If you're getting the Origin xxx is not allowed by Access-Control-Allow-Origin. error in chrome, although you've set the Access-Control-Allow-Origin http header, do the following to disable web security. In run type the following to start chrome without web security chrome.exe --disable-web-security Now chrome should h ...
1
votes
This is how to update a column of a table to be the group-by-count of rows, in another table. User table has a field called postcount which represents the number of posts that a user has made. And the Tip table has all the posts. So we are going to get the number of posts that a user has made from the Tip table and set ...
1
votes
Use the title html attribute <div title="advanced options"></div>
1
votes
Not suited for all situations, but this is the most efficient, super fast flip flop mechanism. array = [yellow, red] // alternative colors len = 2 // length of array loop from 1 to n print array[i%len] // alternate through the colors end loop
1
votes
Add 2 spaces to the beginning of each line to trick outlook not to remove line breaks in plain text emails. More info here
1
votes
Use the following code to get the current time zone in the GMT + XX:XX format zone gives the time zone string zone = string.Empty; if (TimeZoneInfo.Local.BaseUtcOffset.TotalMinutes == 0) zone = " GMT"; else if (TimeZoneInfo.Local.BaseUtcOffset.TotalMinutes > 0) zone = " GMT + " + Math.Abs(TimeZoneInfo.Local.BaseUtcOffs ...
1
votes
Use following methods to read a text file in c# 1. using (StreamReader sr = File.OpenText(FILE_NAME)) { String input; while ((input = sr.ReadLine()) != null) { Console.WriteLine(input); } Console.WriteLine ("The end of the stream has been reached."); } 2 string text = System.IO.File.ReadAllText(@"C:\Users\Public\TestFo ...
1
votes
This is how to check a column exists in tsql if Exists(select * from sys.columns where Name = N'columnName' and Object_ID = Object_ID(N'tableName')) begin -- your code end
1
votes
ASP.NET forms authentication ticket becomes invalid if the application pool recycles. The reason is the machine key is used in the encryption and in the default configuration, a new key is generated when the app pool is restarted. So we need to specify a static machine key. This is how to do it. Add the following to sy ...
1
votes
This happened to tipila on EC2 because the url redirect module was not installed. Install it from http://www.iis.net/download/URLRewrite
1
votes
If you want to configure a site other than the "Default Web Site" to work with the localhost address, add a binding to that site with http, port 80 and without a host name.
Login to Tipila