Search Results

Search found 21060 results on 843 pages for 'content disposition'.

Page 64/843 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • strategy /insights for avoiding document content loss due to encryption

    - by pbernatchez
    I'm about to encourage a group of people to begin using S-Mime and GPG for digital signatures and encryption. I foresee a nightmare of encrypted documents which can no longer be recovered because of lost keys. The thorniest issue is archiving. The natural way to preserve privacy in an archive is to archive the encrypted document. But that opens us up to the risk of a lost key when time comes to unarchive a document, or a forgotten password. After all it will be a long way in the future. This would be equivalent to having destroyed the document. First thought is archiving keys with documents, but that still leaves the forgotten pass phrase. Archiving the passphrase too would be tantamount to archiving in the clear. No privacy. What approaches do you use? What insights can you offer on the issue?

    Read the article

  • Remote I/O costs with a Content Delivery Network

    - by x711Li
    As far as I know, the time complexity of scanning a directory and the amount of files in said directory are correlated due to I/O costs. Would the administrative costs of placing the files in a hashed directory tree for uploading/downloading files through a CDN API be worth it for the added efficiency? For instance, given a filename foo.mp3, the MD5 hash for this is 10ebb1120767e9de166e0f5905077cb1. Thus, storing foo.mp3 in ./10/eb/foo.mp3 would allow for less files per directory (assuming MD5 generates patterns with in Base36, this allows for 36^2 root directories with 36^2 subdirectories each and little chance of hash collision) Considering the directories themselves are not loaded, would the I/O costs of directory scanning still exist with direct uploading/downloading?

    Read the article

  • Some html5 video content will not play in Chrome - except in Private Browsing Mode

    - by oligofren
    I have had this problem for a couple of years, probably due to the fact that all my settings get transferred when I log into Chrome: Most videos on the net play fine using Chrome, but on certain site none of the videos will play. This is not due to wrong codecs or something, because opening the same video using Chrome's Private Browsing Mode will play it just fine. Since most (all?) extensions are disabled when using Private Browsing Mode, I guessed the problem had to be found in my extensions, so I disabled all and also disabled developer mode. The problem persisted ... Example html5 video from the W3C plays fine This video from Pecha Kucha does not

    Read the article

  • Sed: Deleting all content matching a pattern

    - by Svish
    I have some plist files on mac os x that I would like to shrink. They have a lot of <dict> with <key> and values. One of these keys is a thumbnail which has a <data> value with base64 encoded binary (I think). I would like to remove this key and value. I was thinking this could maybe be done by sed, but I don't really know how to use it and it seems like sed only works on a line-by-line basis? Either way I was hoping someone could help me out. In the file I would like to delete everything that matches the following pattern or something close to that: <key>Thumbnail<\/key>[^<]*<\/data> In the file it looks like this: // Other keys and values <key>Thumbnail</key> <data> TU0AKgAAOEi25Pqx3/ip2fak0vOdzPCVxu2RweuPv+mLu+mIt+aGtuaEtOSB ... dCBBcHBsZSBDb21wdXRlciwgSW5jLiwgMjAwNQAAAAA= </data> // Other keys and values Anyone know how I could do this? Also, if there are any better tools that I can use in the terminal to do this, I would like to know about that as well :)

    Read the article

  • Web Content Filtering for Windows Clients

    - by djoyce
    I'm working with a small business to solve a bunch of problems. One is their Windows 7 POS registers need to have web access restricted to only three remote support sites, but the back office machine needs an unfiltered connection. I'd like something I can install and configure on the few registers to block all but those few sites. In a perfect world this would restrict the normal register user, but the admin user would not be filtered. Free is best, if it works, but a small fee would be alright too. Microsoft's Family Safety filter is close, but requires a Windows Live account, which isn't ideal, but may be alright. Anyone use this in a small business environment? I'd prefer something easily managed at the local machines. K9 Web Protection is interesting and I'm going to look into it more. Are there other options? Seems like someone would have made something simple like this as an open source project, but maybe not.

    Read the article

  • Cannot delete folder - Content seems to be nested recursively

    - by RikuXan
    I cannot delete a folder located on my hard disk by any means. I don't quite know how it was created, all I know is, that it is a pretty deep structure of folders (too deep to delete it at once, since Windows restriction path name too long), but the problem in the end is, that I can't "pull out" the inner folders, because they don't seem to be folders anymore (Context menu lacks things like "Properties", "Cut", "Copy", "Delete" etc.) Here a picture of how a right click looks like on one of these "folders": As you can see, the current folder is in very deep, but that is not the problem, rather the one I left-clicked on. Has anyone any advice on how to get rid of these? I tried a chkdsk, said no errors. I also tried deleting those folder via a VMWare Ubuntu, to no success. I also tried a batch file from a volunteer at MS boards, that should automatically de-nest such folders, but I guess mine is a special case, since the tool only created more such folders.

    Read the article

  • How to make sure clients update their browser cache when my website is updated?

    - by user64204
    I am using the HTTP 1.1 Cache-Control header to implement client-side caching. Since I update my website only once a month I would like the CSS and JS files to be cached for 30 days with Cache-Control: max-age=2592000. The problem is that the 30-day period defined by Cache-Control doesn't coincide with the website update cycle, it starts from the moment the users visit the site and ends 30 days later, which means an update could occur in the meantime and users would be running with outdated content for a while, which could break the rendering of the website if for instance the HTML and CSS no longer match. How can I perform client-side caching of content for periods of several days but somehow get users to refresh their CSS/JS files after the website has been updated? One solution I could think of is that if website updates can be schedule, the max-age returned by the server could be decreased every day accordingly so that no matter when people visit the website, the end of caching period would coincide with the update of the website, but changing the server configuration every day goes against one of my sysadmin principles (once it's running, don't touch it).

    Read the article

  • Find RARs with duplicate content

    - by Scott McClenning
    I need a utility to find RAR files that contain duplicate data (i.e. files within the RAR that hash the same, but could have different names). I can open the RARs and see the CRCs are the same, but I was hoping for a more automated process that would work in bulk (hundreds of files). Hashing the overall RAR won't help because the file contained within could have different names, or the archive could be compressed at different levels. If needed, a utility that would extract the contents of the RARs and then compare would work, but is not preferred. I would prefer a free utility for Windows, but a pay utility or a utility for Linux would be acceptable.

    Read the article

  • Glassfish JSF/EAR Apache 2.2 proxy_ajp_mod Referred Content Missing (images/links/etc)

    - by BillR
    Full disclosure: Since this seems to be more of a configuration issue, I deleted this from Stack (where it wasn't getting any response) and reposted here. The problem is how to change the requestContextPath served up by Glassfish behind mod_proxy_ajp. The site/app runs fine if connecting directly to Glassfish port 8080 which is ultimately not what I want to do. So I need help with configuration for my servers and jsf deployment. I can see the issue but don't know how to resolve it. It has to do with the requestContextPath. Simply put, Apache directs to http://mysite.com/welcome.xhtml which is correct and what I want, but the page is minus the images and styles. The issue is Glassfish itself is still pointing to http://mysite.com/myapp/*. So all links it serves in the app/site still refer via the requestContextPath. That is the /myapp/* part of http://mysite.com/myapp/welcome.xhtml. When I look in the page source, images which are referred to with relative links still point to the requestContextPath (that is, /myapp/). This is fixable but a real pain. However with page links I can't set the relative path. If I hover over the contact page link I see http://mysite.com/myapp/contact.xhtml, and if I click it, I get 404. You can see the /myapp/ context path in the page source as well. If I type in the URL http://mysite.com/contact.xhtml I get the page minus its referred links (requestContextPath). On Apache ProxyPass / ajp://littlewalterserver:8009/myapp-web/ ProxyPassReverse / ajp://littlewalterserver:8009/myapp_Project-web On Glassfish asadmin create-network-listener --listenerport 8009 --protocol http-listener-1 --jkenabled true jk-connector I have tried going in to Glassfish and setting the web app as the default web app. I have changed the / in glassfish-web.xml (and checked to make sure it was the same in the EAR file). How can I get Glassfish to not include the /myapp/ context in the URLs? This has to be easy if you know how, but I don't know how, can someone help out here? Thanks.

    Read the article

  • ASP.NET MVC 3: Layouts and Sections with Razor

    - by ScottGu
    This is another in a series of posts I’m doing that cover some of the new ASP.NET MVC 3 features: Introducing Razor (July 2nd) New @model keyword in Razor (Oct 19th) Layouts with Razor (Oct 22nd) Server-Side Comments with Razor (Nov 12th) Razor’s @: and <text> syntax (Dec 15th) Implicit and Explicit code nuggets with Razor (Dec 16th) Layouts and Sections with Razor (Today) In today’s post I’m going to go into more details about how Layout pages work with Razor.  In particular, I’m going to cover how you can have multiple, non-contiguous, replaceable “sections” within a layout file – and enable views based on layouts to optionally “fill in” these different sections at runtime.  The Razor syntax for doing this is clean and concise. I’ll also show how you can dynamically check at runtime whether a particular layout section has been defined, and how you can provide alternate content (or even an alternate layout) in the event that a section isn’t specified within a view template.  This provides a powerful and easy way to customize the UI of your site and make it clean and DRY from an implementation perspective. What are Layouts? You typically want to maintain a consistent look and feel across all of the pages within your web-site/application.  ASP.NET 2.0 introduced the concept of “master pages” which helps enable this when using .aspx based pages or templates.  Razor also supports this concept with a feature called “layouts” – which allow you to define a common site template, and then inherit its look and feel across all the views/pages on your site. I previously discussed the basics of how layout files work with Razor in my ASP.NET MVC 3: Layouts with Razor blog post.  Today’s post will go deeper and discuss how you can define multiple, non-contiguous, replaceable regions within a layout file that you can then optionally “fill in” at runtime. Site Layout Scenario Let’s look at how we can implement a common site layout scenario with ASP.NET MVC 3 and Razor.  Specifically, we’ll implement some site UI where we have a common header and footer on all of our pages.  We’ll also add a “sidebar” section to the right of our common site layout.  On some pages we’ll customize the SideBar to contain content specific to the page it is included on: And on other pages (that do not have custom sidebar content) we will fall back and provide some “default content” to the sidebar: We’ll use ASP.NET MVC 3 and Razor to enable this customization in a nice, clean way.  Below are some step-by-step tutorial instructions on how to build the above site with ASP.NET MVC 3 and Razor. Part 1: Create a New Project with a Layout for the “Body” section We’ll begin by using the “File->New Project” menu command within Visual Studio to create a new ASP.NET MVC 3 Project.  We’ll create the new project using the “Empty” template option: This will create a new project that has no default controllers in it: Creating a HomeController We will then right-click on the “Controllers” folder of our newly created project and choose the “Add->Controller” context menu command.  This will bring up the “Add Controller” dialog: We’ll name the new controller we create “HomeController”.  When we click the “Add” button Visual Studio will add a HomeController class to our project with a default “Index” action method that returns a view: We won’t need to write any Controller logic to implement this sample – so we’ll leave the default code as-is.  Creating a View Template Our next step will be to implement the view template associated with the HomeController’s Index action method.  To implement the view template, we will right-click within the “HomeController.Index()” method and select the “Add View” command to create a view template for our home page: This will bring up the “Add View” dialog within Visual Studio.  We do not need to change any of the default settings within the above dialog (the name of the template was auto-populated to Index because we invoked the “Add View” context menu command within the Index method).  When we click the “Add” Button within the dialog, a Razor-based “Index.cshtml” view template will be added to the \Views\Home\ folder within our project.  Let’s add some simple default static content to it: Notice above how we don’t have an <html> or <body> section defined within our view template.  This is because we are going to rely on a layout template to supply these elements and use it to define the common site layout and structure for our site (ensuring that it is consistent across all pages and URLs within the site).  Customizing our Layout File Let’s open and customize the default “_Layout.cshtml” file that was automatically added to the \Views\Shared folder when we created our new project: The default layout file (shown above) is pretty basic and simply outputs a title (if specified in either the Controller or the View template) and adds links to a stylesheet and jQuery.  The call to “RenderBody()” indicates where the main body content of our Index.cshtml file will merged into the output sent back to the browser. Let’s modify the Layout template to add a common header, footer and sidebar to the site: We’ll then edit the “Site.css” file within the \Content folder of our project and add 4 CSS rules to it: And now when we run the project and browse to the home “/” URL of our project we’ll see a page like below: Notice how the content of the HomeController’s Index view template and the site’s Shared Layout template have been merged together into a single HTML response.  Below is what the HTML sent back from the server looks like: Part 2: Adding a “SideBar” Section Our site so far has a layout template that has only one “section” in it – what we call the main “body” section of the response.  Razor also supports the ability to add additional "named sections” to layout templates as well.  These sections can be defined anywhere in the layout file (including within the <head> section of the HTML), and allow you to output dynamic content to multiple, non-contiguous, regions of the final response. Defining the “SideBar” section in our Layout Let’s update our Layout template to define an additional “SideBar” section of content that will be rendered within the <div id=”sidebar”> region of our HTML.  We can do this by calling the RenderSection(string sectionName, bool required) helper method within our Layout.cshtml file like below:   The first parameter to the “RenderSection()” helper method specifies the name of the section we want to render at that location in the layout template.  The second parameter is optional, and allows us to define whether the section we are rendering is required or not.  If a section is “required”, then Razor will throw an error at runtime if that section is not implemented within a view template that is based on the layout file (which can make it easier to track down content errors).  If a section is not required, then its presence within a view template is optional, and the above RenderSection() code will render nothing at runtime if it isn’t defined. Now that we’ve made the above change to our layout file, let’s hit refresh in our browser and see what our Home page now looks like: Notice how we currently have no content within our SideBar <div> – that is because the Index.cshtml view template doesn’t implement our new “SideBar” section yet. Implementing the “SideBar” Section in our View Template Let’s change our home-page so that it has a SideBar section that outputs some custom content.  We can do that by opening up the Index.cshtml view template, and by adding a new “SiderBar” section to it.  We’ll do this using Razor’s @section SectionName { } syntax: We could have put our SideBar @section declaration anywhere within the view template.  I think it looks cleaner when defined at the top or bottom of the file – but that is simply personal preference.  You can include any content or code you want within @section declarations.  Notice above how I have a C# code nugget that outputs the current time at the bottom of the SideBar section.  I could have also written code that used ASP.NET MVC’s HTML/AJAX helper methods and/or accessed any strongly-typed model objects passed to the Index.cshtml view template. Now that we’ve made the above template changes, when we hit refresh in our browser again we’ll see that our SideBar content – that is specific to the Home Page of our site – is now included in the page response sent back from the server: The SideBar section content has been merged into the proper location of the HTML response : Part 3: Conditionally Detecting if a Layout Section Has Been Implemented Razor provides the ability for you to conditionally check (from within a layout file) whether a section has been defined within a view template, and enables you to output an alternative response in the event that the section has not been defined.  This provides a convenient way to specify default UI for optional layout sections.  Let’s modify our Layout file to take advantage of this capability.  Below we are conditionally checking whether the “SideBar” section has been defined without the view template being rendered (using the IsSectionDefined() method), and if so we render the section.  If the section has not been defined, then we now instead render some default content for the SideBar:  Note: You want to make sure you prefix calls to the RenderSection() helper method with a @ character – which will tell Razor to execute the HelperResult it returns and merge in the section content in the appropriate place of the output.  Notice how we wrote @RenderSection(“SideBar”) above instead of just RenderSection(“SideBar”).  Otherwise you’ll get an error. Above we are simply rendering an inline static string (<p>Default SideBar Content</p>) if the section is not defined.  A real-world site would more likely refactor this default content to be stored within a separate partial template (which we’d render using the Html.RenderPartial() helper method within the else block) or alternatively use the Html.Action() helper method within the else block to encapsulate both the logic and rendering of the default sidebar. When we hit refresh on our home-page, we will still see the same custom SideBar content we had before.  This is because we implemented the SideBar section within our Index.cshtml view template (and so our Layout rendered it): Let’s now implement a “/Home/About” URL for our site by adding a new “About” action method to our HomeController: The About() action method above simply renders a view back to the client when invoked.  We can implement the corresponding view template for this action by right-clicking within the “About()” method and using the “Add View” menu command (like before) to create a new About.cshtml view template.  We’ll implement the About.cshtml view template like below. Notice that we are not defining a “SideBar” section within it: When we browse the /Home/About URL we’ll see the content we supplied above in the main body section of our response, and the default SideBar content will rendered: The layout file determined at runtime that a custom SideBar section wasn’t present in the About.cshtml view template, and instead rendered the default sidebar content. One Last Tweak… Let’s suppose that at a later point we decide that instead of rendering default side-bar content, we just want to hide the side-bar entirely from pages that don’t have any custom sidebar content defined.  We could implement this change simply by making a small modification to our layout so that the sidebar content (and its surrounding HTML chrome) is only rendered if the SideBar section is defined.  The code to do this is below: Razor is flexible enough so that we can make changes like this and not have to modify any of our view templates (nor make change any Controller logic changes) to accommodate this.  We can instead make just this one modification to our Layout file and the rest happens cleanly.  This type of flexibility makes Razor incredibly powerful and productive. Summary Razor’s layout capability enables you to define a common site template, and then inherit its look and feel across all the views/pages on your site. Razor enables you to define multiple, non-contiguous, “sections” within layout templates that can be “filled-in” by view templates.  The @section {} syntax for doing this is clean and concise.  Razor also supports the ability to dynamically check at runtime whether a particular section has been defined, and to provide alternate content (or even an alternate layout) in the event that it isn’t specified.  This provides a powerful and easy way to customize the UI of your site - and make it clean and DRY from an implementation perspective. Hope this helps, Scott P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

    Read the article

  • In WPF, Selecting ItemContainerStyle based on data bound content

    - by Bart Roozendaal
    In #WPF you have ItemTemplateSelectors. But, can you also select an ItemContainerStyle based on the datatype of a bound object? I am databinding a scatterview. I want to set some properties of the generated ScatterViewItems based on the object in their DataContext. A mechanism similar to ItemTemplateSelector for styles would be great. Is that at all possible? I am now binding to properties in the objects that I am displaying to get the effect, but that feels like overhead and too complex (and most importantly, something that our XU designers can't do by themselves). This is the XAML that I am using now. Your help is greatly appreciated. <s:ScatterView x:Name="topicsViewer"> <s:ScatterView.ItemTemplateSelector> <local:TopicViewerDataTemplateSelector> <DataTemplate DataType="{x:Type mvc:S7VideoTopic}"> <Grid> <ContentPresenter Content="{Binding MediaElement}" /> <s:SurfaceButton Visibility="{Binding MailToVisible}" x:Name="mailto" Tag="{Binding Titel}" Click="mailto_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent" Width="62" Height="36"> <Image Source="/Resources/MailTo.png" /> </s:SurfaceButton> <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center" Height="32"> <s:SurfaceButton Tag="{Binding MediaElement}" x:Name="btnPlay" Click="btnPlay_Click"> <Image Source="/Resources/control_play.png" /> </s:SurfaceButton> <s:SurfaceButton Tag="{Binding MediaElement}" x:Name="btnPause" Click="btnPause_Click"> <Image Source="/Resources/control_pause.png" /> </s:SurfaceButton> <s:SurfaceButton Tag="{Binding MediaElement}" x:Name="btnStop" Click="btnStop_Click"> <Image Source="/Resources/control_stop.png" /> </s:SurfaceButton> </StackPanel> </Grid> </DataTemplate> <DataTemplate DataType="{x:Type mvc:S7ImageTopic}"> <Grid> <ContentPresenter Content="{Binding Resource}" /> <s:SurfaceButton Visibility="{Binding MailToVisible}" x:Name="mailto" Tag="{Binding Titel}" Click="mailto_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent" Width="62" Height="36"> <Image Source="/Resources/MailTo.png" /> </s:SurfaceButton> </Grid> </DataTemplate> <DataTemplate DataType="{x:Type local:Kassa}"> <ContentPresenter Content="{Binding}" Width="300" Height="355" /> </DataTemplate> </local:TopicViewerDataTemplateSelector> </s:ScatterView.ItemTemplateSelector> <s:ScatterView.ItemContainerStyle> <Style TargetType="s:ScatterViewItem"> <Setter Property="MinWidth" Value="200" /> <Setter Property="MinHeight" Value="150" /> <Setter Property="MaxWidth" Value="800" /> <Setter Property="MaxHeight" Value="700" /> <Setter Property="Width" Value="{Binding DefaultWidth}" /> <Setter Property="Height" Value="{Binding DefaultHeight}" /> <Setter Property="s:ScatterViewItem.CanMove" Value="{Binding CanMove}" /> <Setter Property="s:ScatterViewItem.CanScale" Value="{Binding CanScale}" /> <Setter Property="s:ScatterViewItem.CanRotate" Value="{Binding CanRotate}" /> <Setter Property="Background" Value="Transparent" /> </Style> </s:ScatterView.ItemContainerStyle> </s:ScatterView> Bart Roozendaal, Sevensteps

    Read the article

  • DTGridView losing content while scrolling

    - by Wim Haanstra
    I am using DTGridView from the DTKit by Daniel Tull. I implemented it in a very simple ViewController and the test I am doing is to place a button in the last row of the grid, which should add another row to the grid (and therefor moving the button to a row beneath it). The problem is, when I click the button a couple of times and then start scrolling, the grid seems to lose its content. As I am not completly sure this is a bug in the grid, but more in my code, I hope you guys can help me out and track down the bug. First I have my header file, which is quite simple, because this is a test: #import <UIKit/UIKit.h> #import "DTGridView.h" @interface TestController : UIViewController <DTGridViewDelegate, DTGridViewDataSource> { DTGridView* thumbGrid; } @end I declare a DTGridView, which will be my grid, where I want to put content in. Now, my code file: #import "TestController.h" @implementation TestController int rows = 1; - (NSInteger)numberOfRowsInGridView:(DTGridView *)gridView { return rows; } - (NSInteger)numberOfColumnsInGridView:(DTGridView *)gridView forRowWithIndex:(NSInteger)index { if (index == rows - 1) return 1; else return 3; } - (CGFloat)gridView:(DTGridView *)gridView heightForRow:(NSInteger)rowIndex { return 57.0f; } - (CGFloat)gridView:(DTGridView *)gridView widthForCellAtRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { if (rowIndex == rows - 1) return 320.0f; else return 106.6f; } - (DTGridViewCell *)gridView:(DTGridView *)gridView viewForRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { DTGridViewCell *view = [[gridView dequeueReusableCellWithIdentifier:@"thumbcell"] retain]; if (!view) view = [[DTGridViewCell alloc] initWithReuseIdentifier:@"thumbcell"]; if (rowIndex == rows - 1) { UIButton* btnLoadMoreItem = [[UIButton alloc] initWithFrame:CGRectMake(10, 0, 301, 57)]; [btnLoadMoreItem setTitle:[NSString stringWithFormat:@"Button %d", rowIndex] forState:UIControlStateNormal]; [btnLoadMoreItem.titleLabel setFont:[UIFont boldSystemFontOfSize:20]]; [btnLoadMoreItem setBackgroundImage:[[UIImage imageNamed:@"big-green-button.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0] forState:UIControlStateNormal]; [btnLoadMoreItem addTarget:self action:@selector(selectLoadMoreItems:) forControlEvents:UIControlEventTouchUpInside]; [view addSubview:btnLoadMoreItem]; [btnLoadMoreItem release]; } else { UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(10,0,100,57)]; label.text = [NSString stringWithFormat:@"%d x %d", rowIndex, columnIndex]; [view addSubview:label]; [label release]; } return [view autorelease]; } - (void) selectLoadMoreItems:(id) sender { rows++; [thumbGrid setNeedsDisplay]; } - (void)viewDidLoad { [super viewDidLoad]; thumbGrid = [[DTGridView alloc] initWithFrame:CGRectMake(0,0, 320, 320)]; thumbGrid.dataSource = self; thumbGrid.gridDelegate = self; [self.view addSubview:thumbGrid]; } - (void)viewDidUnload { [super viewDidUnload]; } - (void)dealloc { [super dealloc]; } @end I implement all the methods for the DataSource, which seem to work. The grid is filled with as many rows as my int 'rows' ( +1 ) has. The last row does NOT contain 3 columns, but just one. That cell contains a button which (when pressed) adds 1 to the 'rows' integer. The problem starts, when it starts reusing cells (I am guessing) and content start disappearing. When I scroll back up, the UILabels I am putting in the cells are gone. Is there some bug, code error, mistake, dumb-ass-move I am missing here? Hope anyone can help.

    Read the article

  • Temporary "Backup" of SharePoint Content During Feature and Solution Deployment

    - by ccomet
    I need to decide on a method for storing a subset of the content in a SharePoint site, so that when I delete and recreate certain lists as part of a feature activation, I can re-insert all of this content back where it should belong. I have an idea myself, but I don't know if it's the only method and more importantly, the right method. My client has me creating a SharePoint system for them to communicate with their clients. The business process has maybe 5 stages in it (maybe it's more, I don't even know because they don't tell me everything), and the current system I've written over the past months is maybe 2 stages through. This meets our deadline of completing those systems by Monday next week... but at that point my client is planning on making the site live from that point. In effect, their work with their clients will be running parallel with my work for them. As I complete my own work on a separate test server, I'll push each following stage of the process onto the live server. Scheduled downtimes during non-business times (like a weekend) will be available for me to perform these pushes. Keeping pace so that my development is faster than the actual business process is my own problem and off-topic... so let's get back to the problem I stated at the start of this post. In this system, we have sets of features which will create lists for their associated content types and field types when activated, and delete these lists when the feature is deactivated. Most updates don't need to deactivate and reactivate these features, such as workflow changes, custom actions, custom forms, and similar ilk. But there are some parts which do require this. On my test server, it's okay for me to obliterate lists, but once the site is live and there's real correspondence data, it's absolutely unacceptable to do this. So when I need to implement a new change in functionality, I need to be able to store the currently present data in several lists, deactivate the feature, reactivate the feature, and restore all of this data. Perhaps I have hoist myself by my own petard with the feature system I implemented. Unfortunately, the necessity to later on make several of these "project sites" meant I had to do a lot of my code with the concept of "Can be deployed repeatedly" in mind. My current plan is to run through lists and libraries which will be affected by the particular feature that is to be reset. Files and all of their versions will be saved in a directory on the server. Then, a set of text files will be used to store all of the important field values for the items. This includes a lot of cross-list reference lookups that will need to be maintained, but that's simple enough. Then, I deactivate the feature, deploy the new solution, and reactivate the feature. We upload all of the files in the order specified by their versions and update them with the stored fields for those versions, so that we retain the version structure. As each one is first uploaded, the new ID is picked out, and all relevant lookups in the rest of the files are updated (in some manner that I make sure I don't re-update it later with an incorrect value, of course). After that, we run through all the rest of the items in the order most conducive to keeping the relational data correct. This roughly summarizes what my current plan is. To my advantage, there are no long running workflows in the system that will be affected by this, so there's nothing I will have to worry about making sure nothing is "still running" when I do this stuff. I don't really know all the cons of this approach... I can imagine they're quite hefty. But I'm unsure what other choices I even have, and my searches haven't turned up anything. Is there anyone who can think of a better idea? Or will anyone just tell me that I really have no other choice? Thanks in advance!

    Read the article

  • DTGridView losting content while scrolling

    - by Wim Haanstra
    I am using DTGridView from the DTKit by Daniel Tull. I implemented it in a very simple ViewController and the test I am doing is to place a button in the last row of the grid, which should add another row to the grid (and therefor moving the button to a row beneath it). The problem is, when I click the button a couple of times and then start scrolling, the grid seems to lose its content. As I am not completly sure this is a bug in the grid, but more in my code, I hope you guys can help me out and track down the bug. First I have my header file, which is quite simple, because this is a test: #import <UIKit/UIKit.h> #import "DTGridView.h" @interface TestController : UIViewController <DTGridViewDelegate, DTGridViewDataSource> { DTGridView* thumbGrid; } @end I declare a DTGridView, which will be my grid, where I want to put content in. Now, my code file: #import "TestController.h" @implementation TestController int rows = 1; - (NSInteger)numberOfRowsInGridView:(DTGridView *)gridView { return rows; } - (NSInteger)numberOfColumnsInGridView:(DTGridView *)gridView forRowWithIndex:(NSInteger)index { if (index == rows - 1) return 1; else return 3; } - (CGFloat)gridView:(DTGridView *)gridView heightForRow:(NSInteger)rowIndex { return 57.0f; } - (CGFloat)gridView:(DTGridView *)gridView widthForCellAtRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { if (rowIndex == rows - 1) return 320.0f; else return 106.6f; } - (DTGridViewCell *)gridView:(DTGridView *)gridView viewForRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { DTGridViewCell *view = [[gridView dequeueReusableCellWithIdentifier:@"thumbcell"] retain]; if (!view) view = [[DTGridViewCell alloc] initWithReuseIdentifier:@"thumbcell"]; if (rowIndex == rows - 1) { UIButton* btnLoadMoreItem = [[UIButton alloc] initWithFrame:CGRectMake(10, 0, 301, 57)]; [btnLoadMoreItem setTitle:[NSString stringWithFormat:@"Button %d", rowIndex] forState:UIControlStateNormal]; [btnLoadMoreItem.titleLabel setFont:[UIFont boldSystemFontOfSize:20]]; [btnLoadMoreItem setBackgroundImage:[[UIImage imageNamed:@"big-green-button.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0] forState:UIControlStateNormal]; [btnLoadMoreItem addTarget:self action:@selector(selectLoadMoreItems:) forControlEvents:UIControlEventTouchUpInside]; [view addSubview:btnLoadMoreItem]; [btnLoadMoreItem release]; } else { UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(10,0,100,57)]; label.text = [NSString stringWithFormat:@"%d x %d", rowIndex, columnIndex]; [view addSubview:label]; [label release]; } return [view autorelease]; } - (void) selectLoadMoreItems:(id) sender { rows++; [thumbGrid setNeedsDisplay]; } - (void)viewDidLoad { [super viewDidLoad]; thumbGrid = [[DTGridView alloc] initWithFrame:CGRectMake(0,0, 320, 320)]; thumbGrid.dataSource = self; thumbGrid.gridDelegate = self; [self.view addSubview:thumbGrid]; } - (void)viewDidUnload { [super viewDidUnload]; } - (void)dealloc { [super dealloc]; } @end I implement all the methods for the DataSource, which seem to work. The grid is filled with as many rows as my int 'rows' ( +1 ) has. The last row does NOT contain 3 columns, but just one. That cell contains a button which (when pressed) adds 1 to the 'rows' integer. The problem starts, when it starts reusing cells (I am guessing) and content start disappearing. When I scroll back up, the UILabels I am putting in the cells are gone. Is there some bug, code error, mistake, dumb-ass-move I am missing here? Hope anyone can help.

    Read the article

  • Change the content of a <style> element through JavaScript

    - by paercebal
    The Problem I have the following code: <html> <head> <style id="ID_Style"> .myStyle { color : #FF0000 ; } </style> </head> <body> <p class="myStyle"> Hello World ! </p> </body> </html> And I want to modify the contents of <style> through JavaScript. The Expected Solution The first solution was to use the innerHTML property of the style element (retrieved through its id), but while it works on Firefox, it fails on Internet Explorer 7. So, I used pure DOM methods, that is, creating an element called style, a text node with the desired content, and append the text node as a child of the style node, etc. It fails, too. According to MSDN, the <style> element has an innerHTML property, and according to W3C, the <style> element is a HTMLStyleElement, which derives from HTMLElement, deriving from Element deriving from Node, which has the appendChild method. It seems to behave as if the content of a <style> element was readonly on Internet Explorer. The Question So the question is: Is there a way to modify the content of a <style> element on Internet Explorer? While the current problem is with IE7, a cross-browser solution would be cool, if possible. Appendix Sources: Style Element (MSDN): http://msdn.microsoft.com/en-us/library/ms535898.aspx HTMLStyleElement (W3C): http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-16428977 Complete Test Code You can use this test code if you want to reproduce your problem: <html> <head> <style id="ID_Style"> .myStyle { color : #FF0000 ; } </style> <script> function replaceStyleViaDOM(p_strContent) { var oOld = document.getElementById("ID_Style") ; var oParent = oOld.parentNode ; oParent.removeChild(oOld) ; var oNew = document.createElement("style") ; oParent.appendChild(oNew) ; oNew.setAttribute("id", "ID_Style") ; var oText = document.createTextNode(p_strContent) ; oNew.appendChild(oText) ; } function replaceStyleViaInnerHTML(p_strContent) { document.getElementById("ID_Style").innerHTML = p_strContent ; } </script> <script> function setRedViaDOM() { replaceStyleViaDOM("\n.myStyle { color : #FF0000 ; }\n") } function setRedViaInnerHTML() { replaceStyleViaInnerHTML("\n.myStyle { color : #FF0000 ; }\n") } function setBlueViaDOM() { replaceStyleViaDOM("\n.myStyle { color : #0000FF ; }\n") } function setBlueViaInnerHTML() { replaceStyleViaInnerHTML("\n.myStyle { color : #0000FF ; }\n") } function alertStyle() { alert("*******************\n" + document.getElementById("ID_Style").innerHTML + "\n*******************") ; } </script> </head> <body> <div> <button type="button" onclick="alertStyle()">alert Style</button> <br /> <button type="button" onclick="setRedViaDOM()">set Red via DOM</button> <button type="button" onclick="setRedViaDOM()">set Red via InnerHTML</button> <br /> <button type="button" onclick="setBlueViaDOM()">set Blue via DOM</button> <button type="button" onclick="setBlueViaInnerHTML()">set Blue via InnerHTML</button> </div> <p class="myStyle"> Hello World ! </p> </body> </html> Thanks !

    Read the article

  • Content div not filling up the remaining space

    - by Sameer Shariff
    Basically #content is not obeying the height: auto attribute. What am i doing wrong? <!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 id="title" runat="server">AMIDS: Advanced Management Information Data Store</title> <style type="text/css"> #container { background-color: White; height: 100%; min-height: 100%; min-width: 600px; width: 100%; } #header { height: 50px; overflow: hidden; width: 100%; } #headerLeft { background-image: url('/Amids/App_Themes/Default/Images/HeaderLeft.jpg'); float: left; height: 50px; width: 5px; } #headerCenter { background-image: url('/Amids/App_Themes/Default/Images/HeaderCenter.jpg'); float: left; height: 50px; width: 99.2%; } #headerRight { background-image: url('/Amids/App_Themes/Default/Images/HeaderRight.jpg'); float: left; height: 50px; width: 5px; } #menu { background-image: url('/Amids/App_Themes/Default/Images/Menu.jpg'); height: 20px; width: 100%; } #content { background-color: Pink; height: auto; width: 100%; } #footer { height: 40px; overflow: hidden; width: 100%; } #footerLeft { background-image: url('/Amids/App_Themes/Default/Images/FooterLeft.jpg'); float: left; height: 40px; width: 5px; } #footerCenter { background-image: url('/Amids/App_Themes/Default/Images/FooterCenter.jpg'); float: left; height: 40px; width: 99.2%; } #footerRight { background-image: url('/Amids/App_Themes/Default/Images/FooterRight.jpg'); float: left; height: 40px; width: 5px; } * html #container { height: 100%; } * { margin: 0; padding: 0; } html, body, form { border: none; height: 100%; } </style> </head> <body> <form id="form" runat="server"> <div id="container"> <div id="header"> <div id="headerLeft"></div> <div id="headerCenter"></div> <div id="headerRight"></div> </div> <div id="menu"></div> <div id="content"></div> <div id="footer"> <div id="footerLeft"></div> <div id="footerCenter"></div> <div id="footerRight"></div> </div> </div> </form> </body> </html> Any ideas anyone?

    Read the article

  • HTTPWebResponse returning no content

    - by Richard Yale
    Our company works with another company called iMatrix and they have an API for creating our own forms. They have confirmed that our request is hitting their servers but a response is supposed to come back in 1 of a few ways determined by a parameter. I'm getting a 200 OK response back but no content and a content-length of 0 in the response header. here is the url: https://secure4.office2office.com/designcenter/api/imx_api_call.asp I'm using this class: namespace WebSumit { public enum MethodType { POST = 0, GET = 1 } public class WebSumitter { public WebSumitter() { } public string Submit(string URL, Dictionary<string, string> Parameters, MethodType Method) { StringBuilder _Content = new StringBuilder(); string _ParametersString = ""; // Prepare Parameters String foreach (KeyValuePair<string, string> _Parameter in Parameters) { _ParametersString = _ParametersString + (_ParametersString != "" ? "&" : "") + string.Format("{0}={1}", _Parameter.Key, _Parameter.Value); } // Initialize Web Request HttpWebRequest _Request = (HttpWebRequest)WebRequest.Create(URL); // Request Method _Request.Method = Method == MethodType.POST ? "POST" : (Method == MethodType.GET ? "GET" : ""); _Request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)"; // Send Request using (StreamWriter _Writer = new StreamWriter(_Request.GetRequestStream(), Encoding.UTF8)) { _Writer.Write(_ParametersString); } // Initialize Web Response HttpWebResponse _Response = (HttpWebResponse)_Request.GetResponse(); // Get Response using (StreamReader _Reader = new StreamReader(_Response.GetResponseStream(), Encoding.UTF8)) { _Content.Append(_Reader.ReadToEnd()); } return _Content.ToString(); } } } I cannot post the actual parameters because they are to the live system, but can you look at this code and see if there is anything that is missing? Thanks!

    Read the article

  • Height of a html window's content (not just the viewport height)

    - by gatapia
    Hi All, I'm trying to get the height of a html window's content. This is the full height of the content not the visible height. I have had some (very limited) success using: document.getElementsByTagName('html')[0].offsetHeight in FireFox. This however fails in IEs and it fails in Chrome when using absolute positioned elements (http://code.google.com/p/chromium/issues/detail?id=38999). A sample html file that can be used to reproduce this is: <html> <head> <style> div { border:solid 1px red; height:2000px; width:400px; } .broken { position:absolute; top:0; left:0; } .fixed { position:relative; top:0; left:0; } </style> <script language='javascript'> window.onload = function () { document.getElementById('window.height').innerHTML = window.innerHeight; document.getElementById('window.screen.height').innerHTML = window.screen.height; document.getElementById('document.html.height').innerHTML = document.getElementsByTagName('html')[0].offsetHeight; } </script> </head> <body> <div class='fixed'> window.height: <span id='window.height'>&nbsp;</span> <br/> window.screen.height: <span id='window.screen.height'></span> <br/> document.html.height: <span id='document.html.height'></span> <br/> </div> </body> </html> Thanks All Guido Tapia

    Read the article

  • How to encrypt Amazon CloudFront signature for private content access using canned policy

    - by Chet
    Has anyone using .net actually worked out how to successfully sign a signature to use with CloudFront private content? After a couple of days of attempts all I can get is Access Denied. I have been working with variations of the following code and also tried using OpenSSL.Net and AWSSDK but that does not have a sign method for RSA-SHA1 yet. The signature (data) looks like this {"Statement":[{"Resource":"http://xxxx.cloudfront.net/xxxx.jpg","Condition":?{"DateLessThan":?{"AWS:EpochTime":1266922799}}}]} This method attempts to sign the signature for use in the canned url. So of the variations have included chanding the padding used in the has and also reversing the byte[] before signing as apprently OpenSSL do it this way. public string Sign(string data) { using (SHA1Managed SHA1 = new SHA1Managed()) { RSACryptoServiceProvider provider = new RSACryptoServiceProvider(); RSACryptoServiceProvider.UseMachineKeyStore = false; // Amazon PEM converted to XML using OpenSslKey provider.FromXmlString("<RSAKeyValue><Modulus>....."); byte[] plainbytes = System.Text.Encoding.UTF8.GetBytes(data); byte[] hash = SHA1.ComputeHash(plainbytes); //Array.Reverse(sig); // I have see some examples that reverse the hash byte[] sig = provider.SignHash(hash, "SHA1"); return Convert.ToBase64String(sig); } } Its useful to note that I have verified the content is setup correctly in S3 and CloudFront by generating a CloudFront canned policy url using my CloudBerry Explorer. How do they do it? Any ideas would be much appreciated. Thanks

    Read the article

  • json_encode with mysql content and umlauts in utf-8

    - by i3rutus
    Hey, i feel my beard growing while trying to find out the Problem here. Basic the Problem is, that Umlauts/Special Signs äöß ... don't work. I guess everyone is sick and tired of that questions but all the solutions found online don't seem to work. Im having utf-8 content in a utf-8 Mysql Database. I feel the Problem ist somewhere in the Database connection but i just can't figure out. character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_filesystem binary character_set_results utf8 character_set_server latin1 character_set_system utf8 Im not sure if the problem is the latin1 for character_set_server because im not into that mysql stuff. I also dont know how to change cause i can't access the mysql server's config files. Whatever is confusing me, that if i get my results from the Database and echo it, print_r gives the right result. ini_set('default_charset','utf-8'); header('Content-Type: text/plain; > charset=utf-8'); Firefox says char encode is utf-8 but if when i output: print_r($listnew); echo json_encode($listnew[5]); print_r results everything right but json_encode does wrong. print_r: [5] => Array ( [id] => 5 [data] => U-Bahnhof Theresienstraße [size] => 17 ) json_encode: {"id":5,"data":"U-Bahnhof Theresienstra\u00dfe","size":17} i know json_encode needs a utf-8 string to work properly there and i feel im having a encode trouble here but i just can't firgure out where it is. Any help would be appreciated, thanks in advance. i3

    Read the article

  • Container/Wrapper Div does not contain all content?

    - by Imran
    Container/Wrapper Div does not contain all content (ie all the child Div's).I've tried overflow: hidden but still doesn't work. Can someone please tell me why this is happening and what are the possible solutions. Thank you in advance ;-) for some reason the whole code does not display?? <html> <head> <style type="text/css"> #wrapper { margin:0 auto; width: 600px; background: yellow; } </style> </head> <body> <div id="wrapper"> <div="header"> <h1>my beautiful site</h1> </div> <div id="navigation"> <ul> <li><a href="#">Home </li> <li><a href="#">About</li> <li><a href="#">Services</li> <li><a href="#">Contact us </li> </ul> </div> <div id ="content"> <h2> subheading<h2> <p> long paragraph </p> </div> <div id ="footer"> copyright 123 </div> </div> </body> </html>

    Read the article

  • «HTTP::Message content must be bytes» error when trying to post

    - by ZyX
    I have the following code: ... sub setImage { my $self=shift; my $filename=shift; unless(-r $filename) { warn "File $filename not found"; return; } my $imgn=shift; my $operation=&URI::Escape::uri_escape_utf8( (shift) ? "???????! (Delete)" : "?????????! (Store)"); my $FH=&::File::open($filename, 0, 0); my $image; # &utf8::downgrade($image); sysread($FH, $image, 102400, 0); close $FH; my $imginfo=eval{&Image::Info::image_info(\$image)}; if($@ or $imginfo->{"error"}) { warn "Invalid image: ".($@ || $imginfo->{"error"}); return undef; } my $fields=[ DIR => $self->url("fl"), OPERATION => $operation, FILE_NAME => ".photo$imgn", # FILE => [$filename], FILE => [undef, "image.".$imginfo->{"file_ext"}, # Content_Type => $imginfo->{"file_media_type"}, # Content_Type => 'application/octet-stream', Content => $image, ], ]; my $response=&ZLR::UA::post( &ZLR::UA::absURL("/cgi-bin/file_manager")."", $fields, Content_Type => "form-data", ); print $response->decoded_content; } ... When I try to use function setImage it fails with error HTTP::Message content must be bytes at /usr/lib64/perl5/vendor_perl/5.8.8/HTTP/Request/Common.pm line 91. Worse that I can't reproduce this error without using all of my code and upgrading libwww-perl does nothing. What can cause it?

    Read the article

  • Possible to programatically access X-Mms-Content-Location?

    - by Brad Hein
    Is it possible to access the X-Mms-Content-Location attribute of a message from a MMS message programatically, using the Android SDK? This is one example of the error that I am investigating. If I can access that attribute, then I may be able to code an app which repairs it so the message retrieval succeeds. 04-26 19:11:35.573 V/RetrieveTransaction( 299): X-Mms-Content-Location: http://69.78.70..70/servlets/mms?message-id=<GUID_REMOVED_FOR_PRIVACY> <snip> 04-26 19:11:35.783 I/InetAddress( 299): Unknown host 69.78.70..70, throwing UnknownHostException 04-26 19:11:35.793 V/RetrieveTransaction( 299): Unexpected IOException. 04-26 19:11:35.793 V/RetrieveTransaction( 299): java.io.IOException: Cannot establish route for http://69.78.70..70/servlets/mms?message-id=<GUID_REMOVED_FOR_PRIVACY>: Unknown host 04-26 19:11:35.793 V/RetrieveTransaction( 299): at com.android.mms.transaction.Transaction.ensureRouteToHost(Transaction.java:206) 04-26 19:11:35.793 V/RetrieveTransaction( 299): at com.android.mms.transaction.Transaction.getPdu(Transaction.java:171) 04-26 19:11:35.793 V/RetrieveTransaction( 299): at com.android.mms.transaction.RetrieveTransaction.run(RetrieveTransaction.java:147) 04-26 19:11:35.793 V/RetrieveTransaction( 299): at java.lang.Thread.run(Thread.java:1058) 04-26 19:11:35.793 E/RetrieveTransaction( 299): Retrieval failed.

    Read the article

  • Default values for Content Taxonomy fields in Drupal with Hierarchical Select widget

    - by lazysoundsystem
    I'm trying to set the default value for a Content Taxonomy field in a hook_form_alter, but can't pin down the necessary format. I've tried this and many variations: foreach (element_children($form) as $child) { // Set $default_value. if ($form[$child]['tids']) { // This, for Content Taxonomy fields, isn't working: $form[$child]['tids']['#default_value'] = array('value' => $default_value); dsm($form[$child]['tids']['#default_value']); } else { // This, for other fields, is working: $form[$child][0]['#default_value']['value'] = $default_value; } } Can anyone tell me what I'm missing? Edit: In response to Henrik Opel (thanks for getting involved), here is the print out of the relevant field of the form with my changes to the default fields commented out, showing the '#default_value' field I'm trying to influence. It also shows that the option widget I'm using is Hierarchical Select (could this be a factor?). In the dsm() in the code above, the changes to the default value are recognised, but they don't get processed later on. field_name_of_content_taxonomy_field (Array, 3 elements) #tree (Boolean) TRUE #weight (String, 1 characters ) 5 tids (Array, 7 elements) #title (String, 10 characters ) Vocabulary_name #type (String, 19 characters ) hierarchical_select #weight (String, 1 characters ) 5 #config (Array, 15 elements) // 15 elements here #required (String, 1 characters ) 0 #description (String, 0 characters ) #default_value (Array, 0 elements)

    Read the article

  • Jquery event to fire in ajax loaded content, IE & FF problem

    - by Sylph
    Hello, I'm trying to trigger onclick events in an ajax loaded content but it doesn't seem to work. Here is my code :- <li><a href="#" id="subtopic">Title</a></li> <script type="text/javascript"> $(function() { $("#subtopic").click(function() { url: test.html ,success: function(data) { $('#result').html(data); $(".filetree").treeview(); $('#result').click(); $('#result').trigger("update"); } }); }); }); </script> In my loaded content, :- <a href="#" id="addSubTopic">Click here</a> <script type="text/javascript"> $(document).ready(function() { alert("000"); }); $(function() { $("#addSubTopic").click(function() { alert("0"); $.ajax({ url: url, success: function(data) { $("#listRes").append(data); } }); }); }); </script> In IE, it works fine, the click works and I can get the "alert" but in Firefox, the whole thing just go dead. However, my jquery plugin for $(".filetree").treeview(); works fine for both IE and FF. Any advice? I have tried using .live, .trigger("update"). Thanks in advance

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >