Daily Archives

Articles indexed Monday June 14 2010

Page 9/108 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • VS2010 "An item with the same key has already been added"

    - by fneep
    I recently installed Visual Studio 2010 and copied and converted an old VS2005 solution to VS2010 When I edit this solution, if I try to change a control's .image property, VS2010 creates a message box telling me that "An item with the same key has already been added" (screenshot below), and won't let me browse for an image. I can add images for any other solution, even others ported from VS2005, but not this one. Any idea what I'm doing wrong?

    Read the article

  • Adding confirmable module to an existing site using Devise

    - by slythic
    Hi all, I'm using devise for a web app and wanted to add the confirmable module to the site. However, since a confirmation_token isn't generated users can't sign in. When clicking the 'Didn't receive confirmation instructions?' link the token still isn't generated. What is the best way to get this to work? Many thanks, Tony

    Read the article

  • Looking for a .NET 3.5 / J2EE architecture concept comparison article/chart

    - by Edward Tanguay
    We are thinking about combining .NET technology with Java technology (WCF, JBoss/ESB, MOM, WPF, WF) and I need to have a high-level idea of what are the apples and oranges in the .NET 3.5 and Java worlds. Does anyone know of a good, clear article or better yet a simple chart which answers questions such as: WCF in the Java world is __ the equivalent of WPF in the Java world is _ the closes thing to JBoss in the .NET world is _ the JVM and CLR are essentially the same except for these differences: .... in the Java world you don't have the concept of WF/WCF/WPF, instead you have .... there is no "LINQ" in the Java world yet, but you can use ___ the closest you get to ADO.NET Data Services in the Java world is .... I'm not looking to debate this so I'm not looking for "fighting points", I just need a neutral what-is-what chart comparing the two worlds.

    Read the article

  • Repositories and the Save Method

    One of the questions I've been getting lately goes like this: Should a Repository class have a Save method? And the standard answer: It depends. It's hard to keep track of all the different approaches to implementing the repository pattern these days, but I assume when someone asks me this type of question they are thinking of using code like this: var employee = new Employee(); employeeRepository.Save(employee); var account = new Account(); accountRepository.Save(account); This...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How to access child element out of children()?

    - by user291701
    Hi, I'd like to get the # of immediate children an element has, and then get the class of a child at a particular index. Something like: var index = 25; var children = $("#myListElement").children(); if (index < children.length) { if (children[index].hasClass("testClass")) { alert("hi!"); } } I think the syntax for .children() is ok, but how do I get the indexed element out of them in jquery style? Thanks

    Read the article

  • Returning the element number of the longest string in an array

    - by JohnRoberts
    I'm trying to get the longestS method to take the user-inputted array of strings, then return the element number of the longest string in that array. I got it to the point where I was able to return the number of chars in the longest string, but I don't believe that will work for what I need. My problem is that I keep getting incompatible type errors when trying to figure this out. I don't understand the whole data type thing with strings yet. It's confusing me how I go about return a number of the array yet the array is of strings. The main method is fine, I got stuck on the ???? part. { public static void main(String [] args) { Scanner inp = new Scanner( System.in ); String [] responseArr= new String[4]; for (int i=0; i<4; i++) { System.out.println("Enter string "+(i+1)); responseArr[i] = inp.nextLine(); } int highest=longestS(responseArr); } public static int longestS(String[] values) { int largest=0 for( int i = 1; i < values.length; i++ ) { if ( ????? ) } return largest; } }

    Read the article

  • Using WordPress as a CMS

    - by tonsils
    Hi, Hoping someone can assist but I am currently teaching myself WordPress and working on my own CMS site. My site will consist of approx 5 pages where the header/sidebar menu/footer will be seen on all these 5 pages. Newbie here and questions are as follows: 1) All these 5 pages will consist of different content, for example, every page will have a image banner representing the menu option just clicked, for example, "About Us" on page 5, "Promotions" on page 4 etc and then some text beneath that and then possibly some images inside a carousel set up. Within WordPress, how would I tackle this, i.e. do I just create a page in WordPress, position the banner image at the top of the page, then have a few breaks and then insert the carousel of images - is this correct? If not, do I need to create a separate php file called aboutUs.php that has this markup and then somehow link it to a WordPress page? 2) On my landing page of my site ONLY (page 1), just above the footer, I want to display a div section that displays all the sponsors of the website along with a URL to click to their websites - how would I go about doing this in WordPress? If there are any sites that people know that will somehow answer my queries, pls pass them on. Thanks.

    Read the article

  • Show app running time in iPhone

    - by Sam
    I would like to write a counter that shows how many seconds an app has be running for. (textView) and the counter should be cumulative and starts from where it left off. Im new to iphone sdk.

    Read the article

  • SqlCeResultSet re-use

    - by pdiddy
    Can I reuse an existing result set to filter? Lets say I have a result set that contains all data. Then I want to filter that resultset. Can I just execute the sqlcommand on the same resultset? I tried and it didn't seem to work. Does someone know the reason? So the only way to make it work was to create a new resultset and execute the command on that one. So this way I'm always creating a new resulset, can this have some issue?

    Read the article

  • centos: linking lib that doesn't have a .pc file for pkg-config

    - by Paulie
    I'm trying to compile svg2pdf on centos. I think I've managed to get the required dependencies installed using yum: sudo yum install librsvg2 sudo yum install cairo The Makefile contains: MYCFLAGS=`pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations - Wnested-externs -fno-strict-aliasing MYLDFLAGS=`pkg-config --libs librsvg-2.0 cairo-pdf` After typing 'make', the first couple of lines of output are: cc `pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing `pkg-config --libs librsvg-2.0 cairo-pdf` svg2pdf.c -o svg2pdf Package librsvg-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `librsvg-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'librsvg-2.0' found There is no librsvg-2.0.pc on this system (but there is when I installed this using macports on my macbookpro). How should I get this package linked? Should I change the Makefile, and if so, to what? Should I generate the .pc files, and if so, how? Or is there another way to resolve this? Or, has anyone been successful at installing svg2pdf on centos, and, if so, how did you manage it? I don't have much experience on linux, so I might be missing something obvious.

    Read the article

  • Collect temperature and fan speed with munin from Windows 7 PC?

    - by mfn
    Hi, I'm quite fond of munin and using it also at home to monitor my PCs. What was super-duper easy under Linux is pretty much unsolvable for me under Windows: I'd like to monitor CPU and Motherboard temperatures as well as fan speed. On Linux I'm using lm-sensors and the plugin for munin was basically there. I access already some information from my Windows machine via SNMP (disk space, CPU usage, memory usage); the graphs are simple as is the information exposed via SNMP, but they do their job. But when it comes to temperature and fan speed I'm running against a wall. My research so far resulted in that Windows does not by default provide out of the box ability to retrieve temperature/fan speed data. Third party applications are necessary which have know-how how to communicate with the Motherboard chips. The best I cam up with is that SpeedFan exposes a shared memory interface and there exists a library which hooks into Windows SNMP facility and bridges over to SpeedFans shared memory interface; it's called SFSNMP (site currently down). Unfortunately the library doesn't work, there's a bug report at SpeedFan open about it, but it's currently not moving (although the SFSNMP author is active there) . So, unless that's going to work like anytime soon, are there any alternatives? I'm not found of buying any software to get that feature, given that I take it as granted that my system exposes me the information to properly monitor it, but anyway don't just not answer because of this.

    Read the article

  • Adding nodes to the edge of a path

    - by user146780
    Right now i'm drawing Polygons like this: http://img810.imageshack.us/img810/8530/uhohz.png As you can see some of the edges on the outline are wrong. How could I fix these edge issues, I think I'd need to add more verticies near the edges. How could I? Thanks

    Read the article

  • Why isn't componentHidden called for my JPopupMenu?

    - by heycam
    I want to be notified when my JPopupMenu is hidden — whether because an item was selected, the menu was dismissed, or setVisible(false) was called on it. Here is my test code: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class A extends ComponentAdapter implements Runnable, ActionListener { private JButton b; public static void main(String[] args) { EventQueue.invokeLater(new A()); } public void run() { JFrame f = new JFrame("Test"); b = new JButton("Click me"); b.addActionListener(this); f.add(b); f.pack(); f.setVisible(true); } public void actionPerformed(ActionEvent e) { JPopupMenu pm = new JPopupMenu(); pm.addComponentListener(this); pm.add("Popup..."); pm.add("...menu!"); pm.show(b, 10, 10); } public void componentShown(ComponentEvent e) { System.out.println("componentShown"); } public void componentHidden(ComponentEvent e) { System.out.println("componentHidden"); } } Regardless of how I interact with the menu, neither of the two ComponentListener methods are being called. Why is that? Is there different/better/correct way of finding out when my JPopupMenu is hidden? Thanks, Cameron

    Read the article

  • C# problem with ADO

    - by ahmed
    When i use the following code, i get this error : "OleDbexception Syntax error in INSERT INTO statement. plz help me! { // add the new username System.Data.OleDb.OleDbCommandBuilder cb; cb = new System.Data.OleDb.OleDbCommandBuilder(da); DataRow dRow = cPD_DatabaseDataSet.Tables["users_table"].NewRow(); dRow[0] = this.textBox_add_user.Text ; dRow[1] = this.textBox_password.Text ; cPD_DatabaseDataSet.Tables["users_table"].Rows.Add(dRow); //add new record cb.GetUpdateCommand(); cb.GetInsertCommand(); //save new recode into the Access file da.Update(cPD_DatabaseDataSet, "users_table"); //clear textboxes this.textBox_add_user.Text = ""; this.textBox_password.Text = ""; this.textBox_re_password.Text = ""; } catch (System.Data.OleDb.OleDbException exp) { //close the connection this.con.Close(); MessageBox.Show(exp.ToString()); }`

    Read the article

  • How to html encode the output of an MVC view?

    - by jessegavin
    I am building a web app which will generate lots of different code templates (HTML tables, XML documents, SQL scripts) that I want to render on screen as encoded HTML so that people can copy and paste those templates. I would like to be able to use asp.net mvc views to generate the code for these templates (rather than, say, using a StringBuilder). Is there a way using asp.net mvc to store the results of a rendered view into a string? Something like the following perhaps? public ContentResult HtmlTable(string format) { var m = new MyViewModel(); m.MyDataElements = _myDataRepo.GetData(); // Somehow render the view and store it as a string? // Not sure how to achieve this part. var viewHtml = View(m); var htmlEncodedView = Server.HtmlEncode(viewHtml); return Content(htmlEncodedView); } NOTE: My original question mentioned NHaml views specifically, but I realized that this wasn't view engine specific. So if you see answers related to NHaml, that's why.

    Read the article

  • LM Sensors always returning same (invalid) value for one temp sensor

    - by pkaeding
    I am trying to monitor the temp sensors on a server, and plot them using Cacti. I have lm-sensors installed and working correctly. For example, here is the output from sensors: % sensors acpitz-virtual-0 Adapter: Virtual device temp1: +26.8 C (crit = +100.0 C) temp2: +32.0 C (crit = +60.0 C) coretemp-isa-0000 Adapter: ISA adapter Core 0: +36.0 C (high = +105.0 C, crit = +105.0 C) coretemp-isa-0001 Adapter: ISA adapter Core 1: +42.0 C (high = +105.0 C, crit = +105.0 C) However, when I try to get this data via SNMP, I get only one sensor's temperature correctly, and another one always returns 100.000 C: % snmpwalk -Os -c public -v 1 10.8.0.18 -m ALL lmTempSensors lmTempSensorsIndex.1 = INTEGER: 0 lmTempSensorsIndex.2 = INTEGER: 1 lmTempSensorsDevice.1 = STRING: temp1 lmTempSensorsDevice.2 = STRING: temp1 lmTempSensorsValue.1 = Gauge32: 26800 lmTempSensorsValue.2 = Gauge32: 100000 So, my question is two-fold: Why is the second sensor that is returned by SNMP giving a value of 100 C (when it should be 32 C) Why are my CPU core sensors not being returned by SNMP?

    Read the article

  • SQLAuthority News – Author Visit – SQL Server 2008 R2 Launch

    - by pinaldave
    June 11, 2010 was a wonderful day because I attended the very first SQL Server 2008 R2 Launch event held by Microsoft at Mumbai. I traveled to Mumbai from my home town, Ahmedabad. The event was located at one of the best hotels in Mumbai,”The Leela”. SQL Server R2 Launch was an evening event that had a few interesting talks. SQL PASS is associated with this event as one of the partners and its goal is to increase the awareness of the Community about SQL Server. I met many interesting people and had a great networking opportunity at the event. This event was kicked off with an awesome laser show and a “Welcome” video, which was followed by a Microsoft Executive session wherein there were several interesting demo. The very first demo was about Powerpivot. I knew beforehand that there will be Powerpivot demos because it is a very popular subject; however, I was really hoping to see other interesting demos from SQL Server 2008 R2. And believe me; I was happier to see the later demos. There were demos from SQL Server Utility Control Point, as well an integration of Bing Map with Reporting Servers. I really enjoyed the interactive and informative session by Shivaram Venkatesh. He had excellent presentation skills as well as ample technical knowledge to keep the audience attentive. I really liked his presentations skills wherein he did not read the whole slide deck; rather, he picked one point and using that point he told the story of the whole slide deck. I also enjoyed my conversation with Afaq Choonawala, who is one of the “gem guys” in Microsoft. I also want to acknowledge Ashwin Kini and Mohit Panchal for their excellent support to this event. Mumbai IT Pro is a user group which you can really count on for any kind of help. After excellent demos and a vibrant start of the event, all the audience was jazzed up. There were two vendors’ sessions right after the first session. Intel had 15 minutes to present; however, Intel’s representative, who had good knowledge of the subject, had nearly 30+ slides in his presentation, so he had to rush a bit to cover the whole slide deck. Intel presentations were followed up by another vendor presentation from NetApp. I have previously heard about this tool. After I saw the demo which did not work the first time the Net App presenter demonstrated it, I started to have a doubt on this product. I personally went to clarify my doubt to the demo booth after the presentation was over, but I realize the NetApp presenter or booth owner had absolutely a POOR KNOWLEDGE of SQL Server and even of their own NetApp product. The NetApp people tried to misguide us and when we argued, they started to say different things against what they said earlier. At one point in their presentation, they claimed their application does something very fast, which did not really happen in front of all the audience. They blamed SQL Server R2 DBCC CHECKDB command for their product’s failed demonstration. I know that NetApp has many great products; however, this one was not conveyed clearly and even created a negative impression to all of us. Well, let us not judge the potential, fun, education and enigma of the launch event through a small glitch. This event was jam-packed and extremely well-received by everybody who attended it. As what I said, average demos and good presentations by MS folks were really something to cheer about. Any launch event is considered as successful if it achieves its goal to excite users with its cutting edge technology; just like this event that left a very deep impression on me. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority Author Visit, SQLAuthority News, T SQL, Technology Tagged: PASS, SQLPASS

    Read the article

  • Accessing contents of a file in a web-application without uploading.

    - by UniCoder
    As far as I can tell, it is impossible to access the content of files on the user's computer in a web application without first uploading to the server, then re-downloading to user, unless some sort of plug-in is used. (Flash, etc.) Ideally, the user would upload the file directly to localstorage and then scripts would have a chance to process/display/validate/filter without the user having to wait on an upload. Are there any features in upcoming web standards such as html5 that will allow this? If not, why has there been no effort to make this possible, and how can I work around it without getting stuck with plugins?

    Read the article

  • Preventing Spoofing with Paypal

    - by wcpro
    I have a scenario where i need to have a user checkout through PayPal and then once we receive the payment then we create a membership record in our membership site. The PayPal requires a "return" field when you submit the form button that will take the user back to our page once the order has been successfully processed. On that page is where we actually track the sale and fire a chunk of javascript to track the sale. So my question is this, how can i make sure that the return page comes from PayPal and is not spoofed by a user in the system. I know there is a way to use the notify_url to have PayPal post back to our system, but in this case i have to run a chunk of javascript. Is there an easy way to do this, or would i have to write some looping/timeout function that checks to see if the notify post has come through? Im using .net to do the posting to paypal

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >