Search Results

Search found 128 results on 6 pages for 'felipe cardoso martins'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Rails Mikel Mail Gem How to use Views

    - by Victor Martins
    I'm trying to use mikel gem mail on my 2.3.5 Rails App http://github.com/mikel/mail I have it working like this. I've made a MailComHelper, made a method like this : def self.welcome(user,password) @user = user m = Mail.new m.from = '[email protected]' m.to = @user.email m.subject = 'welcome' m.body = 'The body' m.delivery_method :sendmail m.deliver! end And it works, I receive the mail. But I wish I could use the old way of calling a view ( html.erb ) file and send that code has the body. I've read the documentation but haven't found a way to do it. Has anyone found a way to do it?

    Read the article

  • NHibernate - ISession

    - by Guilherme Cardoso
    Hi About the declaration of ISession. Should we close the Session everytime we use it, or should we keep it open? I'm asking this because in manual of NHibernate (nhforge.org) they recommend us to declare it once in Application_Start for example, but i don't know if we should close it everytime we use. Thanks

    Read the article

  • saving nested attributes

    - by Victor Martins
    I have a form that has a nested form like this: <%- for subscription in @task.subscriptions -% <%- semantic_fields_for "task[subscription_attributes][]", subscription do |subscription_form|% <%- subscription_form.inputs do -% <%= subscription_form.input :workhours, :label = subscription.user.full_name% <%- end -% <%- end -% <%- end -% And on the task model I have: accepts_nested_attributes_for :subscriptions attr_accessible :mission_id, :statuscode_id, :name, :objectives, :start_at , :end_at, :hours, :testimony ,:subscriptions_attributes In the form (view) I get the correct values on the workhours fields. But when I change the values and hit the submit button, the values are never changed. I can't figure out why...

    Read the article

  • Strange problem on some client's browsers

    - by Gustavo Cardoso
    We are fighting a strange problem on the company that I work. We created a site of a promotion to a client where its consumers can register products barcodes to win prizes. The site was created using PHP and MySQL. The site uses SSL on every form. However, some consumers report to the client's call-center they was no able make a registration at the site. We try everything, but we cannot, by no ways, reproduce the problem. The consumers reported the problem on several browsers ranging from IE8 to Firefox, the problem is same on everyone them. One co-woker this weekend was able to catch this same bug on his wife's notebook and brought her computer to the company so we could test. However, here on the company the problem didn't happened and we can make the registration normally. We suppose this problem could be a matter of encoding and special characteres like ã and ç. But we are sure that all source files are UTF8- with BOM. We also suspect of MSXml version, but we are note sure anymore. Because of legal impediments the client cannot ask the consumers to install anything on they computers to test or fix the problem. Sorry but by complience rules we also cannot share the url of the site, what is a pity. I know it is too much on vacuun, but perhaps you could had crossed something similar. Thank you

    Read the article

  • How to get the selected index of a dropdowlist with javascript

    - by rui martins
    I have a table with several @Html.dropdowlistfor in it. I was trying to read the selected value of using javascript, but all read is the html generated. How can I read it?? for (var i = 0; i < oTable.length; i++) { **userModel.Id = oTable[i][0];** regionModel.Users.push(userModel); processModel.Regions.push(regionModel); userModel = { "Id": "", "Name": ""}; regionModel = { "Id": "", "Name": "", "Users": []}; } TABLE <table class="tbl" id="tbl"> <thead> <tr> <th> Region </th> <th> Owner </th> </tr> </thead> <tbody> @if (Model != null) { foreach (var item in Model.Regions) { <tr> <td> @Html.DisplayTextFor(i => item.Name) </td> <td> @Html.DropDownListFor(i => item.Users, new SelectList(item.Users, "Id", "Name")) </td> </tr> } } </tbody> CODE function ProcessSave() { // Step 1: Read View Data and Create JSON Object var userModel = { "User": "", "Name": ""}; var regionModel = {"Region" : "","Name": "", "Users": []}; var processModel = { "User": "", "Description": "", "Code": "", "Regions": []}; processModel.Name = $("#Name").val(); processModel.Code = $("#Code").val(); processModel.Description = $("#Description").val(); var oTable = $('.tbl').dataTable().fnGetData(); for (var i = 0; i < oTable.length; i++) { regionModel.Name = oTable[i][0]; userModel.User = oTable[i][1]; userModel.Name = oTable[i][1]; regionModel.Users.push(userModel); processModel.Regions.push(regionModel); userModel = { "Id": "", "Name": ""}; regionModel = { "Name": "", "Users": []}; } // Step 1: Ends Here // Set 2: Ajax Post // Here i have used ajax post for saving/updating information $.ajax({ url: '/Process/Create', data: JSON.stringify(processModel), type: 'POST', contentType: 'application/json;', dataType: 'json', success: function (result) { if (result.Success == "1") { window.location.href = "/Process/Index"; } else { alert(result.ex); } } }); } MODELS namespace TestingTool.ViewModels { public partial class ProcessModel { public string Name { get; set; } public string Description { get; set; } public string Code { get; set; } public virtual ICollection<RegionModel> Regions { get; set; } } } namespace TestingTool.ViewModels { public class RegionModel { public int Region { get; set; } public string Name { get; set; } public virtual ICollection<UserModel> Users { get; set; } } } namespace TestingTool.ViewModels { public class UserModel { public int User{ get; set; } public string Name { get; set; } } }

    Read the article

  • RewriteRule and Proxy

    - by Felipe Alvarez
    Two servers. example.net, and example.com On http://example.net, My httpd.conf contains # example.net RewriteEngine On RewriteRule ^/felipetest2 http://example.com/webpage [P] I am getting a 302 Moved, which is pointing to http://example.net/webpage, but should be http://example.com/webpage What's going on? I have control over both .net and .com servers in these examples. I know I can do the same with ProxyPass and ProxyPassReverse, but I'm trying to get my head around this one. Edit: Main Question: How do I show a maintenance page, without changing URL in the browser? On same domain, or across different domains?

    Read the article

  • lftp make-backup not functioning as expected

    - by Felipe Alvarez
    With default settings, when 'putting' the file, it is clobbered without complaint or warning. When 'getting' lftp complains: get: super.sh: file already exists and xfer:clobber is unset I change my /etc/lftp.conf and append: set xfer:make-backup yes set xfer:clobber yes When putting and getting, the files get clobbered, however no backup is made. I've checked the settings with "set -a | grep clob" and "set -a | grep backup" and the values are correct.

    Read the article

  • Apache configuration to access for directory

    - by Felipe Hummel
    I'm on Ubuntu 9.10. My web application is in a directory on my /home/me/app . I want to configure Apache in such a way that I can access my app through a directory. For example: People can access my machine through domain.com. What I would like to do is access my web application (located at /home/me/app) through a directory, using something like: domain.com/myapp. How can I set up the apache configuration for this kind of behavior? Of course, I do not want to move all my application to /var/www/myapp. Thanks

    Read the article

  • Apache configuration to access directory

    - by Felipe Hummel
    I'm on Ubuntu 9.10. My web application is in a directory on my /home/me/app . I want to configure Apache in such a way that I can access my app through a directory. For example: People can access my machine through domain.com. What I would like to do is access my web application (located at /home/me/app) through a directory, using something like: domain.com/myapp. How can I set up the apache configuration for this kind of behavior? Of course, I do not want to move all my application to /var/www/myapp. Thanks

    Read the article

  • Apache configuration to access directory

    - by Felipe Hummel
    I'm on Ubuntu 9.10. My web application is in a directory on my /home/me/app . I want to configure Apache in such a way that I can access my app through a directory. For example: People can access my machine through domain.com. What I would like to do is access my web application (located at /home/me/app) through a directory, using something like: domain.com/myapp. How can I set up the apache configuration for this kind of behavior? Of course, I do not want to move all my application to /var/www/myapp. Thanks

    Read the article

  • Good Linux disaster-ready filesystem?

    - by Felipe Solís
    I'm working on this emergency open wi-fi network project and it includes a local website (nginx + MySQL). In order to eliminate SPOFs, we're going to setup at least two of everything (server, switch, router, etc.). This network is thought to work when an earthquake strikes and it's very likely to a server to go to down, if so, we need to be able to boot them up and be operating as soon as possible. Do any of you know if any linux filesystem would work better than others in this scenario?

    Read the article

  • how can i move ext3 partition to the beginning of drive without losing data?

    - by Felipe Alvarez
    I have a 500GB external drive. It had two partitions, each around 250GB. I removed the first partition. I'd like to move the 2nd to the left, so it consumes 100% of the drive. How can this be accomplished without any GUI tools (CLI only)? fdisk Disk /dev/sdd: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xc80b1f3d Device Boot Start End Blocks Id System /dev/sdd2 29374 60801 252445410 83 Linux parted Model: ST350032 0AS (scsi) Disk /dev/sdd: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 2 242GB 500GB 259GB primary ext3 type=83 dumpe2fs Filesystem volume name: extstar Last mounted on: <not available> Filesystem UUID: f0b1d2bc-08b8-4f6e-b1c6-c529024a777d Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal dir_index filetype needs_recovery sparse_super large_file Filesystem flags: signed_directory_hash Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 15808608 Block count: 63111168 Reserved block count: 0 Free blocks: 2449985 Free inodes: 15799302 First block: 0 Block size: 4096 Fragment size: 4096 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 8208 Inode blocks per group: 513 Filesystem created: Mon Feb 15 08:07:01 2010 Last mount time: Fri May 21 19:31:30 2010 Last write time: Fri May 21 19:31:30 2010 Mount count: 5 Maximum mount count: 29 Last checked: Mon May 17 14:52:47 2010 Check interval: 15552000 (6 months) Next check after: Sat Nov 13 14:52:47 2010 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 256 Required extra isize: 28 Desired extra isize: 28 Journal inode: 8 Default directory hash: half_md4 Directory Hash Seed: d0363517-c095-4f53-baa7-7428c02fbfc6 Journal backup: inode blocks Journal size: 128M

    Read the article

  • Ubuntu 9.10 freezes when HDMI port is connected

    - by Felipe Hummel
    Hi, I have a Sony Vaio FW350 with a HDMI output. I'm trying to use it under Ubuntu 9.10 with a LG LCD monitor 21,5'. I've tried two approaches: Boot the laptop with the HDMI cable connected and monitor turned on. Result: LCD Monitor keeps turned on but the whole screen is black and Ubuntu do not seem to be initializing. Boot Ubuntu until the end. I then connect the HDMI cable into the Laptop. The mouse and the whole system freezes. In both cases the only way to turn off the laptop is holding the power button. I've looked around the internet for similar problems, but only found workarounds for the same problem with VGA input, not HDMI. I also tried to use metacity before connecting the cable, but still got the same result. Any hints?

    Read the article

  • VGA Cable gave me an Electric Shock when connecting a Projector to a Laptop

    - by Felipe Luarte
    Yesterday I was trying to connect a Viewsonic Projector to my Samsung RC420 laptop... I followed this steps: I Plugged the Projector to a power source, in parallel I did the same thing with the laptop. Then I turned on the laptop, but not the Projector (this one turns a bright light when is connected to a power source). I put the VGA Cable to the Projector (this one being still turned down) and then when I was getting close to the VGA port of the Laptop... BAM! A big spark appear between the port and the cable! Immediately the whole electricity of my floor went off. A part of the port in my laptop kind of... melted down. It seems to be where the spark started. The same thing happened to the part of the cable involved. Now I'm using the laptop, and it seems that there is no problem in it, I haven't connect anything to the VGA port yet. And the projector is still working to, well... it turns on, and I haven't connect anything yet too. The projector was connected to the power source by a homemade electric extension.

    Read the article

  • Ubuntu 9.10 freezes when HDMI port is connected

    - by Felipe Hummel
    I have a Sony Vaio FW350 with a HDMI output. I'm trying to use it under Ubuntu 9.10 with a LG LCD monitor 21,5'. The laptop has a Intel 4500 video card. I've tried two approaches: Boot the laptop with the HDMI cable connected and monitor turned on. Result: LCD Monitor keeps turned on but the whole screen is black and Ubuntu do not seem to be initializing. Boot Ubuntu until the end. I then connect the HDMI cable into the Laptop. The mouse and the whole system freezes. In both cases the only way to turn off the laptop is holding the power button. I've looked around the internet for similar problems, but only found workarounds for the same problem with VGA input, not HDMI. I also tried to use metacity before connecting the cable, but still got the same result. Any hints?

    Read the article

  • DKIM sign any outgoing mail as the same domain. is possibly?

    - by Felipe Alcacibar
    I have a website, and the users recommend via email to another persons, so the mail come from my site, but I need to appear the user as sender, but "via" mydomain. The logically and what lists management software and companies do is differ the "MAIL FROM" SMTP command and the "From" header (like mailchimp, for example). So I want to DKIM sign a mail with mydomain.com, even if the From header says another domain. is possibly this? I am using postfix with Debian GNU/Linux, and in this case using dkim-filter and dk-filter.

    Read the article

  • Split List into Sublists with LINQ

    - by Felipe Lima
    Hi all, I believe this is another easy one for you LINQ masters out there. Is there any way I can separe a List into several separate lists of SomeObject, using the item index as the delimiter of each split? Let me exemplify: I have a List<SomeObject> and I need a List<List<SomeObject>> or List<SomeObject>[], so that each of these resulting lists will contain a group of 3 items of the original list (sequentially). eg.: Original List: [a, g, e, w, p, s, q, f, x, y, i, m, c] Resulting lists: [a, g, e], [w, p, s], [q, f, x], [y, i, m], [c] I'd also need the resulting lists size to be a parameter of this function. Is it possible?? Thanks!

    Read the article

  • Linked servers SQLNCLI problem. "No transaction is active"

    - by Felipe Fiali
    Im trying to execute a stored procedure and simply insert its results in a temporary table, and I'm getting the following message: The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "MyServerName" was unable to begin a distributed transaction. OLE DB provider "SQLNCLI" for linked server "MyServerName" returned message "No transaction is active.". My query looks like this: INSERT INTO #TABLE EXEC MyServerName.MyDatabase.dbo.MyStoredProcedure Param1, Param2, Param3 Exact column number, names, the problem is not the result. MSDTC is allowed and started in both computers, Remote procedure calling too. The machines are not in the same domain, but I can execute remote queries from my machine and get the result. I can even execute the stored procedure and see its results, I just can't insert it in another table. Help, please? :)

    Read the article

  • Navigation bar's buttons tint color sometimes not set

    - by Felipe
    Refer to the following, short video: http://screencast.com/t/cmnsqVTh The problem is with the color of a navigation bar's back button. The first time I load the app, the navigation bar + its buttons have the default color. I then push a view controller on the stack, and when the new view loads (in the viewDidLoad method), it sets the navigation bar's tint color to pink. The nav bar's buttons are also pink as expected. I then press the back button, and the view is popped from the stack. On the root view controller's viewWillAppear method I set the tint color back to nil so that it's the default color again. The navigation bar looks as expected. However if I push the view controller on the stack yet again, the navigation bar's tint color is pink, but the back button's color is the default light blue. Hope that was understandable. So what's the cause of the problem?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >