Hi,
I'm having trouble inserting facts into an existing prolog file, without overwriting the original contents.
Suppose I have a file test.pl:
:- dynamic born/2.
born(john,london).
born(tim,manchester).
If I load this in prolog, and I assert more facts:
| ?- assert(born(laura,kent)).
yes
I'm aware I can save this by doing:
|?...
I'm trying to dynamically spawn a video element on a page using JavaScript.
JavaScript
<script type="text/javascript">
$(document).ready(function() {
var video = $(document.createElement('video'))
.attr('id', 'VideoElement')
.attr('controls', 'controls')
.attr('src', 'videopath.mp4') // Changed 'href' attribute to '...
Hi,
I want to generate a pdf report, where a column(or cell/field) is left blank(empty) on purpose. This column actually does have a value but, I'm choosing not to display it. The column title still needs to be displayed.
Example of where this could be useful:
Blank(empty) column: A comments or notes column down one side of a report....
I've to create a dynamic html table using the values configured in a table. I'm using JSP with MVC architecture.
I've a row number, column number and value fields in table. If the values are 1,5 and HELLO correspondingly, then I've to display this HELLO in row 1 and column 5.
The table structure is like the following.
row column va...
Hi,
I am trying to create a dynamic datagrid in Flex 3, I have a list of columns a list of objects which correspond to datapoints for those columns which I fetch from a url. While the grid works perfectly fine the problem is that sorting on the columns is done in lexical order.
I am aware that this can be fixed by adding a sortcomparef...
I have an array of checkboxes in a complex dynamic-html form. Whenever a user clicks one checkbox, a fairly expensive query is generated and submitted to a remote server.
I want to delay this submit action depending on the users next action. If the user clicks several checkboxes quickly, all of the first clicks should be discarded, only ...
i have a struct with dynamic length:
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct PktAck
{
public Int32 code;
[MarshalAs(UnmanagedType.LPStr)]
public string text;
}
when i'm converting bytes[] to struct by this code:
GCHandle handle = GCHandle.Alloc(bytes_array, GCHandleType.Pinned);
result_str...
Hi- I developed a band website using wordpress, and I placed a flash MP3 player that autoplays in the header. Whenever you click on a link, the entire page refreshes and the mp3 player starts playing the first song all over again. I wish to have the entire header including the mp3 player) stay constant while the content/sidebar/footer re...
Dear .Net Linq experts,
I am looking for a way to query for products in a catalog using filters on properties which have been assigned to the product based on the category to which the product belongs. So I have the following entities involved:
Products
-Id
-CategoryId
Categories
[Id]
Properties
[Id, CategoryId]
PropertyValues
...
I'd like to dynamically create a module from a dictionary, and I'm wondering if adding an element to sys.modules is really the best way to do this. EG
context = { a: 1, b: 2 }
import types
test_context_module = types.ModuleType('TestContext', 'Module created to provide a context for tests')
test_context_module.__dict__.update(context)
...
hi,
i made a class named x;
so i want to make array of it using dynamic allocation
x [] myobjects = new x();
but it gives me that error
Cannot implicitly convert type 'ObjAssig4.x' to 'ObjAssig4.x[]'
i know it's dump question but i am a beginner
thanks
...
I'm always writing tests to check my controller restricts people from certain actions depending on their status i.e. logged in, admin? etc
Regardless of whether its a get to :index or a puts to :create the code is always the same. I'm trying to refactor this so that i have one method such as
should_redirect_unauthenticated_to_login_ac...
I have the following partial. It can be called from three different times in a view as follows:
<%= render :partial => "contact_event",
:collection => @contacts,
:locals => {:event => email} %>
Second time:
<%= render :partial => "contact_event",
:collection => @contacts,
:locals => {:event => call} %>
...
Hi,
I would want to dynamically get the DOM structure (HTML source) of a web page. I want to do some manipulations with it later. Is this possible in javascript at all?
Thanks.
...
So I need to have an array of structs in a game I'm making - but I don't want to limit the array to a fixed size. I'm told there is a way to use realloc to make the array bigger when it needs to, but can't find any working examples of this.
Could someone please show me how to do this?
Thanks!
...
Not long time before I've discovered, that new dynamic keyword doesn't work well with the C#'s foreach statement:
using System;
sealed class Foo {
public struct FooEnumerator {
int value;
public bool MoveNext() { return true; }
public int Current { get { return value++; } }
}
public FooEnumerator Ge...
Hello,
I am working on a test project for an RSS reader. I am using Chilkat's module for .NET 3.5. What I am trying to do is this:
For each item in the RSS feed, I want to dynamically create some controls (labels) that contain stuff like the title, the link and the publication date.
The problem is that only the first control comes up ...
OK. It's an iPad app. Within the DetailViewController I have added a UIScrollView through IB and within that UIScrollView I have added a UIView (also added through IB) which holds various dynamically added UITableViews, UILabels and UIButtons.
My problem is that I'm getting errors on the UIButton clicks.
I have defined this method:
-...
Hey guys, I know this question has been brought up numerous times, but I'm not quite getting the full implementation. As you can see below, I've got a form that I can dynamically tell how many rows to create. How can I create an "Add Row" link that tells the view how many rows to create? I would really like to do it without augmenting th...
Hi, I have a problem with parameters replacing by Spring JdbcTemplate.
I have this query :
<bean id="fixQuery" class="java.lang.String">
<constructor-arg type="java.lang.String"
value="select fa.id, fi.? from fix_ambulation fa
left join fix_i18n fi
on fa.translation_id = fi.id order by name...