This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(void)uploadMyNewPictureToWeb { | |
//your web service that's on the lookout for the image | |
NSMutableString *customWebPage = [NSMutableString stringWithString:@"your web service URL would go here"]; | |
NSURL *aUrl = [NSURL URLWithString:customWebPage]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:aUrl]; | |
//this is your POST, PUT, whatever restful protocol you support | |
[request setHTTPMethod:@"POST"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ASP.Net libraries have many useful collection for you, one being files in the request object | |
Dim fileCollection As HttpFileCollection = Request.Files | |
//Code works, but is simplified here for you, meaning you'll want more robust error handling and logging | |
For Each uploadedFileName In fileCollection | |
Dim uploadedFile As HttpPostedFile = fileCollection(uploadedFileName) | |
If Not uploadedFile Is Nothing Then | |
If (uploadedFile.ContentLength > 0) Then | |
//Save it somewhere on the server, whatever path conventions you have | |
//also, this doesn't save it with a file extension, but you could that just the same |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Add a reference in your project to System.Management.Automation in your Visual Studio project | |
2. Front-end code (you can take out all that Jquery stuff) | |
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" | |
CodeBehind="Default.aspx.vb" Inherits="PowerShellApp._Default" %> | |
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> | |
</asp:Content> | |
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> | |
<script src="Scripts/jquery-1.4.1.min.js" language="javascript" type="text/javascript"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Include the code | |
<script src="../Scripts/fullcalendar/fullcalendar.js" type="text/javascript"></script> | |
2. Include a div for your calendar | |
<div id="cal_viewcalendar"></div> | |
3. Setup your calendar | |
$("#cal_viewcalendar").fullCalendar({ | |
theme: true, | |
events: "GetCalendars.aspx", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Formatting HTML that comes back with the return JSON feed. When setting up your calendar object, you can define some methods. | |
eventRender: function (event, element) { | |
element.find('span.fc-event-title').html(element.find('span.fc-event-title').text()); | |
}, | |
2. Changing the border of an event for mouse events. | |
eventMouseover: function (event, element, view) { | |
$(this).css('border', '3px dashed #c70000'); | |
}, | |
eventMouseout: function (event, element, view) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Make something draggable | |
$("#img_myimage").draggable({ | |
zIndex: 999, | |
revert: true, // will cause the event to go back to its | |
revertDuration: 0 // original position after the drag | |
}); | |
2. Make your calendar capable of accepting draggable objects (in the calendar setup) | |
droppable: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Just change the defaultView attribute for the calendar you are rendering | |
$("#cal_viewcalendarweekataglance").fullCalendar({ | |
theme: true, | |
events: "SomeWebPage.aspx", | |
cache: true, | |
height: 160, | |
defaultView: 'basicWeek', | |
eventRender: function (event, element) { | |
element.find('span.fc-event-title').html(element.find('span.fc-event-title').text()); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//and here it is, moving with your mouse | |
<div style="position:fixed;">Move me around</div> | |
It doesn’t need to be much more complicated than that, unless you want to work with non-CSS compliant issues or have concerns about scrolling past other divs etc. But for something simple, this works. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open up /css/bootstrap.css and look for this entry: .navbar-inverse .navbar-inner | |
In that style, change the filter entry from this: | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); | |
to this: | |
filter: none; | |
That should make the navbar look as good in IE as it does already for Chrome, Safari and Firefox. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="/js/vendor/raphael-min.js"></script> | |
<script src="/js/vendor/world.js"></script> | |
<script> | |
Raphael("forworldmap", 1000, 400, function () { | |
var r = this; | |
r.rect(0, 0, 1000, 400, 10).attr({ | |
stroke: "none", | |
fill: "0-#9bb7cb-#adc8da" | |
}); | |
var over = function () { |
OlderNewer