Given a GUI application where widgets can be composed of other widgets: If the user triggers an event resulting in a lower level widget needing data from a model, what's the cleanest way to be able to send that request to a controller (or the datastore itself)? And subsequently get the response back to that widget?
Presumably one wouldn't want the controller or datastore to be a singleton directly available to all levels of widgets, or is this an acceptable use of singleton? Or should a top level controller be injected as a dependency through a widget hierarchy, as far down as the lowest level widget that might need that controller? Or a different approach entirely?
i want to create a photo album.
But I want to organize on the server the albums so I want to create new folders :
/myapp
/myapp/albums
/myapp/albums/1
/myapp/albums/2
...
How can I do that on tomcat with Grails ? It create all new folder in tomcat/bin not in tomcat/webapps/myapp/
I created a silverlight 3 application with a navigation frame and 3 views: search, add and edit.
I used the app file to pass parameters among the 3 pages, eg:
((App)Application.Current).SNIPSELECTED = currentSnip;
Then in the receiving page:
currentSnip = ((App)Application.Current).SNIPSELECTED;
currentSnip is a SnipItem object:
public class SnipItem
{
public string itemID {get;set;}
public string category {get;set;}
public string itemDescription {get;set;}
public string codeSnip {get;set;}
}
This worked fine until I decided to make this entire application into a user control and put that inside a second silverlight application with its own navigation frame and app file.
The app files are getting confused. The first app file with all my parameter passing is not being read.
I know how to pass a simple parameter between views in the first application without the app file (in a query string), but how about these custom types like my currentSnip above?
I'm curious if anyone still creates icons other than RGB/A (or 32-bit with alpha-channel) for your Windows apps?
PS. I know that suggested model is to create 256-color versions of icons, but I always struggle with those. If I automatically convert them in an icon editor they totally decimate the look of my original icons with jagged edges and circa-Windows95 look. So if those are still required, does anyone know the stats on how many people are still using color settings other then 32-bit TrueColor?
Hi Folks,
I created an java apllication. i created the Excecutable jar and Exe files for my application. But it cant be run at a system which not installed computer. How to do it? Is there any possible to configure the JRE in the EXEcutable jar or Exe file itself? Any Idea?
i am wondering if the basic link_to syntax is completely broken in current rails3 master or if i am doing some wrong syntax here.
= link_to "name", nil, :onlick => "alert('Hello world!');"
should actually produce an alert on click. very simple. does not work on my rails3 project! (also no error output!) any ideas?
for the general link_to syntax i could not find an example where i could combine a link_to_remote with a confirmation, remote and html class (see my try below)
= link_to "delete", {:action => "destroy", :remote => true, :method => :delete, :confirm => "#{a.title} wirklich Löschen?" }, :class => "trash"
even the rails3 api does not help me here: http://rails3api.s3.amazonaws.com/index.html
help!
In a web application, I want to sprinkle events in places and then let others, who want to extend the functionality, add subscribers to those events.
So something like:
Users.PreUserUpdated();
Users.Update(user);
Users.OnUserUpdated();
If someone now wanted to subscribe to the pre or on user updated events, where would they do so? global.asax before application startup?
Recently i designed one Abode air Chat application, which gets the chat messages from admin-Application(we bApplication), band width consumption is too high while each client launching air application to pull the data from database to my-amf endpoint.
in this am using blazeds,Jetty server,simple java classes(not servlets) calling with remote object,
Please any one suggest me few techiniques to
1)reduce the bandwidh consumption while sending message to each client from admin
2)minimize the time to pull the data from database while client launching application.
Regards,
Thirst for Excellence
I am new in android. this is my frist project.I am tring to make a Name dictionary in bangla so i need to change the front. I already add front into the asset folder..
private void showResults(String query) {
Cursor cursor = managedQuery(DictionaryProvider.CONTENT_URI, null, null,
new String[] {query}, null);
if (cursor == null) {
// There are no results
mTextView.setText(getString(R.string.no_results, new Object[] {query}));
} else {
// Display the number of results
int count = cursor.getCount();
String countString = getResources().getQuantityString(R.plurals.search_results,count, new Object[] {count, query});
mTextView.setText(countString);
// Specify the columns we want to display in the result
String[] from = new String[] { DictionaryDatabase.KEY_WORD,
DictionaryDatabase.KEY_DEFINITION };
// Specify the corresponding layout elements where we want the columns to go
int[] to = new int[] { R.id.word,
R.id.definition };
// Create a simple cursor adapter for the definitions and apply them to the ListView
SimpleCursorAdapter words = new SimpleCursorAdapter(this, R.layout.result, cursor, from, to);
mListView.getAdapter();
// Define the on-click listener for the list items
mListView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// Build the Intent used to open WordActivity with a specific word Uri
Intent wordIntent = new Intent(getApplicationContext(), WordActivity.class);
Uri data = Uri.withAppendedPath(DictionaryProvider.CONTENT_URI,
String.valueOf(id));
wordIntent.setData(data);
startActivity(wordIntent);
}
});
}
}
I built a little installer, which installs to program files. I run the installer and all is good, run the installed .exe and it just disappears. I guess at giving the EXE admin launch rights in Vista and it runs. But why is this needed? This can't be normal can it?
Hi all-
I am working on a site that has the potential to need a LOT of space. Basically we hope to have every video game every created stored in a database along with an image of the cover. There are some api's out there that might be able to help, like GiantBomb's (www.giantbomb.com). We are trying to decide whether to store the data locally and if so where to find that comprehensive a list, or make calls to the api on demand. The problem with the latter is likely latency and also downtime problems. Assuming we want to store it locally here are the questions:
1) Where can we find this kind of data (yes, I looked on google, and no I couldnt find anything:))
2) What is the most efficient way to encode and store the images?
Thanks!
I did find a couple of very similar or identical threads here but they seemed to end before full resolution.
My app runs fine on my device with no build error. I am trying to submit app for approval and I get the following error, "This bundle is invalid. The executable name, as reported by CFBundleExecutable in the info.plist file may not contain any of these characters ..... +". So I opened my info.plist file and changed the info.plist file executable name from the macro ${EXECUTABLE_NAME} to the name of my app without the +. I did a new archive but then get an error saying the "codesign failed with exit code 1".
In another thread I read to just change targets name removing the + from there and leaving the info.plist file with the macro for the executable name, restarting Xcode and then archiving again. That allowed me to archive but I received the same error in iTunes Connect.
I have been working on this all day and don't find the solution. Can anyone please point me in the right direction? Thank you for any help.
I have an ASP.NET web service that I can access via a windows program but now I want to secure the web service. I can secure the web service using forms authentication. How do you access the secured web service from a windows forms application?
I am sure there is a better way to do what I am doing in my apps. The current one I am trying to improve is a list of military cadences. The way I am doing it now is by loading html files in a web view.
What I would like to be able to do is have one view set up and just be able to add the text portion of what I would be displaying with the html file.
What would be the best method. I know this is probably a pretty simple thing to do with a sting or array but I am at the very beginner level and would need to be pointed in the right direction to do it.
I am new to PHP & want to we send email from localhost to my gmail address.
I used:
$to = "[email protected]";
$subject = "Account Confirmation";
$headers = "From: [email protected]";
$message = "Testing";
$mail = mail($to, $subject, $message, $headers);
if ($mail) {
echo "Mail sent.";
} else {
echo "Some Error occur.";
}
And it show Some Error occur.
please help.
Thanks
I need to perform a very large sql server insert from a c# application. Somewhere in the range of 20,000 through 50,000 records.
What is the fastest way through SQL server to perform the insert?
There are several options I know of, but I don't know which is the fastest.
insert into MyTable(column1, column2, ..., column*)
select 'value','value',...,'value'
union
select 'value','value',...,'value'
VS
insert into MyTable(column1, column2, ..., column*)
exec('select ''value'',''value'',...,''value'''
'select ''value'',''value'',...,''value''')
VS
bulk insert from a data file
VS
Any better way that you know of :)
I want to style mail body. I have tried the below methods to style mail body. But all of them didn't work
1) Used external style sheet
style.css
td{padding:10px;}
mail.php
<link rel="stylesheet" href="style.css"></link><table><td>....</td></table>
2) Defined Internal Style Sheet:
mail.php
<style type="text/css">
td{
padding-bottom:8px;
}
</style>
<table><td>....</td></table>
I know, Inline style works by doing <td style='padding-bottom:8px'>, But i have got many tables, doing the inline style is not a good idea, Is there any work around so that no need to define style for each element
So I came from a Flash background where I can animate in timeline. I've completed the Beginning iPhone Development book and just realized that I still don't know how to get an animation in. I'm guessing I need to import png sequences?
Can anyone point me to an appropriate place to learn more about this topic? I want to make a game and my game objects need to animate.
Thanks in advance!!
I want to make a custom made component (a line chart), that would be used in other
applications.
I don't know 2 things:
1) Where should I use (within component class!) the methods for drawing, like FillRect
or PolyLine? In OnPaint handler that I should define and map it in MESSAGE MAP? Will
it (OnPaint handler) be called from OnPaint handler of the dialog of the application
or where from?
2)How to connect the component, once it is made, to the test application, which will
for example be dialog based? Where should I instantiate that component? From an
OnCreate method of the MyAppDialog.cpp?
I started coding in MFC few days ago and I'm so confused about it.
Thanks in advance,
Cheers.
I have a jsp file in the root of .war file.
and then I have a folder named STUFF.
How do I get access to the file read.txt inside STUFF?
/Name_of_war/STUFF/read.txt is the correct path?