Daily Archives

Articles indexed Friday March 19 2010

Page 3/124 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Google s'attaque au marché de la télévision, Android bientôt dans nos écrans

    Google s'attaque au marché de la télévision, Android bientôt dans nos écrans Après avoir investi les smartphones, les netbooks et les tablettes, Android arriverait dans nos écrans. Le système d'exploitation open-source de Google devrait en effet tenter de se faire une place dans no téléviseurs, en surfant sur la tendance des TV connectées au Net. En effet, lors du CES 2010 à Las Vegas, les fabriquants ont tous présentés de futurs modèles d'écrans permettant de surfer sur le web. Le géant de la recherche en ligne aurait donc décidé, en partenariat avec Intel et Sony, de partir à l'assaut de ce créneau très porteur. Android sera intégré soit dans le poste de télévision (qui comprendrait u...

    Read the article

  • SEO Training OR SEO Outsourcing

    There is a lot of focus on outsourcing search optimization work, but this may not always be the best option. This article looks at why SEO Training can often be a better option because it results in more unique content which is better for search engines.

    Read the article

  • XSLT: If Node = A then set B=1 Else B=2

    - by Larry
    I am looping thru looking at the values of a Node. If Node = B, then B has one of two possible meanings. --If Node = A has been previously found in the file, then the value for A should be sent as 1. --If Node = A has NOT been found in the file, the the value for A should be sent as 2. where file is the xml source to be transformed I cannot figure out how to do this. If I was using a programming language that allowed for a variable to have its value reassigned/changed, then it is easy. But, with XSLT variables are set once.

    Read the article

  • JQUERY Loop from a AJAX Response

    - by nobosh
    I'm building a tagger. After a user submits a tag, ajax returns: {"returnmessage":"The Ajax operation was successful.","tagsinserted":"BLAH, BLOOOW","returncode":"0"} I want to take the tagsinserted and loop through it, and during each loop take the item in the list and insert it on the HTML page. suggestion on how to do this right? Here is the current code: $("#tag-post").click(function(){ // Post $('#tag-input').val() $.ajax({ url: '/tags/ajax/post-tag/', data: { newtaginput : $('#tag-input').val(), userid : $('#userid').val()}, success: function(data) { // After posting alert('done'); } }); });

    Read the article

  • Is there a way to list all the database queries my wordpress install is making for a given event?

    - by mattloak
    Using a method similar to the one described here: (http://stackoverflow.com/questions/14873/how-do-i-display-database-query-statistics-on-wordpress-site), I can see the total number of queries being made when I load a page. Now I'd like to output a list of the queries that are being made when the page loads. This would allow me to see who my biggest resource hogs are without having to go through the process of elimination of all my plugins and theme scripts. How would I do this? Thanks.

    Read the article

  • How can I change UIButton title color?

    - by HelloWorld
    I create a button programmatically button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button addTarget:self action:@selector(aMethod:) forControlEvents:UIControlEventTouchDown]; [button setTitle:@"Show View" forState:UIControlStateNormal]; button.frame = CGRectMake(80.0, 210.0, 160.0, 40.0); [view addSubview:button]; how can I change title color?

    Read the article

  • Many to Many with LINQ-To-Sql and ASP.NET MVC

    - by Jonathan Stowell
    Hi All, I will restrict this to the three tables I am trying to work with Problem, Communications, and ProbComms. The scenario is that a Student may have many Problems concurrently which may affect their studies. Lecturers may have future communications with a student after an initial problem is logged, however as a Student may have multiple Problems the Lecturer may decide that the discussion they had is related to more than one Problem. Here is a screenshot of the LINQ-To-Sql representation of my DB: LINQ-To-Sql Screenshot At the moment in my StudentController I have a StudentFormViewModel Class: // //ViewModel Class public class StudentFormViewModel { IProbCommRepository probCommRepository; // Properties public Student Student { get; private set; } public IEnumerable<ProbComm> ProbComm { get; private set; } // // Dependency Injection enabled constructors public StudentFormViewModel(Student student, IEnumerable<ProbComm> probComm) : this(new ProbCommRepository()) { this.Student = student; this.ProbComm = probComm; } public StudentFormViewModel(IProbCommRepository pRepository) { probCommRepository = pRepository; } } When I go to the Students Detail Page this runs: public ActionResult Details(string id) { StudentFormViewModel viewdata = new StudentFormViewModel(studentRepository.GetStudent(id), probCommRepository.FindAllProblemComms(id)); if (viewdata == null) return View("NotFound"); else return View(viewdata); } The GetStudent works fine and returns an instance of the student to output on the page, below the student I output all problems logged against them, but underneath these problems I want to show the communications related to the Problem. The LINQ I am using for ProbComms is This is located in the Model class ProbCommRepository, and accessed via a IProbCommRepository interface: public IQueryable<ProbComm> FindAllProblemComms(string studentEmail) { return (from p in db.ProbComms where p.Problem.StudentEmail.Equals(studentEmail) orderby p.Problem.ProblemDateTime select p); } However for example if I have this data in the ProbComms table: ProblemID CommunicationID 1 1 1 2 The query returns two rows so I assume I somehow have to groupby Problem or ProblemID but I am not too sure how to do this with the way I have built things as the return type has to be ProbComm for the query as thats what Model class its located in. When it comes to the view the Details.aspx calls two partial views each passing the relevant view data through, StudentDetails works fine page: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MitigatingCircumstances.Controllers.StudentFormViewModel>" %> <% Html.RenderPartial("StudentDetails", this.ViewData.Model.Student); %> <% Html.RenderPartial("StudentProblems", this.ViewData.Model.ProbComm); %> StudentProblems uses a foreach loop to loop through records in the Model and I am trying another foreach loop to output the communication details: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<MitigatingCircumstances.Models.ProbComm>>" %> <script type="text/javascript" language="javascript"> $(document).ready(function() { $("DIV.ContainerPanel > DIV.collapsePanelHeader > DIV.ArrowExpand").toggle( function() { $(this).parent().next("div.Content").show("slow"); $(this).attr("class", "ArrowClose"); }, function() { $(this).parent().next("div.Content").hide("slow"); $(this).attr("class", "ArrowExpand"); }); }); </script> <div class="studentProblems"> <% var i = 0; foreach (var item in Model) { %> <div id="ContainerPanel<%= i = i + 1 %>" class="ContainerPanel"> <div id="header<%= i = i + 1 %>" class="collapsePanelHeader"> <div id="dvHeaderText<%= i = i + 1 %>" class="HeaderContent"><%= Html.Encode(String.Format("{0:dd/MM/yyyy}", item.Problem.ProblemDateTime))%></div> <div id="dvArrow<%= i = i + 1 %>" class="ArrowExpand"></div> </div> <div id="dvContent<%= i = i + 1 %>" class="Content" style="display: none"> <p> Type: <%= Html.Encode(item.Problem.CommunicationType.TypeName) %> </p> <p> Problem Outline: <%= Html.Encode(item.Problem.ProblemOutline)%> </p> <p> Mitigating Circumstance Form: <%= Html.Encode(item.Problem.MCF)%> </p> <p> Mitigating Circumstance Level: <%= Html.Encode(item.Problem.MitigatingCircumstanceLevel.MCLevel)%> </p> <p> Absent From: <%= Html.Encode(String.Format("{0:g}", item.Problem.AbsentFrom))%> </p> <p> Absent Until: <%= Html.Encode(String.Format("{0:g}", item.Problem.AbsentUntil))%> </p> <p> Requested Follow Up: <%= Html.Encode(String.Format("{0:g}", item.Problem.RequestedFollowUp))%> </p> <p>Problem Communications</p> <% foreach (var comm in Model) { %> <p> <% if (item.Problem.ProblemID == comm.ProblemID) { %> <%= Html.Encode(comm.ProblemCommunication.CommunicationOutline)%> <% } %> </p> <% } %> </div> </div> <br /> <% } %> </div> The issue is that using the example data before the Model has two records for the same problem as there are two communications for that problem, therefore duplicating the output. Any help with this would be gratefully appreciated. Thanks, Jon

    Read the article

  • actionlistener not responding in java calculator

    - by tokee
    hi, please see calculator interface code below, from my beginners point of view the "1" should display when it's pressed but evidently i'm doing something wrong. any suggestiosn please? import java.awt.*; import javax.swing.*; import javax.swing.border.*; import java.awt.event.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; /** *A Class that operates as the framework for a calculator. *No calculations are performed in this section */ public class CalcFrame extends JPanel { private CalcEngine calc; private JFrame frame; private JTextField display; private JLabel status; /** * Constructor for objects of class GridLayoutExample */ //public CalcFrame(CalcEngine engine) //{ //frame.setVisible(true); // calc = engine; // makeFrame(); //} public CalcFrame() { makeFrame(); calc = new CalcEngine(); } class ButtonListener implements ActionListener { ButtonListener() { } public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("1")) { System.out.println("1"); } } } /** * This allows you to quit the calculator. */ // Alows the class to quit. private void quit() { System.exit(0); } // Calls the dialog frame with the information about the project. private void showAbout() { JOptionPane.showMessageDialog(frame, "Declan Hodge and Tony O'Keefe Group Project", "About Calculator Group Project", JOptionPane.INFORMATION_MESSAGE); } // ---- swing stuff to build the frame and all its components ---- /** * The following creates a layout of the calculator frame. */ private void makeFrame() { frame = new JFrame("Group Project Calculator"); makeMenuBar(frame); JPanel contentPane = (JPanel)frame.getContentPane(); contentPane.setLayout(new BorderLayout(8, 8)); contentPane.setBorder(new EmptyBorder( 10, 10, 10, 10)); /** * Insert a text field */ display = new JTextField(8); contentPane.add(display, BorderLayout.NORTH); //Container contentPane = frame.getContentPane(); contentPane.setLayout(new GridLayout(4, 5)); JPanel buttonPanel = new JPanel(new GridLayout(4, 4)); contentPane.add(new JButton("9")); contentPane.add(new JButton("8")); contentPane.add(new JButton("7")); contentPane.add(new JButton("6")); contentPane.add(new JButton("5")); contentPane.add(new JButton("4")); contentPane.add(new JButton("3")); contentPane.add(new JButton("2")); contentPane.add(new JButton("1")); contentPane.add(new JButton("0")); contentPane.add(new JButton("+")); contentPane.add(new JButton("-")); contentPane.add(new JButton("/")); contentPane.add(new JButton("*")); contentPane.add(new JButton("=")); contentPane.add(new JButton("C")); contentPane.add(new JButton("CE")); contentPane.add(new JButton("%")); contentPane.add(new JButton("#")); //contentPane.add(buttonPanel, BorderLayout.CENTER); frame.pack(); frame.setVisible(true); } /** * Create the main frame's menu bar. * The frame that the menu bar should be added to. */ private void makeMenuBar(JFrame frame) { final int SHORTCUT_MASK = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); JMenuBar menubar = new JMenuBar(); frame.setJMenuBar(menubar); JMenu menu; JMenuItem item; // create the File menu menu = new JMenu("File"); menubar.add(menu); // create the Quit menu with a shortcut "Q" key. item = new JMenuItem("Quit"); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, SHORTCUT_MASK)); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { quit(); } }); menu.add(item); // Adds an about menu. menu = new JMenu("About"); menubar.add(menu); // Displays item = new JMenuItem("Calculator Project"); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showAbout(); } }); menu.add(item); } }

    Read the article

  • Problem dismissing multiple modal view controllers

    - by Sheehan Alam
    I am having trouble getting my modal view controllers to display properly. I have a parent view controller that is the delegate for modal view A. In modal view A I am presenting modal view B, and having the delegate dimiss modal view A. When modal view B appears it seems to display but the screen dims, and the UI locks up, but the app doesn't crash. I set animation settings to NO and I am still getting the same issue.

    Read the article

  • Google Closure: Setting Input for AutoComplete Dynamically

    - by amuzed
    The Google Closure (GC) Javascript Library makes it very easy to create an AutoComplete UI, as this demo shows - http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/autocomplete-basic.html . Basically, all we have to do is define an array and pass it on as one of the parameters. I'd like to be able to update the array dynamically and have AutoComplete show the changes immediately. Example, if there are two arrays list1 = ["One", "Two", "Three"] list2 = ["1", "2", "3"] and an AutoComplete has been initialized using list1, var suggest = new goog.ui.AutoComplete.Basic(list1, document.getElementById('input'), false); how can I update the existing AutoComplete (suggest) to use list2?

    Read the article

  • Communicating with web service on SSL

    - by Krt_Malta
    Hi, I have a web service which previously was deployed on http. I used to generate stub classes using wsimport using wsimport http://localhost:8080/MiniForumService/MiniForumService?wsdl. Now I deployed it on SSL. But when I try to generate the stub classes from it using wsimport https://localhost:8443/MiniForumService/MiniForumService?wsdl but I'm getting the following error: unable to find valid certification path to requested target I'm using a self-signed certificate on the server. How can I solve this please? I've googled about but haven't found a solution till now Thanks and regards, Krt_Malta

    Read the article

  • Make CSRF middleware work in Django's 404 error pages

    - by jack
    I put a login box alone with a keyword search box in 404.html in a Django project so in case a 404 error is raised, visitors get more options to jump to other parts. But the CSRF middleware doesn't work in 404 error page with no csrf token rendered. I tried move 'django.middleware.csrf.CsrfViewMiddleware' to first of MIDDLEWARE_CLASSES in settings.py but did not work either. Anyone knows a solution?

    Read the article

  • Asp.net MVC ModelState.Clear

    - by Mr Grok
    Can anyone give me a succinct definition of the role of ModelState in Asp.net MVC (or a link to one). In particular I need to know in what situations it is necessary or desirable to call ModelState.Clear(). Can anyone give me a succinct definition of the role of ModelState in Asp.net MVC (or a link to one). In particular I need to know in what situations it is necessary or desirable to call ModelState.Clear(). Bit open ended huh... sorry, I think it might help if tell you what I'm acutally doing: I have an Action of Edit on a Controller called "Page". When I first see the form to change the Page's details everything loads up fine (binding to a "MyCmsPage" object). Then I click a button that generates a value for one of the MyCmsPage object's fields (MyCmsPage.SeoTitle). It generates fine and updates the object and I then return the action result with the newly modified page object and expect the relevant textbox (rendered using <%= Html.TextBox("seoTitle", page.SeoTitle)%) to be updated ... but alas it displays the value from the old model that was loaded. I've worked around it by using ModelState.Clear() but I need to know why / how it has worked so I'm not just doing it blindly. PageController: [AcceptVerbs("POST")] public ActionResult Edit(MyCmsPage page, string submitButton) { // add the seoTitle to the current page object page.GenerateSeoTitle(); // why must I do this? ModelState.Clear(); // return the modified page object return View(page); } Aspx: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MyCmsPage>" %> .... <div class="c"> <label for="seoTitle"> Seo Title</label> <%= Html.TextBox("seoTitle", page.SeoTitle)%> <input type="submit" value="Generate Seo Title" name="submitButton" /> </div>

    Read the article

  • Delphi - Differences between CompareStr and CompareString

    - by Bourgui
    Hi all, I'm hoping someone can shed some light on this for me What are the differences, in Delphi 2009, between the CompareStr (defined in SysUtils) and CompareString (from Windows API) functions? Both let you specify the locale to be used, is the Windows one simply more "complete", due to the available comparison flags? Is one consequently faster than the other? Thanks!

    Read the article

  • Translating external api results in Drupal

    - by Chuck Vose
    We're building a multi-language Drupal stack and one of the concerns we have is that our payment processor is going to have to send back some information to us. We've been able to narrow this down so that the strings they're sending back look like <country code>-<number of months> so we can easily translate that into any number of languages, except English. t('FR-12') is all well and good if we want to translate that into a french description, but because there's not an English language a similar string like t('EN-12') is not translatable. Similarly for the generic string: #API_Connection_Error This sort of generic string approach seemed really compelling to me at first but it seems to not work in Drupal. Do you have any suggestions about how to translate generic strings like this into both English and other languages? Thank you, I've been looking through Google all morning.

    Read the article

  • Most Astonishing Violation of the Principle of Least Astonishment

    - by Adam Liss
    The Principle of Least Astonishment suggests that a system should operate as a user would expect it to, as much as possible. In other words, it should never "astonish" the user with unexpected behavior. In your experience as the "astonishee," what types of systems are the worst offenders, and if you were the project manager, how would you correct the problem? Bonus if your answer describes how you'd retrain the developers!

    Read the article

  • Spring MVC validation with Annotations

    - by cdecker
    I'm having quite some trouble since I migrated my controllers from classical inheritance to use the annotations like @Controller and @RequestMapping. The problem is that I don't know how to plug in validation like in the old case. Are there any good tutorials about this?

    Read the article

  • Marvell promises $100 tablet for students

    <b>LinuxDevices:</b> "Marvell announced its intent to deliver a $100, Android-ready tablet computer built around a 1GHz Armada 600 series processor. Aimed at students, the "Moby" will offer WiFi, Bluetooth, GPS, an FM receiver, and Adobe Flash compatibility, the company says."

    Read the article

  • Error adding 4tb LUN (Raw Device Mapping) to ESX4 VM

    - by Tom Gardiner
    Hi guys, I'm trying to map an existing 4tb LUN from a Fibre Channel SAN, through to a VM in my ESX4 environment. It keeps telling me that the VMDK file size exceeds the the maximum size supported by the datastore. I've tried in Physical compatibility mode, and also both Virtual styles. I'm a little confused by this as we had the same LUN mapped through to another VM when we were running ESX3.5... I've also noticed that some of my other RAW mappings are generating extremely large VMDK files on the ESX servers. Does anyone know if this change in behaviour is intentional? And if so why? It doesn't seem to me that if the LUN is mapped directly to the VM that it's size should be relevant. We're running 4.0.0 build 236512, and 4.0.0 build 219382 and I've not had any success on either. Any insight or advice would be much appreciated! TG

    Read the article

  • Using terminal vs KDE in linux?

    - by Ke
    Hi Im used to using nautilus within centos but have recently just got a VPS and quickly realising that using a KDE is unacceptable in this environment. Although I do find it so much quicker doing things like folder permissions in KDE rather than typing it all out in the terminal? Everyone I speak to says, use the terminal and I should learn this way as opposed to using the KDE, but theres certain things I just dont get How is it possible to make quick changes to scripts and viewing them in a browser etc , without a mouse or using KDE? and only using a terminal?? I am wondering how to develop websites just using the terminal??? How can it be quicker to type out/view permissions etc in the terminal when its instant and just a few clicks in the KDE? Any thoughts are much appreciated. I would love to understand the benefits but just cant seem to see them right now. Cheers Ke.

    Read the article

  • Pro ASP.NET MVC Framework Review

    - by Ben Griswold
    Early in my career, when I wanted to learn a new technology, I’d sit in the bookstore aisle and I’d work my way through each of the available books on the given subject.  Put in enough time in a bookstore and you can learn just about anything. I used to really enjoy my time in the bookstore – but times have certainly changed.  Whereas books used to be the only place I could find solutions to my problems, now they may be the very last place I look.  I have been working with the ASP.NET MVC Framework for more than a year.  I have a few projects and a couple of major deployments under my belt and I was able to get up to speed with the framework without reading a single book*.  With so many resources at our fingertips (podcasts, screencasts, blogs, stackoverflow, open source projects, www.asp.net, you name it) why bother with a book? Well, I flipped through Steven Sanderson’s Pro ASP.NET MVC Framework a few months ago. And since it is prominently displayed in my co-worker’s office, I tend to pick it up as a reference from time to time.  Last week, I’m not sure why, I decided to read it cover to cover.  Man, did I eat this book up.  Granted, a lot of what I read was review, but it was only review because I had already learned lessons by piecing the puzzle together for myself via various sources. If I were starting with ASP.NET MVC (or ASP.NET Web Deployment in general) today, the first thing I would do is buy Steven Sanderson’s Pro ASP.NET MVC Framework and read it cover to cover. Steven Sanderson did such a great job with this book! As much as I appreciated the in-depth model, view, and controller talk, I was completely impressed with all the extra bits which were included.  There a was nice overview of BDD, view engine comparisons, a chapter dedicated to security and vulnerabilities, IoC, TDD and Mocking (of course), IIS deployment options and a nice overview of what the .NET platform and C# offers.  Heck, Sanderson even include bits about webforms! The book is fantastic and I highly recommend it – even if you think you’ve already got your head around ASP.NET MVC.  By the way, procrastinators may be in luck.  ASP.NET MVC V2 Framework can be pre-ordered.  You might want to jump right into the second edition and find out what Sanderson has to say about MVC 2. * Actually, I did read through the free bits of Professional ASP.NET MVC 1.0.  But it was just a chapter – albeit a really long chapter.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >