In smarty is it possible or is there any kind of function to render a template and return the result?
for example:
$rendered_content = $smarty->render("content.html")
I'm wondering if you have one, or u know any developer/programmer online portofolio. I know many web developers have one (and in many cases very well designed), but not any C++ developer (for example). On the net there are only some good blogs about some programming language, but in many cases these are extremely poor from a design point of view and i'd say very "nerdy".
Hello. I've got a new project, and currently I'm trying to set it correctly. But somehow I can't make my media files work. Here's my current setting :
MEDIA_ROOT = os.path.normpath( '/home/budzyk/rails/fandrive/site_media/' )
templates setting work on the other hand :
TEMPLATE_DIRS = (
"/home/budzyk/rails/fandrive/templates",
)
Catalog with media files is ../fandrive/site-media/ so why it's not working ? Here's my base.html template with styles imported, and firebug window when my page is loaded :
<head>
<title>{% block title %}{% endblock %}</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/style.css" />
{% block pagecss %}{% endblock %}
<script type="text/javascript" src="{{ MEDIA_URL }}jquery/jquery-1.4.2.min.js"></script>
</head>
<body>
<div id="wrapper">
http://img237.imageshack.us/img237/4909/21205809.jpg
If I have several OS-X Terminal.app windows open, how can I move one Terminal window to another space?
I'm happy to use any scripting or programming language to achieve this, but would prefer AppleScript or calls to standard frameworks.
(Note this is to move only one window of an application not all windows.)
Im using the MbMenu jQuery plugin.
http://plugins.jquery.com/project/mbMenu
http://pupunzi.open-lab.com/2009/01/18/mbmenu/
I am probably being ridiculously stupid but I wish to have multiple menus on the same page, but not load them from external files (the html structure of the menu already exists on the page).
To me the only place you define what menu is linked to the element you call buildMenu on is the 'template' construction which is a external file.
Thanks.
I am a beginner in Android programming. I want to build a simple application with a main list view in the screen and two buttons at the bottom of the screen.
When more items are added to the list view, the list view should scroll without increasing the overall length of the list view.
Hello I have both Rails2 and Rails3(beta 3) installed by Ruby Gems. Everything right now defaults to using Rails3. For instance rails myproject will create a new Rails3 template. How do I override this so everything goes to Rails2?
Here's my code. It compiles in VS2005 but not in gcc. Any ideas
template<class T>
Derived<T>::Derived(const Derived<T>& in)
{
Base<T>::Base<T>(in); //ERROR here
}
"expected primary-expression before token"
For many questions, especially for C-related ones, the answer seems to be found in "the standard". However, where do we find that - online?
Googling can sometimes feel futile, again especially for the C standards, since they are drowned in the flood of discussions on programming forums ;)
To get this started, since these are the ones I am searching for right now, where are there good online resources for:
C89
C99
C++03
I came upon Smarty which is a template engine. But there are also the Zend, CakePHP frameworks. Is Smarty like Zend, or are they completely different? Smarty just separates logic from display - is this similar to a framework like Zend?
Say I'm using a form with a text-field.
<@s.form action="login"
<@s.textfield label="E-mail" name="email"/
<@s.submit value="send"/
How can I specify that the text-form should be generated by a custom template (text_login.ftl) rather than the standard text.ftl?
As far as I understand, the "Getting Started" guide of GAE with Python uses the webapp framework. However, it seems like it uses Django to render templates.
Does that mean that I can use the Django template engine without using its application framework?
I'm trying to figure out if
g++ -fsyntax-only
does only syntax checking or if it expands templates too.
Thus, I ask stack overflow for help:
is there to write a program so that syntactically it's valid, but when template expansion is done, an error occurs?
Thanks!
I have a UIWebView inside a normal UIViewController. The content of the UIWebView is programming/dynamically created in my program, and it could be very long (multiple table rows). Somehow, after loading, the page won't scroll more then one and half screen of content when swipe on the screen. Because of that I can only see the beginning few rows of data, but not the many others after them. Why is that?
Hi,
Is there any way to change backlight turn off TIME using programming(Preferred c# or vb.net other c++ can be used too)? I guess, may be it is changed using registry info or API.
Manually, it is done by:
Setting Backlight (Battery Power and External Power)
Thank you
I have made a build system for my web application that's rewriting all resource url's to include the file's revision number (to improve client caching). As of today I'm running this command for each file to get the revision number:
hg log --template '{rev}\n' path-to-file
Executing hg for each file is really time consuming. Is there a fast way to list all files in a repository with the latest revision number?
I'm working in VS2008 and C#, and I'm looking for a (free) code generator tool to generate a property with getter and setter, as well as the backing private field to go with. The template thingy in VS does not make the field to go with it. Just looking for something a little bit better.
I once saw a web site where you could build this code, then cust-and-paste it from the web page to your code.
I have something of a a hairy problem, I'd like to generate a couple of paragraphs of "description" of a given url, normally the start of an article. The Meta description field is one way to go but it isn't always good or set properly.
It's fair to say it's a bit problematic to accomplish this from the screenscraped HTML. I had a general idea that perhaps one could scan the HTML for the first "appropriate" segment but it's hard to say what that is, perhaps something like the first paragraph containing a certain amount of text...
Anyone have any good ideas? :) It doesn't have to be foolproof
Please forgive my programming knowledge. I know this is a simple thing, but I do not understand why result is always 0. Why decimal will be fine?
int a = 100;
int b = 200;
decimal c = (a / b) * 100;
Many thanks.
When programming, I would like to split one large file(which contains main function) to many small files, so there is one common case: functions in small files can modify the var from main file, so i think extern is very useful!
for instance:
in main.c
extern int i = 100;
in small.c
extern int i;
fprintf(stdout, "var from main file: %d\n", i);
I just want to know is my understanding right?
the following is the code. but it doesn't work. what's wrong with it? thank you.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>no title</title>
<script type="text/javascript">
function copyToClipBoard(content){
var clipBoardContent = '';
clipBoardContent = content;
window.clipboardData.setData("Text",clipBoardContent);
alert('have copied to the clipboard');
}
<body>
<textarea rows="4" cols="60" id="url">www.example.com</textarea>
<input type="button" value="click me" onclick="copyToClibBoard (document.getElementById ('url').value);" />
</body>
I have couple of copyright videos available on my S3 buckets. I want to stream them on my website, but at the same time. I don't want the users to rip the video from the video player.
I tried to google about it but still i am not confident on this, coz i do not know the intricacies of
options available like
Server Side encryption None/ AES-256
2) A very interesting option is under Metadata tab - It shows couple of keys & Values. How can i use them to secure my video content?
3) Add more meta data and related options?
I am looking to get into web application development. I am an undergrad CS major with experience in programming desktop apps, but with only basic knowledge regarding how web apps work. Any suggestions of where to start? Javascript, php, perl, ruby, python? Should I look into frameworks like django, seaside, ruby on rails, etc at first or wait until I am more experienced to use those?
I'm a blind student currently in a system admin/shell programming class. Although ssh works fine for executing commands like ls, pwd, etc editors do not work well with my screen reader and an ssh session. I was wondering if it is possible to mount a Linux folder over ssh so it appears as a windows drive? This way I could edit any files I needed to with accessible software and not have to constantly use SCP to send files back and fourth.