Please share and vote for the best!
Please do not close this. This is a subjective question, but is programming related and can be beneficial to people.
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 Wordpress theme, and I…
Hey guys,
If I have an array structured like this:
$array[index]['first_name']
$array[index]['last_name']
Is there an easy way to implode it into something like first_name last_name,first_name last_name, etc. for all the indices?
Implode didn't seem to do what I wanted for something like this. Currently I'm just looping over the whole thing,…
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.
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 it? Any…
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 @params);
public string…
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. …
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 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 :)
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. Any advice would…
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, this code works…
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?
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…
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"…
Does Zend application server provide any sort of pushed-based messaging architecture support?I mean some different message-oriented middlewares that can be used for the push-based architecture or email support?There is a need in provision of the non web-based interface for certain users of the website who would get…
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 ?
…
A WCF service has been written and can be hosted in any web site. These web sites could use Windows, Kerberos, or Forms authentication.
Is any particular configuration or development required within the service to handle these different authentication types? Or is authentication independent and the service…