Search Results

Search found 18244 results on 730 pages for 'controller action'.

Page 23/730 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Ivy bridge i3 recognized as Xeon e3-1200

    - by user287072
    The situation: I've got a Ivy bridge i3 3225 which is being recognized as a Xeon e3-1200 series cpu by Ubuntu 14.04 64bit. The problem: cpu fan makes more noise than necessary (under dual-boot Win8 the fans are off), cannot install the intel graphics drivers from 01.org. Goals: - find a fix for the load fans could be they are not CPU related, I've tried some fan controller packages, but they made no difference. - get the intel graphics to install (this now fails as xeon cpu's are not supported, I got the package working on a i5 laptop) - get to know some more about how hardware recognition works Tried so far: - a reinstall of Ubuntu, but it was recognized again as a Xeon cpu. - different fan control packages, but they either do not recognized the fans, or just keep fan speed to high. Any pointers as how to get Ubuntu recognized it are more than welcome. lspci -nnQ 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09) 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09) 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04) 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) 00:1c.5 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1e1a] (rev c4) 00:1c.6 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev c4) 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) 00:1f.0 ISA bridge [0601]: Intel Corporation Z77 Express Chipset LPC Controller [8086:1e44] (rev 04) 00:1f.2 SATA controller [0106]: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e02] (rev 04) 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106 [GeForce GTX 660] [10de:11c0] (rev a1) 01:00.1 Audio device [0403]: NVIDIA Corporation GK106 HDMI Audio Controller [10de:0e0b] (rev a1) 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 09) 04:00.0 PCI bridge [0604]: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge [1b21:1080] (rev 03)

    Read the article

  • Implementing a wheeled character controller

    - by Lazlo
    I'm trying to implement Boxycraft's character controller in XNA (with Farseer), as Bryan Dysmas did (minus the jumping part, yet). My current implementation seems to sometimes glitch in between two parallel planes, and fails to climb 45 degree slopes. (YouTube videos in links, plane glitch is subtle). How can I fix it? From the textual description, I seem to be doing it right. Here is my implementation (it seems like a huge wall of text, but it's easy to read. I wish I could simplify and isolate the problem more, but I can't): public Body TorsoBody { get; private set; } public PolygonShape TorsoShape { get; private set; } public Body LegsBody { get; private set; } public Shape LegsShape { get; private set; } public RevoluteJoint Hips { get; private set; } public FixedAngleJoint FixedAngleJoint { get; private set; } public AngleJoint AngleJoint { get; private set; } ... this.TorsoBody = BodyFactory.CreateRectangle(this.World, 1, 1.5f, 1); this.TorsoShape = new PolygonShape(1); this.TorsoShape.SetAsBox(0.5f, 0.75f); this.TorsoBody.CreateFixture(this.TorsoShape); this.TorsoBody.IsStatic = false; this.LegsBody = BodyFactory.CreateCircle(this.World, 0.5f, 1); this.LegsShape = new CircleShape(0.5f, 1); this.LegsBody.CreateFixture(this.LegsShape); this.LegsBody.Position -= 0.75f * Vector2.UnitY; this.LegsBody.IsStatic = false; this.Hips = JointFactory.CreateRevoluteJoint(this.TorsoBody, this.LegsBody, Vector2.Zero); this.Hips.MotorEnabled = true; this.AngleJoint = new AngleJoint(this.TorsoBody, this.LegsBody); this.FixedAngleJoint = new FixedAngleJoint(this.TorsoBody); this.Hips.MaxMotorTorque = float.PositiveInfinity; this.World.AddJoint(this.Hips); this.World.AddJoint(this.AngleJoint); this.World.AddJoint(this.FixedAngleJoint); ... public void Move(float m) // -1, 0, +1 { this.Hips.MotorSpeed = 0.5f * m; }

    Read the article

  • Unable to configure/setup 5.1 audio with 12.04

    - by Vipin Vinayan
    I am kinda new to Ubuntu as well. I have been having this issue with audio for quite sometime now. Initially, when I installed version 11.10 (I guess), I was able to use my 5.1 speakers without any issues. If my memory serves me right, it was after an update that the 5.1 audio stopped working and the video resolution would not get saved. I temporarily fixed the resolution issue by creating a start-up shell script that would update the resolution and load it. But the issue with audio has been going on for quite sometime now. Even though I have option for 5.1, only two speakers seem to be working. I thought an upgrade should fix the issue and so upgraded the OS to version 12.04. I also tried uninstalling alsa and pulse audio, reinstalling them, changing the /etc/pulse/daemon.conf channels from 2 to 6. I have also tried installing pavucontrol but nothing seems to have worked and the issue still persists. Is there anything else you could suggest? The lspci log on my computer is as follows 00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 10) 00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 10) 00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10) 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01) 00:1d.0 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01) 00:1d.1 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01) 00:1d.2 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01) 00:1d.3 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01) 00:1d.7 USB controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA Controller [IDE mode] (rev 01) 00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01) Would really appreciate a response that will assist me in resolving my issue. Thanks in advance Vipin

    Read the article

  • How can I fix broken i915 drivers for Intel GPUs?

    - by Alen Mujezinovic
    I've got troubles getting the i915 drivers to work correctly on my laptop (HP Pavilion DM4 2101ea). Specifically, the laptop screen goes black and stays black after the splash graphic when booting both from USB key and from harddrive. To get anything on to the display after the splash screen I have to boot either with acpi=off nomodeset i915.modeset=0 I'd rather not turn ACPI off because I like my fans spinning and nomodeset is a bit overkill, so for now I'm booting with i915.modeset=0. Unfortunately, this turns off KMS and my current maximum resolution on the laptop screen is fixed to 1024x768 instead of its real capability. When not setting any of the above boot flags and I plug in an external monitor, the external monitor works fine. When booting with the flags, the external monitor works fine too, but can only do 1024x768 and can't do anything else than mirroring the laptop display. I did upgrade the i915 drivers from 2.17 that ship with Precise to 2.19 which are the most recent ones but without luck of getting anything to display. Here's my lspci output: 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5) 00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) 00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05) 00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05) 01:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01) 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5116 PCI Express Card Reader (rev 01) 08:00.0 Ethernet controller: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet (rev c0) Here's lshw -C video *-display UNCLAIMED description: VGA compatible controller product: 2nd Generation Core Processor Family Integrated Graphics Controller vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 09 width: 64 bits clock: 33MHz capabilities: msi pm vga_controller bus_master cap_list configuration: latency=0 resources: memory:c0000000-c03fffff memory:b0000000-bfffffff ioport:4000(size=64) Both outputs are generated after booting with i915.modeset=0. Here's a complete Xorg.log file from a boot into a black screen: https://gist.github.com/479ce06454e47d6123e1 The graphics card is a Intel HD 3000 integrated GPU. I've never had problems with Intel hardware on Ubuntu before so this is very surprising. If you could provide a method to make i915 work, suggest alternative drivers a way to boot with i915.modeset=0 but higher resolutions and KMS on or explain what is happening and how to fix it I'll give you an answer badge. :) Thanks

    Read the article

  • No Sound in 12.04 on Acer TimelineX 3830TG

    - by Fawkes5
    When i first installed ubuntu 12.04 everything worked fine. All of a sudden my sound has stopped working!! This has happened before [like 2 days ago], however the next day it started working again. That may happen again...[I've already rebooted 5 times] My Sound Card is a HDA intel PCH My Sound Chip is Intel CougarPoint HDMI My machine is an Acer TimelineX 3830TG, heres my lcpci output 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4) 00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4) 00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev ff) 02:00.0 Ethernet controller: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet (rev c0) 03:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (PCI-Express) (rev 01) 04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5116 PCI Express Card Reader (rev 01) 05:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04) I'm running a dual boot with Windows 7, sound always works there. I've tried loading earlier kernels [3.2.0 ] but that hasn't helped. I've tried playing with alsamixer, unmuting and raising volume, doesn't work I've tried playing with pauvcontrol, doesnt work. Althought, strangely, when i play a song, under output i can see a bar moving implying that something is working, just the sound isn't getting through my speakers. Thus it might be a hardware problem. I've tried unistalling and reinstalling pulsaudio annd alsamixer, doesn't work [maybe made it worse...]. I've heard reverting back to kernel 3.0... works, but i'm reluctant to try that[i dont know much about kernels]. Thank you. Please tell me what other information you need. EDIT: My audio has started working again after another reboot. However this time im not connected to my external audio on startup. I will see if this is the issue next time i'm at home Edit: Connecting to external audio is not the problem.

    Read the article

  • Spring MVC Controller redirect using URL parameters instead of in response.

    - by predhme
    I am trying to implement RESTful urls in my Spring MVC application. All is well except for handling form submissions. I need to redirect either back to the original form or to a "success" page. @Controller @RequestMapping("/form") public class MyController { @RequestMapping(method = RequestMethod.GET) public String setupForm() { // do my stuff return "myform"; } @RequestMapping(method = RequestMethod.POST) public String processForm(ModelMap model) { // process form data model.addAttribute("notification", "Successfully did it!"); return "redirect:/form"; } } However as I read in the Spring documentation, if you redirect any parameters will be put into the url. And that doesn't work for me. What would be the most graceful way around this?

    Read the article

  • Navigation (controller) in Tabbar (c) in Navigation (c) (iphone)

    - by Jonathan
    I want to have a TabBar controller inside a navigation controller. So that when an item is selected on the first Navigation Controller it pushes the TabBar into view. Inside this tabbar on the first tab is another navigation controller. However I only want one navigation bar. I've come up with 2 ways but not sure which way is better (Ie more acceptable etc)? 1) The first navigation controller isn't actually a navigation controller but to the user it looks like one. So when a cell is selected on it's table view the first navC's view is removed from the superview and the TabBarC's view is added, animation would have to be done manually. 2)The first NavC is actually a NavC and when an item is selected and the TabBar is pushed on to the screen the first NavC's navigationbar is hidden so that the first tab's navigationBar is the only nav bar on screen.

    Read the article

  • RenderAction not finding action method in current controller in current area

    - by Andrew Davey
    I'm creating an ASP.NET MVC 2 (RTM) project that uses areas. The Index action of the Home controller of one area needs to use RenderAction to generate a sub-section of the page. The action called is also defined in the same Home controller. So the call should just be: <% Html.RenderAction("List") %> However, I get an exception: A public action method 'List' was not found on controller 'RareBridge.Web.Areas.Events.Controllers.HomeController'. Note that I'm not in the "Events" area! I'm in a completely different area. If I remove the "Events" home controller, then the exception still occurs but names a different controller (still not the one I want it to call). I've also tried providing the controller name and area to the RenderAction method, but the same exception occurs. What is going on here? BTW: I am using Autofac as my IoC container

    Read the article

  • View controllers inside tab bar controller not auto-resizing on rotation

    - by Padawan
    (Correction: the view controllers are not auto-resizing instead of not auto-rotating.) In an iPad app, I have five regular view controllers (not navigation controllers or anything like that) inside a tab bar controller. The tab bar controller is just a plain UITabBarController declared in the app delegate. All the view controllers return YES in the shouldAutorotateToInterfaceOrientation method. On both the simulator and device, on rotation, the tab bar and the current view controller rotate but the currently selected view controller (call it A) does not resize properly. It keeps its portrait width and height (but it is rotated). If I switch to another view controller B and then back to A (without rotating the device again), A appears correctly resized. This happens with any of the five view controllers Why doesn't the currently selected view controller resize immediately on rotation and how do I fix it? Thanks.

    Read the article

  • MVC: Model View Controller -- does the View call the Model?

    - by Gary Green
    I've been reading about MVC design for a while now and it seems officially the View calls objects and methods in the Model, builds and outputs a view. I think this is mainly wrong. The Controller should act and retrieve/update objects inside the Model, select an appropriate View and pass the information to it so it may display. Only crude and rudiementary PHP variables/simple if statements should appear inside the View. If the View gets the information it needs to display from the Model, surely there will be a lot of PHP inside the View -- completely violating the point of seperating presentation logic.

    Read the article

  • Handling hundreds of actions in Struts2

    - by Roberto
    Hi all, I've inherited a struts 1 web application where, in order to reduce the number of Action classes (I guess this is the reason), lots of actions are mapped inside a single Action class, like: public XXXAction() throws Exception{ actions = new Hashtable(); actions.put("/XXX/main/load", new Integer(0)); actions.put("/XXX/main/save", new Integer(1)); ...... } public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { try { switch (((Integer) actions.get(action)).intValue()) { case 0: loadXXXMain(); break; case 1: ....... and so on (in some Action classes I have almost one hundred of these small actions). Now I'm looking at migrate to struts2 and I would like to have a cleaner and better solution to handle this, maybe without having a single Action class for each of these small classes. What do you suggest? I don't like this solution, but I don't like having hundreds of Action classes.... Thanks! Roberto

    Read the article

  • Routing with command controller and sub controllers without using areas

    - by user205258
    How can I create a routing structure for a project management application where there are discrete controllers for all the relevant pieces such as TaskController, DocumentController etc and an Over arching controller. I would essentially like a structure like: http://server/Project/123/Task http://server/Project/123/Document I am using mvc1 so I have no access to areas etc. The project section will have a separate master page for project controllers such as task, document etc with a dfferent menu navigaton. I have tried three routes together n Global.asax like: routes.MapRoute( "Task", "Project/{id}/Task/{action}", new { controller = "Task", action = "Index", id = "" } ); routes.MapRoute( "Message", "Project/{id}/Message/{action}", new { controller = "Message", action = "Index", id = "" } ); routes.MapRoute( "Document", "Project/{id}/Document/{action}", new { controller = "Document", action = "Index", id = "" } ); What am I doing wrong here

    Read the article

  • Obj-C : Passing parameters back from a detailViewController in a navigation controller

    - by Garfield81
    Hi I am using a navigation Controller on an iPhone app. I am able to pass data forward when I push a controller into the navigation stack but how do I pass data back when I pop the controller. What I am basically trying to achieve is the root navigation controller view displays a number of fields that can be edited. A user then clicks on one of the fields to be edited and a EditViewController is pushed onto the stack with the name of the field the user wants to edit. Now the users enters the new value of the field and presses save to pop the view controller. So how do I get the value from the editViewController back to the root navigation controller view?

    Read the article

  • How do I create a controller and action without a model?

    - by Angela
    I have several models: Email Letter Call All three belong to a model Campaign. And a Campaign has_many Contacts I envision being able to see a schedule for Today by going to domain/schedule/today What I'd like it to do would be to show all the Events (Email, Letter, Call) that have to happen today for each campaign. I tried the following, but have some challenges in putting it into a controller versus into a View. There are many emails in campaign. Email.days is the number of days from the contact.start_date that an email should be sent to the Contact. ScheduleController < def index campaigns.each do |campaign| #goes through each campaign for contacts in campaign.contacts Email.find(:all).reject { |email| email.contact.start_date + email.days <= Date.now } end end end

    Read the article

  • How to save some values from an array in a controller in Rails?

    - by Alfred Nerstu
    I've got a links array that I'm saving to a database. The problem is that the records aren't saved in the order of the array ie links[1] is saved before links[2] and so on... This is a example from the view file: <p> <label for="links_9_label">Label</label> <input id="links_9_name" name="links[9][name]" size="30" type="text" /> <input id="links_9_url" name="links[9][url]" size="30" type="text" /> </p> And this is my controller: def create @links = params[:links].values.collect { |link| @user.links.new(link) } respond_to do |format| if @links.all?(&:valid?) @links.each(&:save!) flash[:notice] = 'Links were successfully created.' format.html { redirect_to(links_url) } else format.html { render :action => "new" } end end end Thanks in advance! Alfred

    Read the article

  • Groovy Grails, How do you stream or buffer a large file in a Controller's response?

    - by Julian Noye
    Hi Guys I have a controller that makes a connection to a url to retrieve a csv file. I am able to send the file in the response using the following code, this works fine. def fileURL = "www.mysite.com/input.csv" def thisUrl = new URL(fileURL); def connection = thisUrl.openConnection(); def output = connection.content.text; response.setHeader "Content-disposition", "attachment; filename=${'output.csv'}" response.contentType = 'text/csv' response.outputStream << output response.outputStream.flush() However I don't think this method is inappropriate for a large file, as the whole file is loaded into the controllers memory. I want to be able to read the file chunk by chunk and write the file to the response chunk by chunk. Any ideas?

    Read the article

  • Execute method with Action<T> argument using Reflection

    - by JGr
    How can i create a Action method to use as a argument to the following function? public void When(Action<T> action) { if (internalValue != null) action(internalValue); } I have the MethodInfo on the method, and the parameter type like so: var methods = value.GetType().GetMethods(); MethodInfo mInfo = methods.First(method => method.Name == "When"); Type parameterType = (mInfo.GetParameters()[0]).ParameterType; But after that i have no idea how to make the actual Action method to pass as argument, i also do not know how to define the Action method body.

    Read the article

  • How to sort some values from an array in a controller in Rails?

    - by Alfred Nerstu
    I've got a links array that I'm saving to a database. The problem is that the records aren't saved in the order of the array ie links[1] is saved before links[2] and so on... This is a example from the view file: <p> <label for="links_9_label">Label</label> <input id="links_9_name" name="links[9][name]" size="30" type="text" /> <input id="links_9_url" name="links[9][url]" size="30" type="text" /> </p> And this is my controller: def create @links = params[:links].values.collect { |link| @user.links.new(link) } respond_to do |format| if @links.all?(&:valid?) @links.each(&:save!) flash[:notice] = 'Links were successfully created.' format.html { redirect_to(links_url) } else format.html { render :action => "new" } end end end Thanks in advance! Alfred

    Read the article

  • MVC (model-view-controller) - can it be explained in simple terms?

    - by DVK
    I need to explain to a not-very-technical manager the MVC (model-view-controller) concept and ran into trouble. The problem is that the explanation needs to be on a "your grandma will get it" level - e.g. even the fairly straightforward explanation offered on MVC Wiki page didn't work, at least with my commentary. Does anyone have a reference to a good MVC explanation in simple terms? It would ideally be done with non-techie metaphor examples (e.g. similar to "Decorator pattern is like glasses") - one reason I failed was that all MVC examples I could come up with were development related. I once saw a list of pattern explanations but to the best of my memory MVC was not on it. Thanks!

    Read the article

  • Extension method not working if I set controller property in Action, works in OnExecuting

    - by Blankman
    I have a class MyController that inherits from Controller, so all my controllers inherit from MyController. I have a property in MyController: public class MyController : Controller { public string SomeProperty {get;set;} } if I set this property in MyController's OnExecuting method, my HtmlHelper extension method works fine: public static string SomeExtension(this HtmlHelper htmlHelper) { StringBuilder sb = new StringBuilder(); string result = ""; var controller = htmlHelper.ViewContext.Controller as MyController; if (controller != null) { result = controller.SomeProperty; } return result; } it doesn't work if I set 'SomeProperty' in my controllers action method. I guess because I am doing 'as MyController' in the extension method? is there a way for it to work in both situations? I am using the value of SomeProperty to be outputted on my view pages.

    Read the article

  • How to find the right object in a Rails controller based on two variables?

    - by sscirrus
    Hi everyone, I have a three-table system: Companies, Customers, and Matches. The matches include, for example, private notes that each party makes about the other and some options they can set regarding the other. I have two sets of views centered around Companies and Customers for each party to look at the other and modify their notes and settings. # Customers Controller def show @customer = Customer.find(params[:customer]) @matchings = @candidate.matchings.find... @company = Company.find(params[:company]) end Obviously the @matchings is incomplete. Given that @matchings has fields customer_id and company_id, how do I find the right matching record? Thank you!

    Read the article

  • How to get the action from the HttpServlet request to dispatch to multiple pages

    - by JFB
    I am using the Page Controller pattern. How could I use the same controller for two different pages by detecting the request action and then dispatching according to the result? Here is my code: account.jsp <form name="input" action="<%=request.getContextPath() %>/edit" method="get"> <input type="submit" value="Modifier" /> </form> Account Servlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("received HTTP GET"); String action = request.getParameter("action"); if (action == null) { // the account page dispatch(request, response, "/account"); } else if (action == "/edit") { // the popup edit page dispatch(request, response, "/edit"); } protected void dispatch(HttpServletRequest request, HttpServletResponse response, String page) throws javax.servlet.ServletException, java.io.IOException { RequestDispatcher dispatcher = getServletContext() .getRequestDispatcher(page); dispatcher.forward(request, response); } }

    Read the article

  • Action T synchronous and asynchronous

    - by raffaeu
    Hi everybody I have a contextmenustrip control that allows you to execute an action is two different flawours. Sync and Async. I am trying to covert everything using Generics so I did this: public class BaseContextMenu<T> : IContextMenu { private T executor ... public void Exec(Action<T> action){ action.Invoke(this.executor); } public void ExecAsync(Action<T> asyncAction){ ... } How I can write the async method in order to execute the generic action and 'do something' with the menu in the meanwhile? I saw that the signature of BeginInvoke is something like: asyncAction.BeginInvoke(thi.executor, IAsyncCallback, object);

    Read the article

  • PCI function number for SATA AHCI controller

    - by Look Alterno
    I'm debugging a second stage boot loader for a PC with SATA AHCI controller. I'm able to enumerate the PCI bus and find the hard disk. So far, so good. Now, lspci in my notebook (Dell Inspiron 1525) show me: -[0000:00]-+-1f.0 Intel Corporation 82801HEM (ICH8M) LPC Interface Controller +-1f.1 Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller +-1f.2 Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller \-1f.3 Intel Corporation 82801H (ICH8 Family) SMBus Controller My question: Is SATA AHCI Controller always function 2 in any PC? If not, how I found? I don't pretend to be general; booting my notebook will be good enough, without compromise further refinements.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >