Daily Archives

Articles indexed Monday April 26 2010

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

  • How to connect to SqlExpress for Entity Framework using Visual Studio 2010 Express?

    - by Mike
    Hi everyone, I'm trying to use the Visual Studio 2010 Express editions to set up an ASP.NET MVC 2 Web Application using SqlExpress + Entity Framework as the data access. I have both the "C# Edition" and "Web Developer Edition" installed. If I try to add a data source using the "C# edition", I'm missing the "Microsoft SQL Server" data source type. but Visual Studio 2008 Professional has it. as noted by another StackOverflow question, the "Web Developer Edition" has this. However, the Web Developer Edition doesn't support the Entity Framework items: . I'd want to stick with only the Express Editions. Is my use case one that Microsoft forgot about? What can I do here to use SqlExpress + MVC 2 + Entity Framework? Thanks! -Mike

    Read the article

  • Java's TreeSet equivalent in Python?

    - by viksit
    I recently came across some Java code that simply put some strings into a Java TreeSet, implemented a distance based comparator for it, and then made its merry way into the sunset to compute a given score to solve the given problem. My questions, Is there an equivalent data structure available for Python? The Java treeset looks basically to be an ordered dictionary that can use a comparator of some sort to achieve this ordering. I see there's a PEP for Py3K for an OrderedDict, but I'm using 2.6.x. There are a bunch of ordered dict implementations out there - anyone in particular that can be recommended? Thanks.

    Read the article

  • Does TAM == TAPI3 Voice Compliance?

    - by Wayne Hartman
    I am looking to purchase some cheap USB modems that claim to be able to use TAM (Telephone answering machine). I am an unable to see any explicit commands that these devices support. Would it be safe to assume that these devices support the AT instructions for playing/recording audio from the modem?

    Read the article

  • not a valid iso file error

    - by user23950
    I'm trying this windows 7 usb/dvd download tool that I discovered from ars technica: http://arstechnica.com/business/news/2009/12/-the-usb-flash-drive.ars But I don't know why my windows 7 iso file does not work and its saying that its not a valid iso file. What do I do, do you know of other tools that can burn / extract iso file contents to a flash drive? Except the tool that is always showing up when you search in google, the command prompt one: http://arstechnica.com/business/news/2009/12/-the-usb-flash-drive.ars/2 A free tool for windows xp or 7

    Read the article

  • SQL SERVER – Attach mdf file without ldf file in Database

    - by pinaldave
    Background Story: One of my friends recently called up and asked me if I had spare time to look at his database and give him a performance tuning advice. Because I had some free time to help him out, I said yes. I asked him to send me the details of his database structure and sample data. He said that since his database is in a very early stage and is small as of the moment, so he told me that he would like me to have a complete database. My response to him was “Sure! In that case, take a backup of the database and send it to me. I will restore it into my computer and play with it.” He did send me his database; however, his method made me write this quick note here. Instead of taking a full backup of the database and sending it to me, he sent me only the .mdf (primary database file). In fact, I asked for a complete backup (I wanted to review file groups, files, as well as few other details).  Upon calling my friend,  I found that he was not available. Now,  he left me with only a .mdf file. As I had some extra time, I decided to checkout his database structure and get back to him regarding the full backup, whenever I can get in touch with him again. Technical Talk: If the database is shutdown gracefully and there was no abrupt shutdown (power outrages, pulling plugs to machines, machine crashes or any other reasons), it is possible (there’s no guarantee) to attach .mdf file only to the server. Please note that there can be many more reasons for a database that is not getting attached or restored. In my case, the database had a clean shutdown and there were no complex issues. I was able to recreate a transaction log file and attached the received .mdf file. There are multiple ways of doing this. I am listing all of them here. Before using any of them, please consult the Domain Expert in your company or industry. Also, never attempt this on live/production server without the presence of a Disaster Recovery expert. USE [master] GO -- Method 1: I use this method EXEC sp_attach_single_file_db @dbname='TestDb', @physname=N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDb.mdf' GO -- Method 2: CREATE DATABASE TestDb ON (FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDb.mdf') FOR ATTACH_REBUILD_LOG GO Method 2: If one or more log files are missing, they are recreated again. There is one more method which I am demonstrating here but I have not used myself before. According to Book Online, it will work only if there is one log file that is missing. If there are more than one log files involved, all of them are required to undergo the same procedure. -- Method 3: CREATE DATABASE TestDb ON ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDb.mdf') FOR ATTACH GO Please read the Book Online in depth and consult DR experts before working on the production server. In my case, the above syntax just worked fine as the database was clean when it was detached. Feel free to write your opinions and experiences for it will help the IT community to learn more from your suggestions and skills. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, Readers Question, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • How to block calls in android

    - by Anurag Uniyal
    I want to block calls from few numbers, for that I want to write a app of my own. So what are the APIs which I should be using? Basically I want to get notified when a call comes, i want to compare numbers if it is what i want to block, i want to cut the call or mute it or if possible mute it and record it.

    Read the article

  • Receiving DB update events in .NET from SQLite

    - by Dan Tao
    I've recently discovered the awesomeness of SQLite, specifically the .NET wrapper for SQLite at http://sqlite.phxsoftware.com/. Now, suppose I'm developing software that will be running on multiple machines on the same network. Nothing crazy, probably only 5 or 6 machines. And each of these instances of the software will be accessing an SQLite database stored in a file in a shared directory (is this a bad idea? If so, tell me!). Is there a way for each instance of the app to be notifiied if one instance updates the database file? One obvious way would be to use the FileSystemWatcher class, read the entire database into a DataSet, and then ... you know ... enumerate through the entire thing to see what's new ... but yeah, that seems pretty idiotic, actually. Is there such a thing as a provider of SQLite updates? Does this even make sense as a question? I'm also pretty much a newbie when it comes to ADO.NET, so I might be approaching the problem from the entirely wrong angle.

    Read the article

  • Azure scalability over XML File

    - by dayscott
    What is the best practise solution for programmaticaly changing the XML file where the number of instances are definied ? I know that this is somehow possible with this csmanage.exe for the Windows Azure API. How can i measure which Worker Role VMs are actually working? I asked this question on MSDN Community forums as well: http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/02ae7321-11df-45a7-95d1-bfea402c5db1

    Read the article

  • How to stop a WPF binding from ignoring the PropertyChanged event that it caused?

    - by Jacob Stanley
    I have a TextBox bound to a ViewModel's Text property with the following setup: Xaml <TextBox Text="{Binding Text}"/> C# public class ViewModel : INotifyPropertyChanged { public string Text { get { return m_Text; } set { if (String.Equals(m_Text, value)) { return; } m_Text = value.ToLower(); RaisePropertyChanged("Text"); } } // Snip } When I type some stuff in to the TextBox it successfully sets the Text property on the ViewModel. The problem is that WPF ignores the property changed event that is raised by it's own update. This results in the user not seeing the text they typed converted to lowercase. How can I change this behaviour so that the TextBox updates with lowercase text? Note: this is just an example I have used to illustrate the problem of WPF ignoring events. I'm not really interested in converting strings to lowercase or any issues with String.Equals(string, string).

    Read the article

  • How can I stop user from navigating to the previous page

    - by ryanlancer
    Hi, I am developing a simple email portal as my college assignment and I refer gmail for various features.Now when we sign into a gmail account and then if we hit the back button of the browser we somehow still remain on the inbox page.In my case after login if I press back button I comeback to the login page.Please suggest how can I achieve this.Also I am a newbie to ASP.NET so keep it detailed

    Read the article

  • Javascript cross-domain web request fails with Status=0?

    - by Tav
    Yes, I know the following code does not work in IE. I know IE expects me to use XDomainRequest() instead. I don't care about that. This is firefox only. I'm trying to do a cross-domain web request in firefox javascript. I keep getting a status of 0. Does anyone know why? var url = "http://newyork.craigslist.org"; var xdr = new XMLHttpRequest(); //Yes, I know IE expects XDomainRequest. Don't care xdr.onreadystatechange = function() { if (xdr.readyState == 4) { alert(xdr.status); //Always returns 0! And xdr.responseText is blank too } } xdr.open("get", url, true); xdr.send(null); Shouldn't that work?

    Read the article

  • Why people do not like OOP? [closed]

    - by Gabriel Šcerbák
    I do not understand why people choose C++ over Smalltalk in past and why Java over Python or Ruby. What is it that ties people so much to the procedural programming and makes it so difficult to go "all the way" to object oriented programming? What makes OOP hard? Should not objects be an abstraction which is easier to grasp for people, i.e. a more natural one than procedures? Is education the problem (because people tend to learn procedural programming before object oriented)?

    Read the article

  • Vim, LaTeX, word-wrapping, and version control

    - by Bkkbrad
    I'm writing a LaTeX document in vim, and I have it hard wrapping at 80 characters to make reading easier. However, this causes problems with tracking changes with in version control. For example, inserting "Lorem ipsum" at the beginning of this text: 1 Dolor sit amet, consectetur adipiscing elit. Phasellus bibendum lobortis lectus 2 quis porta. Aenean vestibulum magna vel purus laoreet at molestie massa 3 suscipit. Vestibulum vestibulum, mauris nec convallis ultrices, tellus sapien 4 ullamcorper elit, dignissim consectetur justo tellus et nunc. results in: 1 Lorum ipsum dolor sit amet, consectetur adipiscing elit. Phasellus bibendum 2 lobortis lectus quis porta. Aenean vestibulum magna vel purus laoreet at 3 molestie massa suscipit. Vestibulum vestibulum, mauris nec convallis ultrices, 4 tellus sapien ullamcorper elit, dignissim consectetur justo tellus et nunc. When I review this change in git, it tells me that all the lines of the paragraph have changed because of the wrapping, even though only one semantic change has occurred. One way around this problem is to have every sentence on its own line. This looks the same in the rendered document, but the source now is harder to read, because each line has quite a different line length: 1 Lorum ipsum dolor sit amet, consectetur adipiscing elit. 2 Phasellus bibendum lobortis lectus quis porta. 3 Aenean vestibulum magna vel purus laoreet at molestie massa suscipit. 4 Vestibulum vestibulum, mauris nec convallis ultrices, tellus sapien ullamcorper elit, dignissim consectetur justo tellus et nunc. (If I soft wrap at 80, things still look bad, just in a different way.) Is it possible to have my text on disk with one newline per sentence, but display and edit it in vim as if the text of each paragraph was one long line, soft wrapped at 80 characters? I assume it requires some vim-foo rather than tweaking git or LaTeX.

    Read the article

  • Algorithm to generate all possible permutations of a list?

    - by LLer
    Say I have a list of n elements, I know there are n! possible ways to order these elements. What is an algorithm to generate all possible orderings of this list? Example, I have list [a, b, c]. The algorithm would return [[a, b, c], [a, c, b,], [b, a, c], [b, c, a], [c, a, b], [c, b, a]]. I'm reading this here http://en.wikipedia.org/wiki/Permutation#Algorithms_to_generate_permutations But Wikipedia has never been good at explaining. I don't understand much of it.

    Read the article

  • Output to jTextArea in realtime

    - by Robert
    I have some code which takes a few minutes to process, it has to connect to the web for each string in a long array, each string is a url. I want to make it so that everytime it connects, it should refresh the jtextarea so that the user is not staring into a blank page that looks frozen for 20 min. or however long it takes. here is an example of something i tried and didnt work: try { ArrayList<String> myLinks = LinkParser.getmyLinksArray(jTextArea1.getText()); for (String s : myLinks) { jTextArea2.append(LinkChecker.checkFileStatus(s) + "\n"); } } catch (IOException ex) { JOptionPane.showMessageDialog(jTextArea1, "Parsing Error", "Parsing Error", JOptionPane.ERROR_MESSAGE); Logger.getLogger(MYView.class.getName()).log(Level.SEVERE, null, ex); }

    Read the article

  • Getting progress status out of a class library method

    - by Richard
    This app that I am doing uses a class library (if I dare call it that) to do the bulk of the work: 2 main methods in there (DoWork and UndoWork) use the other classes to achieve thier goal. Now that that works, I want to get out of the Console test enviroment and do a GUI. How would I get the status of say, the DoWork() method to update a progress bar? Should I multilate the class library (which currently works with the Console and Windows.Forms) to update? The problem with that is that I would surely have to make the class library use Window.Forms which will mess up the console testing apps (And there are lots of them - I tested all the way through, and then all together). Could you suggest some ideas, or places I can read up about ideas (the whole point of writing this this program is to learn, afer all)? Oh, by the way, suggestions like "foresight" or "planning" probably won't help here...(now, anywyay!) - But certainly will in future projects!

    Read the article

  • Using WCF authentication service for web application

    - by user200295
    I am using a WCF authentication service I set up with a web application. I have successfully set up and tested the AuthenticationService and RolesService. The web application can successfully call methods like ValidateUser and GetRolesForCurrentUser through the WCF services. I want to integrate the WCF authentication service with my web.config and site.map. Do I need to write a custom provider, or is there some way I can modify the web.config of the web application to use the WCF authentication service as its membership provider? This way I can set what roles have access to what directories based off the WCF authentication service.

    Read the article

  • What software can copy the whole hard drive with Operating System to DVD-R, and be able to "refresh

    - by Jian Lin
    What software can take a snapshot of a Win XP or Win 7 machine -- burning all files into a DVD-R, and then be able to boot from that DVD-R can restore the whole machine back to that state stored inside the DVD-R? Maybe for Win XP, it is easier as the OS can be just 1 or 2GB on the hard drive, but for Win 7, a fresh installation is already 16GB on the hard drive, so it will need several DVD-R to take the snapshot? thanks. (any of these software are open source?)

    Read the article

  • iPhone surfing via USB... without wifi or data plan?

    - by Philipp Lenssen
    I bought an iPhone in China, where it is manufactured without Wifi. (I would have to switch carriers to sign up for a data plan as my current Chinese carrier doesn't support surfing either... if possible I want to avoid getting yet another card though.) Can I somehow surf with the iPhone Safari while USB-connected to my net-enabled laptop? Thanks!

    Read the article

  • Django's makemessages creates a lot of fuzzy entries

    - by jack
    Each time I added some strings to a Django string, I run "django-admin.py makemessages -all" to generate .PO files for all locales. The problem is even I only added 5 news strings, the makemessages command will make 50 strings as fuzzy in .PO files which brings a lot of extra work for our locale maintainers. This also makes the entire i18n unusable before they manually revise those fuzzy strings.

    Read the article

  • How to do relative imports in Python?

    - by Joril
    Imagine this directory structure: app/ __init__.py sub1/ __init__.py mod1.py sub2/ __init__.py mod2.py I'm coding mod1, and I need to import something from mod2. How should I do it? I tried from ..sub2 import mod2 but I'm getting an "Attempted relative import in non-package". I googled around but found only "sys.path manipulation" hacks. Isn't there a clean way? Edit: all my __init__.py's are currently empty Edit2: I'm trying to do this because sub2 contains classes that are shared across sub packages (sub1, subX, etc.). Edit3: The behaviour I'm looking for is the same as described in PEP 366 (thanks John B)

    Read the article

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