Questions tagged [partial]

Existing only in part; incomplete.

Existing only in part; incomplete.

1478 questions
15
votes
3 answers

is partial gz decompression possible?

For working with images that are stored as .gz files (my image processing software can read .gz files for shorter/smaller disk time/space) I need to check the header of each file. The header is just a small struct of a fixed size at the start of…
alle_meije
  • 2,424
  • 1
  • 19
  • 40
15
votes
5 answers

Pass Parameters in render - Rails 3

I've seen a couple questions on this but haven't been able to solve it... I'm trying to pass a parameter while rendering a partial (similar to domainname.com/memory_books/new?fbookupload=yes) Right now, I use this line: <%= render :partial =>…
user749798
  • 5,210
  • 10
  • 51
  • 85
14
votes
3 answers

MVC 3 Razor @Html.ValidationMessageFor not working in partial loaded via jquery.load()

I have put together a small example here just to replicate the problem. I have a strongly typed partial view _Name.cshtml: @model ValidationInPartial.ViewModels.MyViewModel

@ViewBag.Message

Name
Roberto D
  • 143
  • 1
  • 1
  • 5
13
votes
1 answer

How to render partial on the same page after clicking on link_to with AJAX

I have a list of customers. Every customer has a link, which links to the customers page and displays his data. I want to link to partial rendered on the same page below the table of customers. On initializing the "page" with the table, a blank page…
mahu
  • 297
  • 1
  • 3
  • 14
13
votes
2 answers

Why doesn't functools.partial return a real function (and how to create one that does)?

So I was playing around with currying functions in Python and one of the things that I noticed was that functools.partial returns a partial object rather than an actual function. One of the things that annoyed me about this was that if I did…
lazytype
  • 927
  • 6
  • 11
13
votes
5 answers

Partial application and closures

I was asked what's the relationship between partial function application and closures. I would say there isn't any, unless I'm missing the point. Let's say I'm writing in python and I have a very simple function MySum defined as follows: MySum =…
Eigendrea
  • 320
  • 4
  • 14
12
votes
3 answers

Nested BeginCollectionItem

I'm using Steve Sanderson's BeginCollectionItem approach to add dynamic content. Everything works fine when I'm doing it on the first level. However, when try to implement a nested collection meaning a BeginCollectionItem in another…
noobi
  • 605
  • 2
  • 7
  • 10
12
votes
5 answers

JAXB partial-unmarshalling Elements without @XMLRootElement

I am using the partial-unmarshalling example of JAXB, but I am unable to unmarshal XML-Elements which are not on the root-level (cause they don't have an @XmlRootElement tag). In my example I tried to read the shipTo-Element instead of the…
cloudnaut
  • 982
  • 3
  • 13
  • 35
12
votes
3 answers

python partial with keyword arguments

I have a function that takes 3 keyword parameters. It has default values for x and y and I would like to call the function for different values of z using map. When I run the code below I get the following error: foo() got multiple values for…
motam79
  • 3,542
  • 5
  • 34
  • 60
12
votes
2 answers

passing values to partial in rails 3

Here is how I pass the values/variable to the partial: <%= render "partials/banner", :locals => {:text_1 => t(:"main.home.banner_text_1"), :text_2 => t(:"main.home.banner_text_2") } %> then in the partial: …
bogumbiker
  • 437
  • 2
  • 5
  • 19
12
votes
1 answer

206 partial not caching

I'm having trouble figuring out what I need to set on my Partial Responses (206) in order for Google Chrome and Firefox to cache the byte data sent to the browser. Internet explorer seems happy with my headers, by from what I gather, Chrome is very…
11
votes
1 answer

Python typehint subset(partial) of an TypedDict

In typescript we have Partial type, so we can do this: interface Foo { x:number y:number } const foo:Partial = {x: 1} (With this we can make all properties of an interface optional) In Python, we could do this with a total=False, like…
vacih86456
  • 237
  • 1
  • 7
11
votes
1 answer

Why Partial accepts extra properties from another type?

Given interfaces A and B, which contain a x1 property in common interface A { a1: number; a2: number; x1: number; // <<<< } interface B{ b1: number; x1: number; // <<<< } And given the implementations a and b let a: A = {a1: 1, a2: 1,…
11
votes
4 answers

How to perform partial object serialization providing "paths" using Newtonsoft JSON.NET

I have a situation in which I have a very large C# object, however, I only need to return a handful of properties (which can be on nested objects), allow for client-side JavaScript to modify those properties and then send the resulting object back…
JFalcon
  • 179
  • 1
  • 10
11
votes
4 answers

Can Drupal's search module search for a substring? (Partial Search)

Drupal's core search module, only searches for keywords, e.g. "sandwich". Can I make it search with a substring e.g. "sandw" and return my sandwich-results? Maybe there is a plugin that does that?
Dan Albey
  • 559
  • 1
  • 8
  • 14