Do you need to create Dynamic Where Clauses at runtime? No need to use string concatenation with SQL, LINQ is fully capable of performing the same task.
Most of the websites that you can find online today are either dynamic or static websites. Both these techniques of have certain advantages and disadvantages based on which they are chosen. The righ... [Author: Alan Smith - Web Design and Development - June 06, 2010]
<b>Developer.com:</b> "The cloud isn't just for network administrators looking for scale, it's also a key development area for developers building applications with open source dynamic languages."
A Web site developer using PHP will include PHP script/code within the XHTML/HTML code of a web page. The PHP script/code can do many things that make a Web site dynamic, rather than static.
Nowadays, the challenge for good programmers to create a highly dynamic website is really high. A lot of people have learned the value of owning a website especially for online business owners.
Hello Friends,
Actually I am working on Pdf by using IReport Software. This software provided two detail section but i want this two detail section with Column Header .then say me how i changes it
reply me on [email protected]
I am new Pentaho Reporting Tool. I have the following question:
When I created a report using Pentaho Report Designer, it output a report file having .prpt extension. After that I found an example on internet where the following code were used to display the report in html format:|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
ResourceManager manager = new ResourceManager();
manager.registerDefaults();
String reportPath = "file:" +
this.getServletContext().getRealPath("sampleReport.prpt");
try {
Resource res = manager.createDirectly(new URL(reportPath), MasterReport.class);
MasterReport report = (MasterReport) res.getResource();
HtmlReportUtil.createStreamHTML(report, response.getOutputStream());
} catch (Exception e) {
e.printStackTrace();
}
}
And the report got printed successfully. So as we haven't specified any datasource information here, I think that the .prpt file contains that information in it.
If that's true than Isn't Jasper is better Reporting tool than Pentaho because when we display Jasper reports, we have to provide datasource details also so in that way our report is flexible and is not bound to any particular database.
For my programming languages class one hw problem asks:
Are local variables in FORTRAN static or stack dynamic? Are local variables that are INITIALIZED to a default value static or stack dynamic? Show me some code with an explanation to back up your answer. Hint: The easiest way to check this is to have your program test the history sensitivity of a subprogram. Look at what happens when you initialize the local variable to a value and when you don’t. You may need to call more than one subprogram to lock in your answer with confidence.
I wrote a few subroutines:
- create a variable
- print the variable
- initialize the variable to a value
- print the variable again
Each successive call to the subroutine prints out the same random value for the variable when it is uninitialized and then it prints out the initialized value.
What is this random value when the variable is uninitialized?
Does this mean Fortran uses the same memory location for each call to the subroutine or it dynamically creates space and initializes the variable randomly?
My second subroutine also creates a variable, but then calls the first subroutine. The result is the same except the random number printed of the uninitialized variable is different. I am very confused. Please help!
Thank you so much.
This is a purely theoretical question (at least until I start trying to implement it) but here goes.
I wrote a web form a long time ago which has a configurable section for getting information. Basically for some customers there are no fields, for other customers there are up to 20 fields. I got it working by dynamically creating the fields at just the right time in the page lifecycle and going through a lot of headaches.
2 years later, I need to make some pretty big updates to this web form and there are some nifty new technologies. I've worked with ASP.NET Dynamic Data just a bit and, well, I half-crazed plan just occurred to me:
The Ticket object has a one-to-many relationship to ExtendedField, we'll call that relationship Fields for brevity.
Using that, the idea would be to create a FieldTemplate that dynamically generated the list of fields and displayed it.
The big questions here would probably be:
1) Can a single field template resolve to multiple web controls without breaking things?
2) Can dynamic data handle updating/inserting multiple rows in such a fashion?
3) There was a third question I had a few minutes ago, but coworkers interrupted me and I forgot. So now the third question is: what is the third question?
So basically, does this sound like it could work or am I missing a better/more obvious solution?
I've seen a very interesting post on Fabio Maulo's blog. Here's the code and the bug if you don't want to jump to the url. I defined a new generic class like so:
public class TableStorageInitializer<TTableEntity> where TTableEntity : class, new()
{
public void Initialize()
{
InitializeInstance(new TTableEntity());
}
public void InitializeInstance(dynamic entity)
{
entity.PartitionKey = Guid.NewGuid().ToString();
entity.RowKey = Guid.NewGuid().ToString();
}
}
Note that InitializeInstance accepts one parameter, which is of type dynamic. Now to test this class, I defined another class that is nested inside my main Program class like so:
class Program
{
static void Main(string[] args)
{
TableStorageInitializer<MyClass> x = new TableStorageInitializer<MyClass>();
x.Initialize();
}
private class MyClass
{
public string PartitionKey { get; set; }
public string RowKey { get; set; }
public DateTime Timestamp { get; set; }
}
}
Note: the inner class "MyClass" is declared private.
Now if i run this code I get a "Microsoft.CSharp.RuntimeBinder.RuntimeBinderException" on the line "entity.PartitionKey = Guide.NewGuid().ToString()".
The interesting part, though is that the message of the exception says "Object doesn't contain a definition for PartitionKey".
Also note that if you changed the modifier of the nested class to public, the code will execute with no problems. So what do you guys think is really happening under the hood? Please refer to any documentation -of course if this is documented anywhere- that you may find?
Hello,
I have a dynamic chained select box that I am attempting to show the value of on a page load. In my chained select box, it will default to the first option within the select box on page load, could anyone provide assitance?
I stumbled upon this thread, but I can't seem to translate what they are doing with that answer to my language of CF.
Dynamic chained drop downs on page refresh
Here is the JS script I am using.
function dynamicSelect(id1, id2) {
// Feature test to see if there is enough W3C DOM support
if (document.getElementById && document.getElementsByTagName) {
// Obtain references to both select boxes
var sel1 = document.getElementById(id1);
var sel2 = document.getElementById(id2);
// Clone the dynamic select box
var clone = sel2.cloneNode(true);
// Obtain references to all cloned options
var clonedOptions = clone.getElementsByTagName("option");
// Onload init: call a generic function to display the related options in the dynamic select box
refreshDynamicSelectOptions(sel1, sel2, clonedOptions);
// Onchange of the main select box: call a generic function to display the related options in the dynamic select box
sel1.onchange = function() {
refreshDynamicSelectOptions(sel1, sel2, clonedOptions);
}
}
}
function refreshDynamicSelectOptions(sel1, sel2, clonedOptions) {
// Delete all options of the dynamic select box
while (sel2.options.length) {
sel2.remove(0);
}
// Create regular expression objects for "select" and the value of the selected option of the main select box as class names
var pattern1 = /( |^)(select)( |$)/;
var pattern2 = new RegExp("( |^)(" + sel1.options[sel1.selectedIndex].value + ")( |$)");
// Iterate through all cloned options
for (var i = 0; i < clonedOptions.length; i++) {
// If the classname of a cloned option either equals "select" or equals the value of the selected option of the main select box
if (clonedOptions[i].className.match(pattern1) || clonedOptions[i].className.match(pattern2)) {
// Clone the option from the hidden option pool and append it to the dynamic select box
sel2.appendChild(clonedOptions[i].cloneNode(true));
}
}
}
Thanks so much for any assistance
I have done lots breadcrumb kind of things in normal asp.net web forms I was looking for same for asp.net mvc. After searching on internet I have found one great nuget package for mvpsite map provider which can be easily implemented via site map provider. So let’s check how its works. I have create a new MVC 3 web application called breadcrumb and now I am adding a reference of site map provider via nuget package like following. You can find more information about MVC sitemap provider on following URL. https://github.com/maartenba/MvcSiteMapProvid So once you add site map provider. You will find a Mvc.SiteMap file like following. And following is content of that file. <?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0"
xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0 MvcSiteMapSchema.xsd"
enableLocalization="true">
<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="About" controller="Home" action="About"/>
</mvcSiteMapNode>
</mvcSiteMap>
So now we have added site map so now its time to make breadcrumb dynamic. So as we all know that with in the standard asp.net mvc template we have action link by default for Home and About like following.
<div id="menucontainer">
<ul id="menu">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
</ul>
</div>
Now I want to replace that with our sitemap provider and make it dynamic so I have added the following code.
<div id="menucontainer">
@Html.MvcSiteMap().Menu(true)
</div>
That’s it. This is the magic code @Html.MvcSiteMap will dynamically create breadcrumb for you. Now let’s run this in browser. You can see that it has created breadcrumb dynamically without writing any action link code.
So here you can see with MvcSiteMap provider we don’t have to write any code we just need to add menu syntax and rest it will do automatically. That’s it. Hope you liked it. Stay tuned for more till then happy programming.
Hi, I have this scenario...
1.- I'm providing a "Dynamic Table" for wich users can define Fields. Each Dynamic Table will have as many rows/records as needed, but the Field definitions are centralized.
2.- My Dynamic Row/Record class was inherited from the .NET DLR DynamicObject class, and the underlying storage was a List appropriately associated to the defining fields. Everything works fine! BUT...
3.- Because I need to Serialize the content, and DynamicObject is not Serializable, I was forced to generate and carry a Dynamic Object when dynamic member access is required. But this is ugly and redundant.
So, I need to implement IDynamicMetaObjectProvider myself to achieve dynamic access and serialization together.
After googling/binging unsuccessfully I ask for your help...
Can anybody please give a good example (or related link) for doing that?
I have a procedure:
var Edit = (from R in Linq.Products
where R.ID == RecordID
select R).Single();
That I would like to make "Linq.Products" Dynamic. Something like:
protected void Page_Load(object sender, EventArgs e)
{
something(Linq.Products);
}
public void something(Object MyObject)
{
System.Data.Linq.Table<Product> Dynamic =
(System.Data.Linq.Table<Product>)MyObject;
var Edit = (from R in Dynamic
where R.ID == RecordID
select R).Single();
My problem is that I my "something" method will not be able to know what table has been sent to it. so the static line:
System.Data.Linq.Table Dynamic = (System.Data.Linq.Table)MyObject;
Would have to reflect somthing like:
System.Data.Linq.Table Dynamic = (System.Data.Linq.Table)MyObject;
With being a dynamic catch all variable so that Linq can just execute the code just like I hand coded it statically. I have been pulling my hair out with this one. Please help.
Long story short I'm quite confused as to exactly what is offered by domain registration and dns service sites.
When I go to the url "http://google.com", my PC connects to a name server and gets the IP for "google.com", then connects to the IP and says, give me the page for "http://google.com". AFAIK there are many name servers and they all cache these bits of information in some hierarchical network, but ultimately a DNS record must come from a single source (not sure what this is called). There are different kinds of records, that might not an IP but an alias/redirect to other records for example.
Lets say I want my own domain name for some server. Maybe it even has a static IP but I want a nicer thing for people to remember, or my ISP assigns dynamic IPs and I want a URL that always works, or my website is hosted on a shared machine so the browser needs to send "http://mydnsname.com" to the webserver to distinguish it from other requests to the same IP but for different sites.
Registering a domain costs a small amount of money per year. Where does this money go, not that I'm complaining :P? Is that really all it costs to maintain the entire DNS system of nameservers? If I just register the domain and nothing else, what do I get? Is that just reserving a name or hosting WHOIS information or have I paid for a dns recrord to be hosted? Can a domain alone have a record, such as an IP or be an alias to another?
A bunch of sites out there offer other services, in addition to domain registration (I'm assuming they register the domain through another party for me). One example is "dynamic DNS" (DDNS), but isn't this just a regular DNS record that's updated regularly? Does it cost extra to update more often? Without a DDNS, can a DNS record still point to an IP? I've also seen the term "managed DNS" and have no idea where that fits in.
What I am planning to do is have the models (or maybe just an identifier for the model to be used) stored outside of the directX9 framework, and so in nature have completely dynamic rendering.
All of the information that I have found contains static rendering (rendering models that are stored in memory at specific positions)
I would like information on how to take a model (or identifier for a model type) that is stored outside of the framework, and render it to the screen. I am expected to take a container that holds all the relevant data to be rendered.
The information outside would hold the position, orientation (quaternion, though I am told that I can also get a rotation matrix if I prefer), and dimensions (scale)
In an average game, there are hundreds or maybe thousands of objects in the scene.
Is it completely correct to allocate memory for all objects, including gun shots (bullets), dynamically via default new()?
Should I create any memory pool for dynamic allocation, or is there no need to bother with this? What if the target platform are mobile devices?
Is there a need for a memory manager in a mobile game, please? Thank you.
Language Used: C++;
Currently developed under Windows, but planned to be ported later.
Comparing WPF and Asp.Net Razor/HtmlHelper I find WPF/Xaml to be somewhat lacking in creating views.
With HtmlHelpers you could define in one place how you wan't to represent specific type of data and include elements set from the DataAnnotations of the property.
In WPF you can also define DataTemplates for data but it seems much more limited then EditorTemplates. It doesn't use information from DataAnnotations.
Also the layout of elements can be bothersome. I hate having to constantly add RowDefinitions and update the Grid.Row attribute of lot of elements when I add a new property somewhere in line.
I understand that GUI programming can be a lot of grunt work like this but as Asp.Net MVC has shown there are ways around that.
What solutions are out there to make view creation in WPF a little bit cleaner, maintainable and more dynamic?
I want to set a buffer that is updated every frame but can't figure it out, what i have to do.
The only working thing i have is this:
mdexcription = new BufferDescription(Matrix.SizeInBytes * Matrices.Length, ResourceUsage.Dynamic, BindFlags.VertexBuffer, CpuAccessFlags.Write, ResourceOptionFlags.None, 0);
instanceBuffer = SharpDX.Direct3D11.Buffer.Create(Device, Matrices, mdexcription);
vBB = new VertexBufferBinding(instanceBuffer, Matrix.SizeInBytes, 0);
DeviceContext.InputAssembler.SetVertexBuffers(1, vBB);
Draw:
//Change Matrices (Matrix[]) every frame...
instanceBuffer.Dispose();
instanceBuffer = SharpDX.Direct3D11.Buffer.Create(Device, Matrices, mdexcription);
vBB = new VertexBufferBinding(instanceBuffer, Matrix.SizeInBytes, 0);
DeviceContext.InputAssembler.SetVertexBuffers(1, vBB);
I guess Dispose() and creating a new buffer is slow and can be done much faster.
I've read about DataStream but i do not know, how to set this up properly.
What steps do i have to do to set up a DataStream to achieve fast every-frame update?
I have a website with dynamic content and different kind of pages. I have some pages that rarely change, and I have pages like blogs that change often. The blog pages also have links for sorting, for example sorting on date, asc, desc.
On some of the pages I also have links to different tabbed content, and links that are just anchor links.
Now when I use a xml sitemap generator then all the links are thrown into the site, and so I don't think all the links are really relevant.
The blogposts up until now are also taken into the sitemap. Is this really necessary? I think the links to the blogposts can be indexed just fine.
Is the best way to make a sitemap just to manually assign the main menu links to the sitemap, or is indexing everything really recommended?
I've been building web apps that add and remove lots of dynamic content and even structure within the page, and I'm not impressed by the method I'm using to do it.
When I want to add a section or module into a position in the interface, I'm storing the html in the code, and I don't like that:
if (rank == "moderator") {
$("#header").append('<div class="mod_controls">' +
// content, using + to implement line breaks
'</div>');
}
This seems like such a bad programming practice.. There must be a better way. I thought of building a function to convert a JSON structure to html, but it seems like overkill.
For the functionality of the apps I'm using:
Node.js
JS
JQuery
AJAX
Is there some common way to store HTML modules externally for AJAX importation?
Report Markup Language is an XML-style language for creating PDF documents.
We've just written a sample ASP.NET project demonstrating how to use
ReportLab's RML2PDF to create PDF documents from inside your .NET
project.
Create great looking custom dynamic PDFs from your website or application with the minimum of fuss.
Download the sample project from here:
RML with Microsoft .NET...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I need dynamic dijkstra algorithm that can update itself when edge's cost is changed without a full recalculation. Full recalculation is not an option.
I've tryed to "brew" my own implemantion with no success. I've also tryed to find on the Internet but found nothing.
A link to an article explaining the algorithm or even it's name will be good.
Edit:
Thanks everyone for answering. I managed to make algorithm of my own that runs in O(V+E) time, if anyone wishes to know the algorithm just say so and I will post it.
I am experiencing annoying automatic backlight brightness changes under ubuntu 12.04 LTS on my Dell XPS ultrabook.
It seems to be connected to the amount of white pixels on the screen (switching back an forth between dark/light application windows makes the effect noticable, but also just scrolling through a website.) So I think it is the dynamic contrast feature of the notebook screen.
How do I turn this off in Ubuntu?
Windows offers specific Intel driver options for this, but I can't find any for Ubuntu.
EDIT: Model: Dell XPS 14 Ultrabook and currently running Unity
I have a website with dynamic content and different kind of pages. I have some pages that rarely change, and I have pages like blogs that change often. The blog pages also have links for sorting, for example sorting on date, asc, desc.
On some of the pages I also have links to different tabbed content, and links that are just anchor links.
Now when I use a xml sitemap generator then all the links are thrown into the site, and so I don't think all the links are really relevant.
The blogposts up until now are also taken into the sitemap. Is this really necessary? I think the links to the blogposts can be indexed just fine.
Is the best way to make a sitemap just to manually assign the main menu links to the sitemap, or is indexing everything really recommended?