I can connect manually by doing:
M-x sql-postgres
and type the User, Database, Host, Server
I'd like to do something like:
(connect-foo (user "me")(database "bar")(host "earth"))
@SpringBean
PDLocalizerLogic loc;
When using above I receive java.io.NotSerializableException. This is because loc is not serializable, but this shouldn't be problem because spring beans are a serializable proxies.
On the page https://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach is written:
Using annotation-based approach, you
should not worry about
serialization/deserialization of the
injected dependencies as this is
handled automatically, the
dependencies are represented by
serializable proxies
What am I doing wrong?
I'd like to have a div as a canvas, where users would choose images to show, out of a list. They will choose what background it would have, icons, and they will upload an image which will appear in this canvas too.
I'm looking for solutions in PHP or ASP.NET.
thansk
Hi,
I'm trying to make a Tag cloud for every user in own page, I'm using PHP5 and Mysql, My table named "tags" and I want to make a array but in short way. The table like below,
The array can be like
for user1 array={[car,1],[cat,null],[pen,1],[dvd,1],[cd,null]}
Username totaltag tag1 tag2 tag3 tag4 tag5
admin 5 car cat pen dvd cd
user1 1 1 1
user2 1 2 12 1
user3 3 2 10 1
What I have so far is:
def imageColumns = ["products_image", "procuts_subimage1", "products_subimage2", "prodcuts_subimage3", "products_subimage4"]
def imageValues = ["1.jpg","2.jpg","3.jpg"]
def imageColumnsValues = []
// only care for columns with values
imageValues.eachWithIndex { image,i ->
imageColumnsValues << "${imageColumns[i]} = '${image}'"
}
println imageColumnValuePair.join(", ")
It works but I think it could be better. Wish there was a collectWithIndex ... Any suggestions?
I have a user control that wraps a grid. I want to be able to set the underlying grid's data source, but through the user control, like this:
<my:CustomGrid DataSource="{Binding Path=CollectionView}" />
I have set this up in the grid like this:
private static readonly DependencyProperty DataSourceProperty
= DependencyProperty.Register("DataSource", typeof(IEnumerable), typeof(CustomGrid));
public IEnumerable DataSource
{
get { return (IEnumerable)GetValue(DataSourceProperty); }
set
{
SetValue(DataSourceProperty, value);
underlyingGrid.DataSource = value;
}
}
But this doesn't work (it doesn't give me an error either). The data source is never set. What am I missing?
What would you call the effect applied to the backgrounds in the Giygas fight of Earthbound, and the battle backgrounds in Mother 3? This is what I'm talking about.
http://www.youtube.com/watch?v=tcaErqaoWek
http://www.youtube.com/watch?v=ubVnmeTRqhg
Now anyone know how I could go about this without using animated images, or using openGL?
I want to make a link download like this
http://idwallpaper.com/download.php?image_id=1517
I have tried on other tutorial like this
<script>
function SaveFile(fname){
img.document.execCommand('saveas', null ,fname)
}
</script>
<iframe id="img" src="myimage.jpg" width="(image width + 20)px" height="(image height + 25)px" scrolling="no" frameborder="0px"></iframe>
<button onclick="SaveFile('myimage.jpg');">save as</button>
Does not work in FireFox though.....
Class.forName(boolean.class.getName());
This doesn't work in Java - the virtual machine slaps you with a ClassNotFoundException. I was in need for something like that because I wanted to reflect methods based on Strings that included the method signatures, like
public void doSomething(boolean yesWeCan, java.lang.String[] presidents);
At the end I came up with a custom 'ClassFactory' which translates the type Strings to class objects. This factory includes a lot of handlers for primitive and array type values.
The handler for array type objects is something like:
if (isArrayOfObjects) {
return Class.forName("L["+typeName.replace("[]", "")+";");
}
My question is - have I missed something in the Java 1.5+ API that might do the trick?
Is there a tutorial/reference for creating an ActiveX DLL in Visual Studio 2008 C++ ?
I've got a DLL built with the DLLRegisterServer/UnregisterServer, and it's registered, but I'm having a little trouble figuring out what name to use to reference it (from a vbscript) and how to make sure my functions are exported correctly. Do I have to put my functions in a special class?
Thanks!
I am very new to Hibernate. I have MySQL database and mapped pojos. What should I do next? I know little bit LINQ to SQL from .NET, and it generates me List of mapped objects.
So basically, what are my next steps after creating POJOS if I want to have List of them and do CRUD operations upon them and data will be also saved in DB not only in java objects ?
kthx
Given a String array
val www = List("http://bloomberg.com", "http://marketwatch.com");
I want to dynamically generate
<span id="span1">http://bloomberg.com</span>
<span id="span2">http://marketwatch.com</span>
def genSpan(web: String) = <span id="span1"> + web + </span>;
www.map(genSpan); // How can I pass the loop index?
How can I use scala map function to generate the ids (span1, span2), as 1 and 2 are the loop indexes ?
Or is the only way is to use for comprehension?
Hey, what i want to do is to make a int that will be the ID of the entity and auto increment itself whenever a new entity is added (just like a SQL identity property). Is this possible? i tried using indexed (checked on attribute) however there is no description to what indexed even does.
Hello,
gcc 4.4.4 c89
I am writing a client/server application. I have finished and now I want to implement some logging feature that will display log messages on the screen as well as log to a file.
However, I don't want to display all log messages (warning, error, critical, unrecoverable, debug, etc). Maybe I can set so that it will display, just errors and debug messages and nothing else. For example, the user might not be interested in the debug messages.
Is there any design-pattern that I can follow? What do you normally for for logging? Any tutorials out there that address logging?
many thanks for any suggestions,
I have 'n' number of data which has to be added to a label field which in turn has to be added to hfm.I am setting the single data in to label field as :
final LabelField desc = new LabelField("", LabelField.FOCUSABLE);
final LabelField desc1 = new LabelField("", LabelField.FOCUSABLE);
Vector data = (Vector) listEvent.get(keys);
for (int i = 0; i < data.size(); i++) {
EventData ee = (EventData) data.elementAt(i);
String Summary= ee.getSummary();
if (time.getText().equals(sTime)) {
desc.setText(Summary);
}
else{
desc1.setText(Summary);
}
}
HorizontalFieldManager horizontalFieldManager_left18 = new HorizontalFieldManager() {
horizontalFieldManager_left18.add(desc1);
vfm.add(horizontalFieldManager_left18);
vfm.add(new SeparatorField());
HorizontalFieldManager horizontalFieldManager_left17 = new HorizontalFieldManager() {
horizontalFieldManager_left17.add(desc);
vfm.add(horizontalFieldManager_left17);
vfm.add(new SeparatorField());
In the above code i loop over vector and set the data into labelfield and adding the label to hfm later.
Now the case is the vector data has more than one summary data,and the data is getting overridden in labelfield,i need to keep 'n' number of summary data into lablefield and add to new hfm.
If I have a working web site at example.com that runs with one hosting provider and wish to run ircd with another hosting provider, how would I set up subdomain irc.example.com for the server that runs that ircd?
Hi Guys,
I need to retrieve 6 questions from a plist and check the answer if is correct from the plist itself??
i will use a QR code scanner api to scan for answer, the api will covert to a string and read from the plist to check if the answer is correct... is there any tutorial or references for me to look @ ??
In my plist there is:
question ~ Dictionary with the following strings:
NumberOfOption ~ which define if the question is a multiple choice or a QR code question
Question ~ question itself
Answer ~ Answer itself
Option 1 ~ 4 ~ if it is a multiple choice question
Thanks in advance for answering my questions, i appreciated it
cheers
Desmond
Can someone help me with creation of a url preview script in javascript?
What I mean is this. Say I have a link on my site, I want the user to be able to mouse over the link, and have an image pop up that shows what the target of the link looks like.
Don't worry about the css, I got that working, I just need the actual script to show the image.
Currently I am doing it by showing up an iframe that actually renders the page, but this is not scalable and looks ugly.
No, having the page display premade images is not an option, since the links will be linking to dynamically generated user content.
thanks
Is it possible to use LIKE in a SQL query to look for patterns of numbers and letters. I need to locate all records where the specific field data has the pattern (2 Numbers,1 hyphen, 3 Letters) ## - AAA I am using SSMS with SQL Server 2008. Any help would be appreciated. THANKS.