I am not usually a Smarty guy, so I'm a bit stuck.
I want to echo the index of an array, but I want to increment it each time I echo it.
This is what I have...
<ul>
{foreach from=$gallery key=index item=image}
<li>
<img src="{$image}" alt="" id="panel-{$index++}" />
</li>
{/foreach}
</ul>
…
I'd like a select box that will alert the value when the user selects the option. (in iPhone)
<select>
<option>
1
</option>
<option>
2
</option>
<option>
3
</option>
</select>
In my web browser on the desktop, I can do: onclick, but on the phone, onclick doesn't work.
Hi guys, basically I want my JFrame to become a completely new JFrame object when an event is triggered. I have some code that basically calls [CODE]GUI gui = new GUI(x, y)[/CODE]
the only problem I'm having is that as well as creating the new GUI object, it is not deleting the old window. Can anyone tell me how to get rid of the old window.
…
The title explains it well. I have set up Notepad++ to open the Python script in the command prompt when I press F8 but all Swedish characters looks messed up when opening in CMD but perfectly fine in e.g IDLE.
This simple example code:
#!/usr/bin/env python
#-*- coding: UTF-8 -*-
print "åäö"
Looks like this.
As you can see the output of…
I played with HttpRequest and realized that the memory is not cleaned up after any request.
After some time the running tab within Chrome will crash.
Here is some testing code. Put a large sized file into the 'www' directory and set the URL in the code accordingly.
import 'dart:async';
import 'dart:html';
void main() {
const PATH =…
I'm using sqlite for the persistent store, so could I just upload the .sqlite file to, for example, Amazon S3 as a way of providing users with the ability to backup their app data?
Then for restoring just download it back and replace the existing .sqlite file in the app's folder.
Does anybody see any issues with that? Has anyone done…
Why can't I use code like this ?
1
int i = 0;
try i = int.Parse("qwerty");
catch throw;
2
try i = int.Parse("qwerty");
catch;
finally Log.Write("error");
And should write like this
1
int i = 0;
try { i = int.Parse("qwerty"); } catch { throw; }
2
try { i = int.Parse("qwerty");}
catch {}
finally {Log.Write("error");}
PS:…
Hello,
is there a way (settings? "macro"? extension?) that I can simply toggle outlining so that only the using section and my methods collapse to their signature line, but my comments (summary and double slash comments) and classes stay expanded?
Examples:
1) Uncollapsed
using System;
using MachineGun;
namespace Animals
{
…
I've all this kind of functions.
ssize_t fuc1(int var1, void *buf, size_t count);
int func2(char *charPtr, int mode, int dev);
short func3( long var2);
problem is that data types in C has different sizes when compiled on different machines(64bit & 32bit). This is true for even void*. For some reasons. I need to ensure that…
I have a sequence of 16 elements: 1,2,3,..., 16 ( or 2*n elements). Sequence elements always goes from 1 to length(sequence) that is sequence of 4 elements is 1,2,3,4.
I want to write an algorithm which divide elements into pairs. For Example,
1-15
2-16
3-13
4-9
5-14
6-10
7-11
8-12
PS: no linq please :)
Usually in my PHP apps I have a base URL setup so I can do things like this
<a href="<?php echo BASE_URL; ?>tom/jones">Tom</a>
Then I can move my site from development to production and swap it easily and have the change go site wide (and it seems more reliable than <base href="" />.
I'm doing up a…
hi,
I am beginner in web designing, I using CLASSIC ASP for web development.
My client need his website in two languages (Arabic and English).
What is the best way for develop website in multiple language?
I read some information from website's :-
Create website in two lanuages. for example (www.example.com/English/)and…
Suppose I have a column with words:
orange
grape
orange
orange
apple
orange
grape
banana
How do I execute a query to get the top 10 words, as well as their count?
im trying to embed flash in my program by placing flash.ocx in my app's folder without having to register it. i found DirectCom.dll and with this code i can show the right version of flash.
but how do i show it on the form and load the movie?
Private Declare Function GetInstanceOld Lib "DirectCom" Alias "GETINSTANCE" (FName…
I'm trying to do something like this:
private class aClass
{
private ArrayList<String> idProd;
aClass(ArrayList<String> prd)
{
this.idProd=new ArrayList<String>(prd);
}
public ArrayList<String> getIdProd()
{
return this.idProd;
}
}
So if I have multiple instances of…
I have a comma-separated list of values, for example:
strins s = "param1=true;param2=4;param3=2.0f;param4=sometext;";
I need a functions:
public bool ExtractBool(string parameterName, string @params);
public int ExtractInt(string parameterName, string @params);
public float ExtractFloat(string parameterName, string…
In a Windows forms application, within a DataGridView, I have 4 different DataGridCombobox controlshow can I set up the handler SelectedIndexChanged handler for the first combobox via the EditingControlShowing event. I added code for a second combobox but the SelectedIndexChanged didn't get wired up.
Here's my code.…
This is very strange, maybe someone can explain what's happening, or this is a bug (though I tend to think that this is probably just something intricate about C#).
The following code throws the error "Cannot implicitly convert type 'uint?' to 'uint'.":
public void Test(UInt32? p)
{
UInt32 x = p;
}
However,…
Hi,
I'm a college student majoring in computer science. I know java and will be learning C++ the next couple years at school. I want to add another language to my repertoire and have gotten conflicting advice: Ruby, Python, Perl, JavaScript, PHP, AJAX, among others.
I was wondering what everyone's opinions were…
I'm using IntellIJ with Apache Wicket and IntelliJ is showing me that tags like <wicket:extend> and <wicket:container> and adding wicket:id to other html tags is not valid.
What steps do I need to take to make IntelliJ recognize the wicket tags?
I'm using IntelliJ Ultimate 9 with the wicketforge…
Hi all,
I am passing some weakrefs from Python into C++ class, but C++ destructors are actively trying to access the ref when the real object is already dead, obviously it crashes...
Is there any Python C/API approach to find out if Python reference is still alive or any other known workaround for this ?
…