I'm trying to create a custom route like:search/result/city/p1/state/p2/zip/p3/min/p4/max/p5/bed/p6/bath/p7/cats/p8/dogs/p9/parking/p10 Where search is the controller and result the action p1-p10 are variables.
I am using UITabbarController with 8 to 9 items (these are UINavigation controllers)
It is easy to select an item programmatically using
tabbarcontroller.selectedIdex = x;
if x value is between 0 to 4 then it's work as expected but if it's greater than 4 then it's select "More" as a view controller.
How can we programmatically select an item under "More" list ?
any help would be appreciated..
Thanks in advance
Hi all!
my view controller is set to accept accelerometer delegate, and if I put the accelerometer value inside a label works...
after I tried to move an UIImageView into my ViewController and nothing happens
(the image is putted into the view from the interface builder...
(i try to move the image using the frame origin properties)
thanks in advance...
where to begin ? i want to create multiplayer flash games using Union (any experience?)
but which IDE and prerequisites do i need to begin ?
also, what does Flex mean ?
thank you.
p.s. what is the best way to purchase Game assets ? ex) 2d sprites...i've given up trying to design my own. i need to outsource (any dedicated place for finding offshore artists?) or buy some package.
I wanted to create a function which would return the path of the current web site. This is what I thought was working while running in the IDE:
Public Shared Function WebsiteAbsoluteBaseUrl() As String
Dim RequestObject As System.Web.HttpRequest = HttpContext.Current.Request
Return "http://" & RequestObject.Url.Host & ":" & _
RequestObject.Url.Port & "/" & _
RequestObject.Url.Segments(1)
End Function
Does this seem like it should work? Is there a more straight forward way?
Sikuli is really cool, but it's working in its buildin Jython environment, the Sikuli IDE.
So I m wondering is it possible to import Sikuli as an external library to my Jython library? I saw from Sikuli's website that they have this Python module which provides all Sikuli actions like click and type. Here is the link: http://sikuli.org/documentation.shtml#doc/pythondoc-python.edu.mit.csail.uid.Sikuli.html
I have tried importing the skiuli-script.jar and add the skiuli-script/Lib to the PYTHONPATH. Then in my spike.py script, I try to do this:
import python.edu.mit.csail.uid.Sikuli
capture() #enter to screen capture mode
then when execute the script, I got this error:
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no suitable image found. Did find: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no matching architecture in universal wrapper
I m using Jython 2.2.1 and Mac 10.6.2 (32-bit mode). I have also set to use 32-bit mode first in Java Preference.
Hi,
I am passing the email address as part of the url,
for ex. http://example.com/hello/[email protected]
but, when being passed to the application controller it is changed to " user%40hotmail.com ".
I can't seem to understand this special character escaping; confusion.
please help me explain the problem here, and also what can I do to fix it.
I am using python's "webapp" web application framework.
Situation:
I have an Eclipse RCP Application, which I am trying to build with tycho plugin for Eclipse.
When I am executing my Eclipse Application inside of the IDe - the Application is executed normally.
When using tycho to build the Application - the following error is thrown:
The type org.eclipse.swt.widgets.Button cannot be resolved. It is indirectly referenced from required .class files
What I did :
In other cases where a "missing requirenments" exception was thrown, which I found
- a missing transitive plugin-dependency was the reason.
In my case an SWT widget "Button" is missing, so I am trying to import swt.
SWT is platform dependant so I am importing swt inside of the product, as described here.
Anyway, during compilation the error occurs again.
Question:
Do someone have any Idea, how to solve this Problem?
I am new to CakePHP and want an admin panel on my custom CMS for a client. Is there any way other than just linking to an admin page to each controller that I can pull views from other controllers such as users and posts?
I learned how to create a view controller and make the view slide in from bottom. But the one in iphone album looks different. It darkens the rest of the visible portion of the screen when the view slides in. How do I create a similar one? I want to add buttons like "save, cancel, email" etc into the sliding view.
how can i deny access to call method. something like this
[HandleError]
[Authorize(Roles = "role1, role2")]
public class AdminController : Controller
{
[Deny(Roles = "role2")]
public ActionResult ResultPage(string message)
{
ViewData["message"] = message;
return View();
}
}
Hello,
I have something like this in my Spring Application:
public class Book{
public Book(){
sheets = new LinkedList<Sheet>();
}
protected List<Sheet> sheets;
//getter and setter
}
I add several Sheets to the sheet list and I print a form in a JSP like this:
<form:form modelAttribute="book" action="${dest_url}" method="POST">
<c:forEach items="${mybook.sheets}" var="sheet" varStatus="status">
<form:hidden path="sheet[${status.count -1}].header"/>
<form:hidden path="sheet[${status.count -1}].footer"/>
<form:hidden path="sheet[${status.count -1}].operador"/>
<form:hidden path="sheet[${status.count -1}].number"/>
<form:hidden path="sheet[${status.count -1}].lines"/>
</c:forEach>
...
</form:form>
I need to get back this list in the controller when the form is submitted. So in my controller I have a method with a parameter like this:
public String myMethod (@ModelAttribute("book") Book book, Model model){
...
}
The problem is that it doesn't fill the sheets list unless in the constructor of Book I add as much Sheet's as I want to get. The problem is that I don't know in advance the number of Sheets the book is going to have.
I think the problem is that in my method it instantiates Book which has a list of sheets with 0 elements. When it tries to access to sheets[0] the list is empty and it doen't add a Sheet. I've tried to create a getter method for the list with an index parameter (so it can create the element if it doesn't exists in the list like in Struts framework) like this one:
public Sheet getSheets(int index){
if(sheets.size() <= index){
Sheet sheet = new Sheet();
sheets.add(index, sheet);
}
Sheet sheetToReturn = sheets.get(index);
if(sheetToReturn == null){
sheetToReturn = new Sheet();
sheets.add(index, sheetToReturn);
}
return sheetToReturn;
}
but with this method the JSP doesn't work because sheets has an invalid getter.
What's the proper way of filling a list when you don't know the number of items in advanced?
Thanks
I'm presenting a modal view (AddSite) in my RootViewController and in my AddSite Controller I have a method that dismisses the modal view. How can my RootViewController know when AddSiteController called dismissModalViewControllerAnimated and disappeared?
I'm trying to write an application with Symfony and I'm new to it. I have an ajax call in this application. The problem is that it always fires error call back . I put breakpoint in netbeans IDE and can see that error callback is fired before firing the specified action in the url property of ajax.
action code:
public function userNameExistsAction()
{
return 'success';
}
javascript:
$('#register_submit').click(function(){
var path = '/symfony/web/app_dev.php/account/userNameExists';
//var userName = $('#register_userName').val();
$.ajax({
url: path,
type: 'GET',
success: function(){ alert('success');},
error: function() {
console.log('error');
}
});
});
Any help is appreciated in advance.
Greetings,
I created a report which uses custom library created by me. I've copied these libraries to the following folders:
c:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting
Services\ReportServer\bin\
c:\Program Files\Microsoft Visual
Studio
8\Common7\IDE\PrivateAssemblies\
Everything works find when I run the report using Visual Studio. When I install it on Production Server (where these dlls were also copied) the following error is returned:
Failed to load expression host assembly. Details: The type initializer for 'MyParserForReportingServices.MyParser' threw an exception. (rsErrorLoadingExprHostAssembly)
Can someone please help me?
Is it a leak if I have a view controller and allocate the view like this:
self.view = [[UIView alloc] initWithFrame:frame];
Do I need to do something like this:
UIView *v = [[UIView alloc] initWithFrame:frame];
self.view = v;
[v release];
Here is an example of what i want to do
The Url will be as follow
http://www.example.com/en/us/directory/companies/view/4433225.html
Where is
en: is the lang
us: is the country
directory: is the module
companies: is the controller
view: is the action
4433225.html: is sort of parameter send to the action could be the company name like this company-name.html
How do I map something like domain.com/username? The problem is I think that the MVC routing looks for the controller to determine how it should handle the mapping request.
I am pretty new to ASP.NET MVC.
However, based on the tutorials so far, the routing mechanism seems rather rigid.
Hey all, I am trying to find a tool that can highlight code changes in Visual Studio so they can be easily found and reviewed. Below are some requirements for what we are looking for...
Identify and use a difference highlighting tool that meets the following criteria:
• can highlight areas that need to be reviewed
• there is a place to enter comments
• retains line numbering from code
• preference for doing within IDE
Issue addressed:
Hard to see what was changed in code - changes not identified. Coders do not provide administrators diffs. No tool that does a nice job to identify differences. Daunting/time consuming to provide a good diff. When highlighting differences was provided, loss of line numbers was a substantial issue (was worse).
I am using Spring upload to upload files. When uploading an Arabic file and getting the original file name in the controller, I get something like:
المغفلين.png
I expect it to be:
????????.png
Any ideas why this problem occur?
Hi -
I need to see what page a request came from in my controller so I could be able to redirect back to it. For example, if I'm on a page showing a specific product (say /products/1) and it has a link to its vendor (/vendors/12), I want to be able to detect inside the vendors_controller that I came to that page from /products/1. Is there a simple way in Rails to achieve this, so that I could access it via params or session? thanks.
I have followed the tutorial at Scala and Android with Scala 2.7.3 final. The resulting Android App works but even the most basic application takes several minutes (!) to compile and needs 900 kb compressed, which is a show stopper for mobile applications. Additionally, the IDE runs out of memory every now and then. I assume dex is not made for big libraries like the scala-library.
So my question is: Has anyone actually done this and is there any cure for this?
Given the following class,
public class Result
{
public bool Success
{
get;
set;
}
public string Message
{
get;
set;
}
}
I am returning one of these in a Controller action like so,
return Json(new Result() { Success = true, Message = "test"})
However my client side framework expects these properties to be lowercase success and message. Without actually having to have lowercase property names is that a way to acheive this thought the normal Json function call?
I'm using BITS to make requests to a ASP.NET MVC controller method named Source that returns a FileResult. I know the type FilePathResult uses HttpResponse.TransmitFile, but I don't know if HttpResponse.TransmitFile actually writes the file to the response stream regardless of the request type.
My question is, does FileResult only include the header information on HEAD requests, or does it transmit the file regardless of the request type? Or, do I have to account for HEAD requests myself?
I made a mistake early in development, and named one of my models with plural noun (Users instead of User). Is there an easy way to rename it and corresponding controller (similar to generating it with script/generate way)?