Search Results

Search found 5011 results on 201 pages for 'grand master t'.

Page 93/201 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • Problem with copying local data onto HDFS on a Hadoop cluster using Amazon EC2/ S3.

    - by Deepak Konidena
    Hi, I have setup a Hadoop cluster containing 5 nodes on Amazon EC2. Now, when i login into the Master node and submit the following command bin/hadoop jar <program>.jar <arg1> <arg2> <path/to/input/file/on/S3> It throws the following errors (not at the same time.) The first error is thrown when i don't replace the slashes with '%2F' and the second is thrown when i replace them with '%2F': 1) Java.lang.IllegalArgumentException: Invalid hostname in URI S3://<ID>:<SECRETKEY>@<BUCKET>/<path-to-inputfile> 2) org.apache.hadoop.fs.S3.S3Exception: org.jets3t.service.S3ServiceException: S3 PUT failed for '/' XML Error Message: The request signature we calculated does not match the signature you provided. check your key and signing method. Note: 1)when i submitted jps to see what tasks were running on the Master, it just showed 1116 NameNode 1699 Jps 1180 JobTracker leaving DataNode and TaskTracker. 2)My Secret key contains two '/' (forward slashes). And i replace them with '%2F' in the S3 URI. PS: The program runs fine on EC2 when run on a single node. Its only when i launch a cluster, i run into issues related to copying data to/from S3 from/to HDFS. And, what does distcp do? Do i need to distribute the data even after i copy the data from S3 to HDFS?(I thought, HDFS took care of that internally) IF you could direct me to a link that explains running Map/reduce programs on a hadoop cluster using Amazon EC2/S3. That would be great. Regards, Deepak.

    Read the article

  • Trying to find USB device on iphone with IOKit.framework

    - by HuGeek
    Hi all, i'm working on a project were i need the usb port to communicate with a external device. I have been looking for exemple on the net (Apple and /developer/IOKit/usb exemple) and trying some other but i can't even find the device. In my code i blocking at the place where the fucntion looks for a next iterator (pointer in fact) with the function getNextIterator but never returns a good value so the code is blocking. By the way i am using toolchain and added IOKit.framework in my project. All i what right now is the communicate or do like a ping to someone on the USB bus!! I blocking in the 'FindDevice'....i can't manage to enter in the while because the variable usbDevice is always = to 0....i have tested my code in a small mac program and it works... Thanks Here is my code : IOReturn ConfigureDevice(IOUSBDeviceInterface **dev) { UInt8 numConfig; IOReturn result; IOUSBConfigurationDescriptorPtr configDesc; //Get the number of configurations result = (*dev)->GetNumberOfConfigurations(dev, &numConfig); if (!numConfig) { return -1; } // Get the configuration descriptor result = (*dev)->GetConfigurationDescriptorPtr(dev, 0, &configDesc); if (result) { NSLog(@"Couldn't get configuration descriptior for index %d (err=%08x)\n", 0, result); return -1; } ifdef OSX_DEBUG NSLog(@"Number of Configurations: %d\n", numConfig); endif // Configure the device result = (*dev)->SetConfiguration(dev, configDesc->bConfigurationValue); if (result) { NSLog(@"Unable to set configuration to value %d (err=%08x)\n", 0, result); return -1; } return kIOReturnSuccess; } IOReturn FindInterfaces(IOUSBDeviceInterface *dev, IOUSBInterfaceInterface **itf) { IOReturn kr; IOUSBFindInterfaceRequest request; io_iterator_t iterator; io_service_t usbInterface; IOUSBInterfaceInterface **intf = NULL; IOCFPlugInInterface **plugInInterface = NULL; HRESULT res; SInt32 score; UInt8 intfClass; UInt8 intfSubClass; UInt8 intfNumEndpoints; int pipeRef; CFRunLoopSourceRef runLoopSource; NSLog(@"Debut FindInterfaces \n"); request.bInterfaceClass = kIOUSBFindInterfaceDontCare; request.bInterfaceSubClass = kIOUSBFindInterfaceDontCare; request.bInterfaceProtocol = kIOUSBFindInterfaceDontCare; request.bAlternateSetting = kIOUSBFindInterfaceDontCare; kr = (*dev)->CreateInterfaceIterator(dev, &request, &iterator); usbInterface = IOIteratorNext(iterator); IOObjectRelease(iterator); NSLog(@"Interface found.\n"); kr = IOCreatePlugInInterfaceForService(usbInterface, kIOUSBInterfaceUserClientTypeID, kIOCFPlugInInterfaceID, &plugInInterface, &score); kr = IOObjectRelease(usbInterface); // done with the usbInterface object now that I have the plugin if ((kIOReturnSuccess != kr) || !plugInInterface) { NSLog(@"unable to create a plugin (%08x)\n", kr); return -1; } // I have the interface plugin. I need the interface interface res = (*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID), (LPVOID*) &intf); (*plugInInterface)->Release(plugInInterface); // done with this if (res || !intf) { NSLog(@"couldn't create an IOUSBInterfaceInterface (%08x)\n", (int) res); return -1; } // Now open the interface. This will cause the pipes to be instantiated that are // associated with the endpoints defined in the interface descriptor. kr = (*intf)->USBInterfaceOpen(intf); if (kIOReturnSuccess != kr) { NSLog(@"unable to open interface (%08x)\n", kr); (void) (*intf)->Release(intf); return -1; } kr = (*intf)->CreateInterfaceAsyncEventSource(intf, &runLoopSource); if (kIOReturnSuccess != kr) { NSLog(@"unable to create async event source (%08x)\n", kr); (void) (*intf)->USBInterfaceClose(intf); (void) (*intf)->Release(intf); return -1; } CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopDefaultMode); if (!intf) { NSLog(@"Interface is NULL!\n"); } else { *itf = intf; } NSLog(@"End of FindInterface \n \n"); return kr; } unsigned int FindDevice(void *refCon, io_iterator_t iterator) { kern_return_t kr; io_service_t usbDevice; IOCFPlugInInterface **plugInInterface = NULL; HRESULT result; SInt32 score; UInt16 vendor; UInt16 product; UInt16 release; unsigned int count = 0; NSLog(@"Searching Device....\n"); while (usbDevice = IOIteratorNext(iterator)) { // create intermediate plug-in NSLog(@"Found a device!\n"); kr = IOCreatePlugInInterfaceForService(usbDevice, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugInInterface, &score); kr = IOObjectRelease(usbDevice); if ((kIOReturnSuccess != kr) || !plugInInterface) { NSLog(@"Unable to create a plug-in (%08x)\n", kr); continue; } // Now create the device interface result = (*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID)&dev); // Don't need intermediate Plug-In Interface (*plugInInterface)->Release(plugInInterface); if (result || !dev) { NSLog(@"Couldn't create a device interface (%08x)\n", (int)result); continue; } // check these values for confirmation kr = (*dev)->GetDeviceVendor(dev, &vendor); kr = (*dev)->GetDeviceProduct(dev, &product); //kr = (*dev)->GetDeviceReleaseNumber(dev, &release); //if ((vendor != LegoUSBVendorID) || (product != LegoUSBProductID) || (release != LegoUSBRelease)) { if ((vendor != LegoUSBVendorID) || (product != LegoUSBProductID)) { NSLog(@"Found unwanted device (vendor = %d != %d, product = %d != %d, release = %d)\n", vendor, kUSBVendorID, product, LegoUSBProductID, release); (void) (*dev)-Release(dev); continue; } // Open the device to change its state kr = (*dev)->USBDeviceOpen(dev); if (kr == kIOReturnSuccess) { count++; } else { NSLog(@"Unable to open device: %08x\n", kr); (void) (*dev)->Release(dev); continue; } // Configure device kr = ConfigureDevice(dev); if (kr != kIOReturnSuccess) { NSLog(@"Unable to configure device: %08x\n", kr); (void) (*dev)->USBDeviceClose(dev); (void) (*dev)->Release(dev); continue; } break; } return count; } // USB rcx Init IOUSBInterfaceInterface** osx_usb_rcx_init (void) { CFMutableDictionaryRef matchingDict; kern_return_t result; IOUSBInterfaceInterface **intf = NULL; unsigned int device_count = 0; // Create master handler result = IOMasterPort(MACH_PORT_NULL, &gMasterPort); if (result || !gMasterPort) { NSLog(@"ERR: Couldn't create master I/O Kit port(%08x)\n", result); return NULL; } else { NSLog(@"Created Master Port.\n"); NSLog(@"Master port 0x:08X \n \n", gMasterPort); } // Set up the matching dictionary for class IOUSBDevice and its subclasses matchingDict = IOServiceMatching(kIOUSBDeviceClassName); if (!matchingDict) { NSLog(@"Couldn't create a USB matching dictionary \n"); mach_port_deallocate(mach_task_self(), gMasterPort); return NULL; } else { NSLog(@"USB matching dictionary : %08X \n", matchingDict); } CFDictionarySetValue(matchingDict, CFSTR(kUSBVendorID), CFNumberCreate(kCFAllocatorDefault, kCFNumberShortType, &LegoUSBVendorID)); CFDictionarySetValue(matchingDict, CFSTR(kUSBProductID), CFNumberCreate(kCFAllocatorDefault, kCFNumberShortType, &LegoUSBProductID)); result = IOServiceGetMatchingServices(gMasterPort, matchingDict, &gRawAddedIter); matchingDict = 0; // this was consumed by the above call // Iterate over matching devices to access already present devices NSLog(@"RawAddedIter : 0x:%08X \n", &gRawAddedIter); device_count = FindDevice(NULL, gRawAddedIter); if (device_count == 1) { result = FindInterfaces(dev, &intf); if (kIOReturnSuccess != result) { NSLog(@"unable to find interfaces on device: %08x\n", result); (*dev)-USBDeviceClose(dev); (*dev)-Release(dev); return NULL; } // osx_usb_rcx_wakeup(intf); return intf; } else if (device_count 1) { NSLog(@"too many matching devices (%d) !\n", device_count); } else { NSLog(@"no matching devices found\n"); } return NULL; } int main(int argc, char *argv[]) { int returnCode; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Debut du programme \n \n"); osx_usb_rcx_init(); NSLog(@"Fin du programme \n \n"); return 0; // returnCode = UIApplicationMain(argc, argv, @"Untitled1App", @"Untitled1App"); // [pool release]; // return returnCode; }

    Read the article

  • using jquery in asp.net to hide div tag

    - by Eyla
    Greetings, I have asp.net check box control and asp.net dropdownlist control inside div tag. I want to hid the div when I check the box and unhide it when I unchecked the box. I tried few ways with jquery but I could not do it. Here is my code please look at it and tell me what is wrong with it. <%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="IMAM_APPLICATION.WebForm1" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <script src="js/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script type="text/javascript"> function ModifyOccup() { $('myOccup').removeClass('display1'); $('myOccup').removeClass('display1'); $('myOccup').removeClass('display'); $('myOccup').removeClass('display'); if ($('#<%=chkOccup.ClientID %>').is(':checked')) { $('myOccup').addClass('display1'); } else { $('myOccup').addClass('display'); } } </script> <asp:CheckBox ID="chkOccup" runat="server" Style="top: 1055px; left: 355px; position: absolute; height: 22px; width: 126px" Text="Check to modify" onclick=" ModifyOccup()"/> <div id ="myOccup" > <asp:DropDownList ID="cmbWorkField" runat="server" Style="top: 1090px; left: 350px; position: absolute; height: 22px; width: 126px"> </asp:DropDownList> </div> </asp:Content> ...................... Style.css File .......................... .display { display: none; } .display1 { display: inherit; }

    Read the article

  • Using embedded standard HTML forms with ASP.NET

    - by RM
    I have a standard aspx page with which I need to add another standard HTML form into and have it submit to another location (external site), however whenever I press the submit button the page seems to do a post back rather than using the sub-forms action url. A mock up of what the form relationships is below. Note in the real deployment the form will be part of a content area of a master page layout, so the form needs to submit independantly from the master page form. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <form id="subscribe_form" method="post" action="https://someothersite.com" name="em_subscribe_form" > <input type="text" id="field1" name="field1" /> <input id="submitsubform" type="submit" value="Submit" /> </form> </div> </form> </body> </html>

    Read the article

  • Error Message, "The Controls collection cannot be modified because the control contains code blocks"

    - by Gogster
    I'm receiving this error on a page that previously worked fine, in fact the only change I've made to the page recently was to add another asp:TextBox and asp:RequiredFieldValidator control. The page already had numerous ASP.NET controls on it, so I cannot see why these extra controls would make a difference, anyway I shall post the code below and hopefully you can see what the error is: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MeetingGenerator.ascx.cs" Inherits="usercontrols_MeetingGenerator" %> <%@ Register TagPrefix="cc1" Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" %> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <div style="width:498px;height:425px;background-color:#033b2a;text-align:center;padding-top:20px;"> <asp:Label ID="lblDone" CssClass="done" runat="server"></asp:Label> <asp:Panel id="pnlAddReport" runat="server"> <div> <img src="../images/banners/add-meeting.png" alt="Add Report" /> </div> <p> <asp:ValidationSummary ID="ValidationSummary" CssClass="validationsummary" runat="server" /> <asp:TextBox ID="txtTitle" BorderStyle="None" CssClass="watermark" Width="250px" Height="22px" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" TargetControlID="txtTitle" WatermarkCssClass="watermark" WatermarkText=" Meeting title" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="rfvTitle" ControlToValidate="txtTitle" Text="" ErrorMessage="Please enter the title" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvTitle1" ControlToValidate="txtTitle" Text="" ErrorMessage="Please enter the title" Display="None" InitialValue=" Meeting title" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:TextBox ID="txtDate" BorderStyle="None" CssClass="watermark" Width="250px" Height="22px" runat="server"></asp:TextBox> <cc1:CalendarExtender ID="ceDate" TargetControlID="txtDate" Format="dd/MM/yyyy" runat="server"> </cc1:CalendarExtender> <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" TargetControlID="txtDate" WatermarkCssClass="watermark" WatermarkText=" Meeting Date" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="rfvDate" ControlToValidate="txtDate" Text="" ErrorMessage="Please select the meeting date" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvDate1" ControlToValidate="txtDate" Text="" ErrorMessage="Please select the meeting date" Display="None" InitialValue=" Meeting Date" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:TextBox ID="txtMeetingTime" BorderStyle="None" Width="250px" Height="22px" MaxLength="5" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="tweMeetingTime" TargetControlID="txtMeetingTime" WatermarkCssClass="watermark" WatermarkText=" Time (HH:MM)" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtMeetingTime" Text="" ErrorMessage="Please enter the meeting time" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator11" ControlToValidate="txtMeetingTime" Text="" ErrorMessage="Please enter the meeting time" Display="None" InitialValue=" Time (HH:MM)" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:TextBox ID="txtLocation" BorderStyle="None" CssClass="watermark" Width="250px" Height="22px" runat="server"></asp:TextBox> <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" TargetControlID="txtLocation" WatermarkCssClass="watermark" WatermarkText=" Location" runat="server"></cc1:TextBoxWatermarkExtender> <asp:RequiredFieldValidator ID="rfvLocation" ControlToValidate="txtLocation" Text="" ErrorMessage="Please enter the location" Display="None" InitialValue="" runat="server"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvLocation1" ControlToValidate="txtLocation" Text="" ErrorMessage="Please enter the location" Display="None" InitialValue=" Location" runat="server"></asp:RequiredFieldValidator> </p> <p> <asp:ImageButton ID="btnAddMeeting" ImageUrl="/images/buttons/addmeeting-btn.gif" runat="server" OnClick="btnAddMeeting_Click" /> </p> <p> </p> </asp:Panel> </div> <%@ Master Language="C#" MasterPageFile="/masterpages/Master.master" AutoEventWireup="true" %> <asp:content ContentPlaceHolderId="additionalhead" runat="server"> </asp:content> <asp:content ContentPlaceHolderId="additionalbody" runat="server"> <umbraco:Macro Alias="AddMeeting" runat="server"></umbraco:Macro> </asp:content> <asp:content ContentPlaceHolderId="bodyContent" runat="server"> </asp:content> <%@ Master Language="C#" AutoEventWireup="true" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><umbraco:Item field="title" runat="server"></umbraco:Item></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> <script type="text/javascript" src="/js/jQueryString-2.0.2-Min.js"></script> <link rel="stylesheet" type="text/css" href="/css/Styles.css" /> <link rel="stylesheet" type="text/css" href="/css/Layout.css" /> <link rel="stylesheet" type="text/css" href="/css/Forms.css" /> <script type="text/javascript" language="javascript"> $(document).ready(function () { $('#uploadAgenda').hide(); $('#uploadMinutes').hide(); $('#<%=txtSearchEAA.ClientID%>').val('Search EAA'); var st = $.getQueryString({ ID:"search" }); if (st != '') { $('#<%=txtSearchEAA.ClientID%>').val(st); }; $('#<%=txtSearchEAA.ClientID%>').click(function() { $('#<%=txtSearchEAA.ClientID%>').val(''); }); }); </script> <script type="text/C#" runat="server"> protected void btnSearch_Click(object sender, EventArgs e) { Response.Redirect("/members/search-results?search=" + txtSearchEAA.Text); } </script> <asp:ContentPlaceHolder id="additionalhead" runat="server"></asp:ContentPlaceHolder> <umbraco:Item field="AdditionalHead" runat="server"></umbraco:Item> </head> <body style="background-color:#e5e5e5;"> <script runat="server"> protected void btnLogout_Click(object sender, EventArgs e) { FormsAuthentication.SignOut(); Response.Redirect("/login"); } </script> <form id="form1" runat="server"> <asp:ContentPlaceHolder id="additionalbody" runat="server"></asp:ContentPlaceHolder> <div class="wrapper"> <div class="content"> <div class="banner"> <div class="bannerSearchSpacer"> <a href="/home"><h1><span>EAA</span></h1></a> </div> <div class="aboutEAA"> &nbsp; </div> <div class="bannerSearchAligns"> <div class="searchbox"> <asp:TextBox ID="txtSearchEAA" CssClass="watermark" Width="155px" runat="server"></asp:TextBox> </div> <div class="searchButton"> <asp:ImageButton ID="imbSearch" ImageUrl="/images/buttons/go.gif" OnClick="btnSearch_Click" runat="server" /> </div> <div style="clear:both;"></div> </div> <div class="loginBox"> <dl> <dt>Hello</dt> <dd><umbraco:Macro Alias="MemberName" runat="server"></umbraco:Macro></dd> <dt>Arena</dt> <dd><umbraco:Macro Alias="MemberArena" runat="server"></umbraco:Macro></dd> </dl> <div><asp:ImageButton ID="btnLogout" ImageUrl="/images/buttons/logout.gif" runat="server" OnClick="btnLogout_Click" /></div> </div> <div style="clear:both;"></div> </div> <div id="contentarea"> <div class="menuLeft"> <div class="menuPlaceholder"> <umbraco:Macro Alias="DynamicMenu" runat="server"></umbraco:Macro> </div> </div> <div class="mainBody"> <asp:ContentPlaceHolder id="bodyContent" runat="server"></asp:ContentPlaceHolder> </div> <div style="clear:both;"></div> </div> </div> </div> </form> <umbraco:Macro Alias="MemberAnalytics" runat="server"></umbraco:Macro> </body> </html>

    Read the article

  • Monotouch.dialog and story board apps?

    - by Robin Diederen
    I'm trying to use mt.d; I've "drawn" an app using the storyboard feature of Xcode. My app consists of a tabbar which displays one of three viewcontrollers. Two out of three are simple viewcontrollers (single screens) and one is a splitviewcontroller. The splitview is tricky; using the stock xcode components I've drawn a master / table and a detail view. The table works as expected, but now I want to use mt.d to fill the detailview (later I need it to depend on the selection of the master, but not for now). I've subclassed the splitviewcontroller; in the viewdidload event I've created a mt.d dialogviewcontroller. Now I'm trying to push the dialogviewcontroller to the detailview, using the splitviewcontroller.viewcontrollers array. Doesn't seem to work; when running the app it still some an empty screen for the detail view (as drawn in xcode). Any clues for doing what I want? Thanx!

    Read the article

  • Using git pull to track a remote branch without merging

    - by J Barlow
    I am using git to track content which is changed by some people and shared "read-only" with others. The "readers" may from time to time need to make a change, but mostly they will not. I want to allow for the git "writers" to rebase pushed branches** if need be, and ensure that the "readers" never accidentally get a merge. That's normally easy enough. git pull origin +master There's one case that seems to cause problems. If a reader makes a local change, the command above will merge. I want pull to be fully automatic if the reader has not made local changes, while if they have made local changes, it should stop and ask for input. I want to track any upstream changes while being careful about merging downstream changes. In a way, I don't really want to pull. I want to track the master branch exactly. ** (I know this is not a best practice, but it seems necessary in our case: we have one main branch that contains most of the work and some topic branches for specific customers with minor changes that need to be isolated. It seems easiest to frequently rebase to keep the topics up to date.)

    Read the article

  • Adding StyleSheets Programmatically in Asp.Net

    - by Braveyard
    I want to add StyleSheets programmatically in the head section but one of the examples I saw seemed to need to many lines of code to add just one style sheet even though I may need a lot: Example Code: HtmlLink css = new HtmlLink(); css.Href = "css/fancyforms.css"; css.Attributes["rel"] = "stylesheet"; css.Attributes["type"] = "text/css"; css.Attributes["media"] = "all"; Page.Header.Controls.Add(css); I also use Page.Header.RenderControl() method but it didn't work either. Object null something error was thrown. I also used Page.Header.InnerHtml and InnerText += "<link .... "/> things but they threw the Literal error which is I think common error. I used this code : List<Literal> cssFiles = new List<Literal>(); cssFiles.Add(new Literal() { Text = @"<link href=""" + ResolveUrl("~/Resources/Styles/MainMaster/MainDesign.css") + @""" type=""text/css"" rel=""stylesheet"" />" }); cssFiles.Add(new Literal() { Text = @"<link href=""" + ResolveUrl("~/Resources/Styles/MainMaster/MainLayout.css") + @""" type=""text/css"" rel=""stylesheet"" />" }); AddStyleRange(cssFiles); private void AddStyleRange(List<Literal> cssFiles) { foreach (Literal item in cssFiles) { this.Header.Controls.Add(item); } } It worked at first but when I change the pages it stopped working. I am using Master Page and I am writing these codes on Master.cs file and also some people recommended to use this.Header instead of Page.Header but when I built it throws an error which says I cannot declare that like this. It shouldn't be that hard to add many styles. It is getting complicated.

    Read the article

  • JQuery idleTimeout plugin: How to display the dialog after the session is timedout on ASP.NET MVC Pa

    - by Rita
    Hi I am working on migrating the ASP.NET apllication to MVC Framework. I have implemented session timeout for InActiveUser using JQuery idleTimeout plugin. I have set idletime for 30 min as below in my Master Page. So that After the user session is timedout of 30 Min, an Auto Logout dialog shows for couple of seconds and says that "You are about to be signed out due to Inactivity" Now after this once the user is logged out and redirected to Home Page. Here i again want to show a Dialog and should stay there saying "You are Logged out" until the user clicks on it. Here is my code in Master page: $(document).ready(function() { var SEC = 1000; var MIN = 60 * SEC; // http://philpalmieri.com/2009/09/jquery-session-auto-timeout-with-prompt/ <% if(HttpContext.Current.User.Identity.IsAuthenticated) {%> $(document).idleTimeout({ inactivity: 30 * MIN, noconfirm : 30 * SEC, redirect_url: '/Account/Logout', sessionAlive: 0, // 30000, //10 Minutes click_reset: true, alive_url: '', logout_url: '' }); <%} %> } Logout() Method in Account Controller: public virtual ActionResult Logout() { FormsAuthentication.SignOut(); return RedirectToAction(MVC.Home.Default()); } Appreciate your responses.

    Read the article

  • OpenPeak Flash app XMLSocket Security Problem

    - by Kira
    We're trying to create an app for OpenPeak. The Flash app will act as a client to a Java server on another computer on another domain. The Flash app client connects via XMLSocket. The Java Server uses ServerSocket to receive a request and send back a message. In order to trust the server, the Flash client needs a socket master policy file to tell it that the server comes from a trustworthy domain. According to an article on Adobe, when a connection has succeeded, the Flash client automatically requests the cross-domain policy or socket master policy file on port 843. Still, even when we implement it according to the tutorials and recommendations we have read, the Flash client continues to throw the following security error: SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048" We've tried logging the policy file request during testing to see if there was any call made to port 843. There was not. Interestingly, even without a policy file, the Flash client still manages to send the first data message to the server successfully. It's just when the server tries to send back a reply that the entire thing hangs for about 10 seconds before the security error above is displayed. Any ideas / suggestions?

    Read the article

  • Yet Another crosdomain.xml question or: "How to interpret documentation correctly"

    - by cboese
    Hi! I have read a lot about the new policy-policy of flash player and also know the master policy file. Now image the following situation: There are two servers with services (http) running at custom ports servera.com:2222/websiteA serverb.com:3333/websiteB Now I open a swf from server a (eg. servera.com:2222/websiteA/A.swf) that wants to access the service of serverb. Of course I need a crossdomain.xml at the right place and there are multiple variations possible. I dont want to use a master policy file, as I might not have control over the root of both servers. One solution I found works with the following crossdomain: <?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain="*"/> </cross-domain-policy> served at serverb.com:3333/websiteB/crossdomain.xml So now for my question: Is it possible to get rid of the "*" and use a proper (not as general as *) domainname in the allow-access-from rule? All my attempts failed, and from what I understand it should be possible.

    Read the article

  • More than 100 connection to sql server 2008 in "sleeping" status - Solved

    - by Allende
    I have a big trouble here, well at my server. I have an ASP .net web (framework 4.x) running on muy server, all the transactions/select/update/insert are made with ADO.NET. Well my problem is that after being using for a while (a couple of updates/selects/inserts) sometimes I got more than 100 connections on "sleeping" status when check for the connections on sql server with this query: SELECT spid, a.status, hostname, program_name, cmd, cpu, physical_io, blocked, b.name, loginame FROM master.dbo.sysprocesses a INNER JOIN master.dbo.sysdatabases b ON a.dbid = b.dbid where program_name like '%TMS%' ORDER BY spid I've been checking my code and closing every time I make a connection, I'm gonna test the new class, but I'm afraid the problem doesn't be fixed. It suppose that the connection pooling, keep the connections to re-use them, but until I see don't re-use them always. Any idea besides check for close all the connections open after use them? SOLVED(now I have just one and beautiful connection on "sleeping" status): Besides the anwser of David Stratton, I would like to share this link that help explain really well how the connection pool it works: http://dinesql.blogspot.com/2010/07/sql-server-sleeping-status-and.html Just to be short, you need to close every connection (sql connection objects) in order that the connection pool can re-use the connection and use the same connectinos string, to ensure this is highly recommended use one of the webConfig. Be careful with dataReaders you sould close its connection to (that was what make got out of my mind for while).

    Read the article

  • Show cue banner for wpf ComboBox with grouping

    - by Adam Duston
    I have a ComboBox in my WPF form: <ComboBox Margin="75,0,15,102" Name="videoFormatCombo" Height="23" VerticalAlignment="Bottom" DataContext="{StaticResource GroupedVideoFormats}" ItemsSource="{Binding}" ItemTemplate="{StaticResource VideoFormatTemplate}"> <ComboBox.GroupStyle> <GroupStyle HeaderTemplate="{StaticResource GroupHeader}"/> </ComboBox.GroupStyle> </ComboBox> As you might be able to guess, GroupedVideoFormats is a CollectionViewSource with grouping. I need to get a cue banner to display for this ComboBox. I've attempted the solution that is (very verbosely) outlined in this blog post, but it will not work for a ComboBox with grouped data. The two solutions outlined in superfluousprefixhttp://stackoverflow.com/questions/2548757/how-can-the-blank-space-in-a-c-combobox-be-filled-as-a-hint-for-the-user are for Windows Forms ComboBoxes only, and won't work with WPF. If it would help to see all the original source, this particular form is on github: superfluousprefixhttp://github.com/8planes/mirovideoconverter/blob/master/MSWindows/Windows/FileSelect.xaml . It's an open-source project, so the entire project is on github: superfluousprefixhttp://github.com/8planes/mirovideoconverter/tree/master/MSWindows . Thank you for any advice! Adam P.S. stackoverflow wouldn't let me make more than one anchor tag in my post, hence the long urls with the superfluous prefix. Sorry!

    Read the article

  • Generate jpeg compressed Tiff using RGB colorspace (using Java + JAI)

    - by nOiSe gaTe
    I'm trying to make tiled pyramidal tiffs from master tiff images using Java (JAI 1.1.3 + imageIO). The problem is: I NEED to make tiff files compressed in jpeg with RGB photometric interpretation and no matter what I try, the image still faces YCbCr photometric interpretation. Note: if I change compression type (eg. LZW or Deflate) I can get RGB colorspace but, as I said, I need jpeg compression. Except this detail the tiled PTiff I create it's ok, so I think it's better to focus the attention on simple compression step (uncompressed tiff -- jpeg tiff) this may be a basic example (removing any check to make it more readable) // reading MASTER BufferedImage img = ImageIO.read(uncompressedTiff); ImageOutputStream ios=null; ImageWriter writer=null; ios = ImageIO.createImageOutputStream(outFile); Iterator <ImageWriter> writers = ImageIO.getImageWritersByFormatName("tiff"); writer = writers.next(); // saving and compression params writer.setOutput(ios); ImageWriteParam param = writer.getDefaultWriteParam(); param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); param.setCompressionType("JPEG"); param.setCompressionQuality(0.8f); param.setTilingMode(ImageWriteParam.MODE_EXPLICIT); param.setTiling(256, 256, 0, 0); IIOMetadata metadata = getWriteMD(writer, param); // writing writer.write(metadata, new IIOImage(img, null, metadata), param); in getWriteMD method: .... TIFFTag photoInterp = base.getTag(BaselineTIFFTagSet.TAG_PHOTOMETRIC_INTERPRETATION); TIFFField fieldPhotoInter = new TIFFField(photoInterp, BaselineTIFFTagSet.PHOTOMETRIC_INTERPRETATION_RGB); .... here is the full version of getWriteMD()

    Read the article

  • How to build a ~500 page Flash site

    - by philwilks
    I am about to embark on building a Flash site with approximately 500 pages. The site is an interactive learning type of system, with about 10 "chapters" each containing around 50 "pages". Each page has some sort of animation and interactivity, for example the user might have to decide whether a statement is true or false by clicking on one of two buttons, and then an appropriate response is displayed. The user can jump backwards and forwards between pages as they wish. As far as I know, these are some of my options... A) Build the entire site as a single Flash file with no external content. B) Build each of the 10 chapters as a separate Flash file, and then have a master Flash file which loads in the chapters. Each page would then be a separate movie clip within the chapter file. C) Build each indevidual page as a separate Flash file, and then have master Flash file which loads these in. At the moment I'm thinking that option B would be best, and I'd be very grateful for your thoughts on this! Of course, there are probably other options that I haven't thought of.

    Read the article

  • What is the 'page lifecycle' of an ASP.NET MVC page, compared to ASP.NET WebForms?

    - by Simon
    What is the 'page lifecycle' of an ASP.NET MVC page, compared to ASP.NET WebForms? I'm tryin to better understand this 'simple' question in order to determine whether or not existing pages I have in a (very) simple site can be easily converted from ASP.NET WebForms. Either a 'conversion' of the process below, or an alternative lifecycle would be what I'm looking for. What I'm currently doing: (yes i know that anyone capable of answering my question already knows all this -- i'm just tryin to get a comparison of the 'lifecycle' so i thought i'd start by filling in what we already all know) Rendering the page: I have a master page which contains my basic template I have content pages that give me named regions from the master page into which I put content. In an event handler for each content page I load data from the database (mostly read-only). I bind this data to ASP.NET controls representing grids, dropdowns or repeaters. This data all 'lives' inside the HTML generated. Some of it gets into ViewState (but I wont go into that too much!) I set properties or bind data to certain items like Image or TextBox controls on the page. The page gets sent to the client rendered as non-reusable HTML. I try to avoid using ViewState other than what the page needs as a minimum. Client side (not using ASP.NET AJAX): I may use JQuery and some nasty tricks to find controls on the page and perform operations on them. If the user selects from a dropdown -- a postback is generated which triggers a C# event in my codebehind. This event may go to the database, but whatever it does a completely newly generated HTML page ends up getting sent back to the client. I may use Page.Session to store key value pairs I need to reuse later So with MVC how does this 'lifecycle' change?

    Read the article

  • app burns numbers into iPad screens, how can I prevent this?

    - by Andrew Johnson
    EDIT: My code for this is actually open source, if anyone would be able to look and comment. Things I can think of that might be an issue: using a custom font, using bright green, updating the label too fast? The repo is: https://github.com/andrewljohnson/StopWatch-of-Gaia The class for the time label: https://github.com/andrewljohnson/StopWatch-of-Gaia/blob/master/src/SWPTimeLabel.m The class that runs the timer to update the label: https://github.com/andrewljohnson/StopWatch-of-Gaia/blob/master/src/SWPViewController.m ============= My StopWatch app reportedly screen burns a number of iPads, for temporary periods. Does anyone have a suggestion about how I might prevent this screen persistence? Some known workaround to blank the pixels occasionally? I get emails all the time about it, and you can see numerous reviews here: http://itunes.apple.com/us/app/stopwatch+-timer-for-gym-kitchen/id518178439?mt=8 Apple can not advise me. I sent an email to appreview, and I was told to file a technical support request (DTS). When I filled the DTS, they told me it was not a code issue, and when I further asked for help from DTS, a "senior manager" told me that this was not an issue Apple knew about. He further advised me to file a bug with the Apple Radar bug tracker if I considered it to be a real issue. I filed the Radar bug a few weeks ago, but it has not been acknowledged. Updated radar link for Apple employees, per commenter's notes rdar://12173447

    Read the article

  • Autocompleting \cite{} with emacs + auctex gives "cite: no such database entry"

    - by Alejandro Weinstein
    Hi: I am running Emacs 23.1.1 and AucTeX 11.85 in an Ubuntu 8.10 machine. After opening a tex file, the first time I try to use the autocompletion of the \cite{} command, I get "cite: info not available, use `C-c &' to get it." in the minibuffer. After doing the 'C-c &', I get "byte-code: No BibTeX entry with citation key". Subsequent calls to \cite gives me the message "cite: no such database entry" . I have a \bibliography{library} in my tex file, and the \cite{} entries that I did manually work as expected. I have the following in my .emacs (require 'reftex) (setq-default TeX-master nil) (add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) ;turn on pdf-mode. AUCTeX ;will call pdflatex to ;compile instead of latex. (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) ;turn on math-mode by ;default (add-hook 'LaTeX-mode-hook 'reftex-mode) ;turn on REFTeX mode by ;default (add-hook 'LaTeX-mode-hook 'flyspell-mode) ;turn on flyspell mode by ;default (setq reftex-plug-into-AUCTeX t) (setq TeX-auto-save t) (setq TeX-save-query nil) (setq TeX-parse-self t) (setq-default TeX-master nil) I also tried the suggestions in http://stackoverflow.com/questions/2699017/suggestion-for-cite-in-emacs-with-auctex, but it didn't work either. Alejandro.

    Read the article

  • Can a standalone ruby script (windows and mac) reload and restart itself?

    - by user30997
    I have a master-workers architecture where the number of workers is growing on a weekly basis. I can no longer be expected to ssh or remote console into each machine to kill the worker, do a source control sync, and restart. I would like to be able to have the master place a message out on the network that tells each machine to sync and restart. That's where I hit a roadblock. If I were using any sane platform, I could just do: exec('ruby', __FILE__) ...and be done. However, I did the following test: p Process.pid sleep 1 exec('ruby', __FILE__) ...and on Windows, I get one ruby instance for each call to exec. None of them die until I hit ^C on the window in question. On every platform I tried this on, it is executing the new version of the file each time, which I have verified this by making simple edits to the test script while the test marched along. The reason I'm printing the pid is to double-check the behavior I'm seeing. On windows, I am getting a different pid with each execution - which I would expect, considering that I am seeing a new process in the task manager for each run. The mac is behaving correctly: the pid is the same for every system call and I have verified with dtrace that each run is trigging a call to the execve syscall. So, in short, is there a way to get a windows ruby script to restart its execution so it will be running any code - including itself - that has changed during its execution? Please note that this is not a rails application, though it does use activerecord.

    Read the article

  • Create an SQL Express 2008 database in C# code, but login fails when trying to connect with a sysadm

    - by Andrés Gonzales
    I have a piece of code that creates an SQL Server Express 2008 in runtime, and then tries to connect to it to execute a database initialization script in Transact-SQL. The code that creates the database is the following: private void CreateDatabase() { using (var connection = new SqlConnection( "Data Source=.\\sqlexpress;Initial Catalog=master;" + "Integrated Security=true;User Instance=True;")) { connection.Open(); using (var command = connection.CreateCommand()) { command.CommandText = "CREATE DATABASE " + m_databaseFilename + " ON PRIMARY (NAME=" + m_databaseFilename + ", FILENAME='" + this.m_basePath + m_databaseFilename + ".mdf')"; command.ExecuteNonQuery(); } } } The database is created successfully. After that, I try to connect to the database to run the initialization script, by using the following code: private void ExecuteQueryFromFile(string filename) { string queryContent = File.ReadAllText(m_filePath + filename); this.m_connectionString = string.Format( @"Server=.\SQLExpress; Integrated Security=true;Initial Catalog={0};", m_databaseFilename); using (var connection = new SqlConnection(m_connectionString)) { connection.Open(); using (var command = connection.CreateCommand()) { command.CommandText = queryContent; command.CommandTimeout = 0; command.ExecuteNonQuery(); } } } However, the connection.Open() statement fails, throwing the following exception: Cannot open database "TestData" requested by the login. The login failed. Login failed for user 'MYDOMAIN\myusername'. I am completely puzzled by this error because the account I am trying to connect with has sysadmin privileges, which should allow me to connect any database (notice that I use a connection to the master database to create the database in the first place).

    Read the article

  • How to set permissions or alter a git commit process when using local repositories

    - by Tony
    I have a server that contains a central git repository and one of my co-worker's development environment. My co-worker's repository's origin is the central git repository and he pushes there when he has some code to share. Likewise, I develop locally and push to the central git repository when I have some code to share, so my repository's origin is also the central git repository. The issue is that I have the central git repository under a "git" user's home directory. So when I push I am actually SSH'ing into the the server as the "git" user. To be even more clear, my config has these lines: $ more .git/config [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = [email protected]:fsg [branch "master"] remote = origin merge = refs/heads/master When I push, git handles this SSH + push seamlessly with I am guessing some sort of git shell. The issue is that when my coworker pushes, he is logged in as himself for a user and gets a bunch of crazy permission errors. Is there a typical way to solve this problem without opening up git's directories to a group? I think this will be problematic when I push and therefore overwrite the the repository and those permissions are reset. Thanks!

    Read the article

  • What do you need to implement to provide a Content Set for an NSArrayController?

    - by whuuh
    Heys, I am writing something in Xcode. I use Core Data for persistency and link the view and the model together with Cocoa Bindings; pretty much your ordinary Core Data application. I have an array controller (NSArrayController) in my Xib. This has its managedObjectContext bound to the AppDelegate, as is convention, and tracks an entity. So far so good. Now, the "Content Set" biding of this NSArrayController limits its content set (as you'd expect), by a keyPath from the selection in another NSArrayController (otherAc.selection.detailsOfMaster). This is the usual way to implement a Master-Detail relationship. I want to variably change the key path at runtime, using other controls. This way, I sould return a content set that includes several other content sets, which is all advanced and beyond Interface Builder. To achieve this, I think I should bind the Content Set to my AppDelegate instead. I have tried to do this, but don't know what methods to implement. If I just create the KVC methods (objectSet, setObjectSet), then I can provide a Content Set for the Array Controller in the contentSet method. However, I don't think I'm binding this properly, because it doesn't "refresh". I'm new to binding; what do I need to implement to properly update the Content Set when other things, like the selection in the master NSArrayController, changes?

    Read the article

  • Web Deployment Project failed to map path for include virtual

    - by Duke
    I am building my site with a web deployment project but the build fails with a number of errors all relating to the "#include virtual" directives in my master page. The includes are necessary to import a set of centrally managed html template files. Here is an example of the include directive and associated error: <!-- #include virtual="/v3/sits/pdpdev/assets-templates/inc/head.html" --> /PDPRegistration.csproj/Pages/ContentPage.Master(15): error ASPPARSE: Failed to map the path '/v3/sits/pdpdev/assets-templates/inc/head.html'. The error for each included file actually appears multiple times. I'm not sure what is being mapped or why, but this was never a problem until I started using WDP (which I wanted to alter web.config depending on the build environment, among other things.) The project is built locally on my PC and then copied to the web server via a mapped drive. I found a few solutions on the 'net involving IIS metabase - they weren't quite clear to me, and I'm not sure if they apply given how I build and deploy the project (that is, would I have to build on the same system as IIS in order to make use of the metabase?) Can anyone suggest how I can get my project to build with WDP?

    Read the article

  • Vertical Image Border Changes Alignment when Screen is not maximized

    - by Randy
    I have some pretty straightforward HTML code with a few tables to organize various items of text or images. All works fine except that I need to place a vertical border on both the left and right sides of the screen. I am able to do this with a 2x2 pixel image that I stretch out. When the user has their screen maximized, everything looks great. But when the user hits "Restore Down", then the borders stay in place, but the tables get shoved down so that they start below where the borders end, which is off screen. in other words, the relational alignment between the borders and the tables gets all screwed up. Does anybody know how to make this alignment stay consistent on a restore down? I'm pretty much a newbie with html and asp, so speak slowly. If there is a better method to accomplish this, I'm all ears. Thanks. Here is the relevant section of code: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" % <form id="form1" runat="server"> <asp:Image ID="LeftBorder" src="../Images/Border_Blue.jpg" runat="server" WIDTH="15" HEIGHT="1000" BORDER="0" alt="Image Missing" align="left"/> <asp:Image ID="RightBorder" src="../Images/Border_Blue.jpg" runat="server" WIDTH="15" HEIGHT="1000" BORDER="0" alt="Image Missing" align="right" /> <table id="BannerTable" style="height: 100px"> <tr> <td width="934px"> <img src="../Images/Header.jpg" alt="Image Missing" id="ImgBanner" align="left"/></td> </tr> </table>

    Read the article

  • emacs: Inferior-mode python-shell appears "lagged"

    - by Begbie00
    Hi all - I'm a Python(3.1.2)/emacs(23.2) newbie teaching myself tkinter using the pythonware tutorial found here. Relevant code is pasted below the question. Question: when I click the Hello button (which should call the say_hi function) why does the inferior python shell (i.e. the one I kicked off with C-c C-c) wait to execute the say_hi print function until I either a) click the Quit button or b) close the root widget down? When I try the same in IDLE, each click of the Hello button produces an immediate print in the IDLE python shell, even before I click Quit or close the root widget. Is there some quirk in the way emacs runs the Python shell (vs. IDLE) that causes this "lagged" behavior? I've noticed similar emacs lags vs. IDLE as I've worked through Project Euler problems, but this is the clearest example I've seen yet. FYI: I use python.el and have a relatively clean init.el... (setq python-python-command "d:/bin/python31/python") is the only line in my init.el. Thanks, Mike === Begin Code=== from tkinter import * class App: def __init__(self,master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", command=frame.quit) self.button.pack(side=LEFT) self.hi_there = Button(frame, text="Hello", command=self.say_hi) self.hi_there.pack(side=LEFT) def say_hi(self): print("hi there, everyone!") root = Tk() app = App(root) root.mainloop()

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >