Search Results

Search found 2399 results on 96 pages for 'alex gosselin'.

Page 86/96 | < Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >

  • How to make UPDATE queries in LINQ to SQL?

    - by Alex
    I like using LINQ to SQL. The only problem is that I don't like the default way of updating tables. Let's say I have the following table with the following columns: ID (primary key), value1, value2, value3, value4, value5 When I need to update something I call UPDATE ... WHERE ID=@id LINQ to SQL call UPDATE ... WHERE ID=@id and value1=@value1 and value2=@value2 and value3=@value3 and value4=@value4 and value5=@value5 I can override this behavior by adding UpdateCheck=UpdateCheck.Never to every column, but with every update of the DataContext class with the GUI, this will be erased. Is there any way to tell LINQ to use this way of updating data?

    Read the article

  • Double "!!" in Ruby [closed]

    - by Alex Maslakov
    Possible Duplicate: What does !! mean in ruby? Ruby, !! operator (a/k/a the double-bang) Sometimes I see a Ruby code like this def sent? !!@sent_at end It seems to be not logical. Is it necessary to use here double !? As far as I'm concerned, it might be just def sent? @sent_at end UPDATE: then what is the difference between these def sent? !!@sent_at end def sent? @sent_at.nil? end def sent? @sent_at == nil end

    Read the article

  • jquery $.ajax load in UI dialog() problem

    - by alex
    i have a working bing Image search api with jsonp datatype. It's working with no problems. When i load the image search script in a Jquery UI dialog, it display properly and i'm able to search and see the results in the dialog() box. But if i close the dialog() and open it again, now if i search no results show. Looking at console.log, i do confirm the jason data is recieved, but for some reason it's not appending to the result div, so i see no result on the screen. This onyl happens if i close the dialog and open it again. If i refresh refresh the page and open the dialog again then search results are displayed. This is what i'm using to append the results. $.each(data.SearchResponse.Image.Results, function(i, item) { console.log(item.Thumbnail.Url); $("#Results").append("<li><img style='width:100px; height:75px;' src='" + item.Thumbnail.Url + "'/></li>"); });

    Read the article

  • Printing a JFrame and its components

    - by Alex Terreaux
    I have been working in a big program and one of its functionalities should be to print the contents of the main window. I checked the API and found this example: http://docs.oracle.com/javase/tutorial/2d/printing/gui.html it was very helpful, I tried to use that code in my program by placing this inside the actionperformed method of my print button: PrinterJob job = PrinterJob.getPrinterJob(); job.setPrintable(this); boolean ok = job.printDialog(); if (ok) { try { job.print(); } catch (PrinterException ex) { /* The job did not successfully complete */ } } If I click the print button, I get a printer dialog and when I tell it to print, it just prints a blank document. I know the above code is not all I need, as I've seen in the API's examples there is a print() method, but apparently they never call it, so it is pretty confusing. I've tried calling and using it many times, but with no success. Also, I think that when I finally get it to print, my window will need to be printed in the landscape orientation, it even may need some scaling. Any ideas on how to do that? I would like any useful help to help me implement this code successfully. I know I should be able to do it by myself just by checking the documentation (I've tried for almost 2 days now) but I can't get it to work. I've learned all the programming I know through the internet. Any help will be greatly appreciated.

    Read the article

  • How do I send this email in Python, opening files and stuff?

    - by alex
    msg = EmailMessage(subject, body, from_email, [to_email]) msg.content_subtype = "html" msg.send() This is how I send an email in Django. But what if I want to open a text file and take into account all its line breaks and tabs. I want to take the body of the text file (with line breaks \n) and email it as text of the "body".

    Read the article

  • Java / MySQL - How to access connection from another class?

    - by Alex
    I'm just getting my head around java (and OOP for that matter), the only thing I am familiar with is MySQL. I need to keep the DB connection open throughout the duration of the application, as well as a server socket. I'm not even sure if they both need separate classes, but here's what I have so far: http://pastebin.com/qzMFFTrY (it wouldn't all go in a code tag) The variable I need is con for line 86.

    Read the article

  • SElinux integrety check

    - by Alex
    How can i check (with SELinux) access to the file by process name? For examle: we have 2 process: * /usr/bin/foo1 * /usr/bin/foo2 They are run under account with username userA and try to open for modify file: /home/userA/test.txt I want that if foo1 try to open file - it's ok. But if foo2 try to open this file - i have message about this in /var/log Problem is that both processes have the same user ID. And i cant use RBAC by username.

    Read the article

  • Get page url using javascript

    - by Alex
    Hello, could some one recommend a way to get page name from a url using JavaScript? For instance if I have http://www.cnn.com/news/1234/news.html?a=1&b=2&c=3 I just need to get "news.html" string Thanks!

    Read the article

  • Remove a character from a given position on Oracle

    - by alex
    Is there anyway to remove a character from a given position? Let's say my word is: PANCAKES And I want to remove the 2nd letter (in this case, 'A'), so i want PNCAKES as my return. Translate doesnt work for this. Replace doesnt work for this. Regex is damn complicated... Ideas?

    Read the article

< Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >