Monthly Archives

Articles indexed in January 2011

Page 17/604 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • im unable to validate a login of users ,since if im entering the wrong values my datareader is not getting executed y ?

    - by Salman_Khan
    //code private void glassButton1_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox1.Text == "" || comboBox1.SelectedIndex == 0) { Message m = new Message(); m.ShowDialog(); } else { try { con.ConnectionString = "Data source=BLACK-PEARL;Initial Catalog=LIFELINE ;User id =sa; password=143"; con.Open(); SqlCommand cmd = new SqlCommand("Select LoginID,Password,Department from Login where LoginID=@loginID and Password=@Password and Department=@Department", con); cmd.Parameters.Add(new SqlParameter("@loginID", textBox1.Text)); cmd.Parameters.Add(new SqlParameter("@Password", textBox2.Text)); cmd.Parameters.Add(new SqlParameter("@Department", comboBox1.Text)); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { string Strname = dr[0].ToString(); string StrPass = dr[1].ToString(); string StrDept = dr[2].ToString(); if(dr[2].ToString().Equals(comboBox1.Text)&&dr[0].ToString().Equals(textBox1.Text)&&dr[1].ToString().Equals(textBox2.Text)) { MessageBox.Show("Welcome"); } else { MessageBox.Show("Please Enter correct details"); } } dr.Close(); } catch (Exception ex) { MessageBox.Show("Exception" + ex); } finally { con.Close(); } } }

    Read the article

  • Access boot menu from windows 7

    - by repsak
    I busted my keyboard on my laptop, and now my computer rarely starts since it doesnt ignore this problem when booting. So what i want to do, is to disable my keyboard from the boot menu. But I cant access the boot menu since my keyboard doesnt work. I have an addtional keybaord via USB but that one doesnt work before windows is booted. So in short, what I want is to access my laptops boot menu now when im on windows via cmd, but im not sure how to do it.

    Read the article

  • DNSBL listed at zen.spamhaus.org - cant get outgoing mail working? Am I interpreting the response correctly?

    - by Joe Hopfgartner
    I have problem with a mailserver and there is something I kind of not understand! I can connect, authenticate, specify the sender address - but when specifying the reciever i get a error 550 which looks like so: RCPT TO:[email protected] 550-DNSBL listed at zen.spamhaus.org 550 http://www.spamhaus.org/query/bl?ip=62.178.15.161 Now the strange thing is that 62.178.15.161 is my local client address. Not the servers ip address. Also the error code 550 seems to be defined as so: 550 Requested action not taken: mailbox unavailable To me that makes totally no sense. Why this error code with this spamhaus message? Why the local ip adress and not the servers? There is exim running and there is nothing turning up in the logs mail.err mail.info mail.log mail.warn in /var/log I looked up both the servers and the clients ip adress on blacklists. The clients ip adress is listed on some (as expected), but the server is totally clean. Here is the complete telnet log when I reproduced the error. Mail clients like Evolution and Thunderbird give me the same spamhaus error message. joe@joe-desktop:~$ telnet mail.hunsynth.org 25 Trying 193.164.132.42... Connected to mail.hunsynth.org. Escape character is '^]'. 220 hunsynth.org ESMTP Exim 4.69 Sat, 01 Jan 2011 17:52:45 +0100 HELP 214-Commands supported: 214 AUTH STARTTLS HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP EHLO AUTH 250-hunsynth.org Hello chello062178015161.6.11.univie.teleweb.at [62.178.15.161] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN CRAM-MD5 250-STARTTLS 250 HELP AUTH LOGIN 334 VXNlcm5hbWU6 dGVzdEBodW5zeW50aC5vcmc= 334 UGFzc3dvcmQ6 ***** 235 Authentication succeeded MAIL FROM:[email protected] 250 OK RCPT TO:[email protected] 550-DNSBL listed at zen.spamhaus.org 550 http://www.spamhaus.org/query/bl?ip=62.178.15.161 quit 221 hunsynth.org closing connection Connection closed by foreign host. joe@joe-desktop:~$ Update: I tried the same thing from my other server and could successfully send an email. So it really looks like the server does check the IP wich establiches the connection is in some blacklist. This is theoretically a good thing - but - the authentication on the server should prevent that? Or shouldn't it? Well I just think it would be absurd if I couldn't send email over my smtp server from my dynamic ISP connection because the dynamic is listed, altough i have a clean server with login?

    Read the article

  • SQL Server: "This filegroup cannot be used as a backup destination" error when attempting restore

    - by Ariel
    When running a command like the following: "RESTORE FILELISTONLY FROM DISK='\\\\server\\folder\\DummyDB.bak'" I'm getting this error: Backup destination "\\server" supports a FILESTREAM filegroup. This filegroup cannot be used as a backup destination. Rerun the BACKUP statement with a valid backup destination. RESTORE FILELIST is terminating abnormally. Unless someone comes up with a better idea, it seems that the drive from which restore is being attempted must not contain any database file contained in a filegroup. Is that the case? Thanks in advance.

    Read the article

  • Problems with merge replication

    - by jess
    Hi, We are developing a multi-user desktop application with users located in different countries. The platform is - .net 3.5, SQL Server 2008, WinForms. Now, my client has used the help of a DBA who has implemented merge replication. To facilitate replication, we made all our primary keys as GUID. Now, we are facing these issues with replication - subscribers expiration sometimes stops replication and we have found no clean way to re-add every change to db schema requires to poll the whole data all over again! This seems to be strange, what could be the problem here? Also, sometimes we have duplicate keys, and that too stops replication I am sure these issues can be resolved. Maybe, we have not gone the right way to implement. Can you suggest how to go about implementing. Or, is the above information enough to diagnose the problem?

    Read the article

  • Hard drive is working fine then next boot up shows up as a unformatted.

    - by evolvd
    The drive is a Samsung Spinpoint F3 HD103SJ 1TB. There are no SMART errors and the drive sounds healthy. Restarted the computer from the drive working fine and then noticed that the drive had the same drive letter but has RAW as the file system. I have a few file/partition recovery software titles available but since doing any scans on this drive takes about 2.5 hours I wanted to know if any one had any advice.

    Read the article

  • how to write or what is the concept behind the file unlocker program

    - by Jach Many
    Recently i was trying to delete a file thinking that i had closed the program which is manipulating the file but it did not delete because the program was still running. I misunderstood that file as an unwanted file. So i used the file unlocker program to find which process is manipulating that file. That program really worked well by showing the process which was handling that file. and that file was http://download.cnet.com/Unlocker/3000-2248_4-10493998.html. What i want to know is i would like to write a program in win32 C or .net to mimic the same process. Just to find which process is handling which file. and if possible to close it. Or i want to know the concept behind that. I know this cannot be explained in a few paragraphs yet if i could get some references or external links to references then that could be nice.

    Read the article

  • Windows vista firewall exceptions unchangeable

    - by user61099
    Hey, I want to allow a program (iTunes) through my windows firewall, so i check it in the program or port list under the exceptions tab (in my windows firewall settings), then i click OK. When i reopen the window the box is unchecked again. Which means i can never get the program through my windows firewall. I think this is a problem due to administrators rights. Because I also can not delete the program from the list. I can however delete other programs from the list. Anybody have any ideas, tips, remarks?

    Read the article

  • Webscale is all about sharding and its coming to SQL Azure

    - by simonsabin
    There are many that joke about developers always talking about webscale and needing to shard to be able to scale. In reality many systems, if not most, don’t need to be able to scale to numerous nodes because todays processing is so powerful. However in the cloud world where you don’t have 1 big box you have many little ones (instances) you need some way of sharding/federating/distributing data and load. I’ve mentioned before of a PDC presentation on whats coming in SQL Azure, well they’ve put some...(read more)

    Read the article

  • Happy New Year from Oracle Technology Network!

    - by Cassandra Clark
    Happy New Year from the Oracle Technology Network team! All year long we have been working hard to bring you new member only offers and discounts. This month our partners have extended their offers an extra month in case you missed taking advantage of them due to the holidays. Visit the OTN Member Benefit Page today! Get discounts on Oracle Press, Packt Publishing, Manning, Apress, O'Reilly and CRC Press books. We also have discounts on Oracle products (Weblogic Server this month), fun wallpapers to download, discounts on industry events (QCon London) and on the Dr. Dobb's DVD release 6. If you'd like to see any offers/discounts added please respond in the comment section or take the OTN Membership Survey before it closes at the end of this month.

    Read the article

  • What's the best Open Source code you've ever seen?

    - by Andrew Theken
    Part of the value of Open Source is to provide great example code to people getting started with a new platform or language. What's the best Open Source code you've encountered, and why do you like your choice? Any language will do, but I'm particularly interested in the best examples of Objective-C you can point out. Obviously this is an open-ended question, so I'll leave the question open for a while and see what kinds of answers we get. Thanks!

    Read the article

  • Problem with APTonCD application

    - by Harikrishnan
    I created a iso image using aptoncd & burned it to a dvd. now when i tried to restore, the program does not detect the dvd in the drive. It shows "Please insert a disc in the drive." and if we click "ok" it shows "E: Failed to mount the cdrom.". The dvd is in the drive itself. I tried "sudo lshw -C disk" and the out put is: *-cdrom description: DVD-RAM writer product: DVDRAM GH22NS50 vendor: HL-DT-ST physical id: 1 bus info: scsi@1:0.0.0 logical name: /dev/cdrom logical name: /dev/cdrw logical name: /dev/dvd logical name: /dev/dvdrw logical name: /dev/scd0 logical name: /dev/sr0 logical name: /media/APTonCD logical name: /media/apt version: TN02 capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram configuration: ansiversion=5 mount.fstype=iso9660 mount.options=ro,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 state=mounted status=ready *-medium physical id: 0 logical name: /dev/cdrom logical name: /media/APTonCD logical name: /media/apt configuration: mount.fstype=iso9660 mount.options=ro,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 state=mounted Then i checked in disk utility application. in that dvd rom is shown as "/dvd/sr0". my ubuntu version is 10.10. please help me to solve the problem.

    Read the article

  • mysql5.58 unstart server in mac os 10.6.5

    - by EdwardLau
    MySQL 5.5.8 uninstall MAC OS 10.6.5,restart computer is message “/Library/StartupItems/MySQLCOM” has not been started because it does not have the proper security settings. i set sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /usr/local/mysql/support-files/mysql.server Locate the configuration defining the basedir and set the following : basedir=/usr/local/mysql datadir=/usr/local/mysql/data bug i click the mysql preference start mysql server isn't start and i sudo chown -R root:wheel /Library/StartupItems/MySQLCOM and restart again ,not warning message but mysql server not start ,why?

    Read the article

  • topic-comment naming of functions/methods

    - by Daniel
    I was looking at American Sign Language the other day... and I noticed that the construction of the language was topic-comment. As in "Weather is good". That got me to thinking about why we name methods/functions in the manner of: function getName() { ... } function setName(v) { ... } If we think about naming in a topic-comment function, the function names would be function nameGet() { ... } function nameSet() { ... } This might be better for a class had multiple purposes. IE: class events { function ListAdd(); function ListDelete(); function ListGet(); function EventAdd(); function EventDelete(); function EventGet(); } This way the functions are grouped by "topic". Where as the former naming, functions are grouped Action-Noun, but are sorted by Noun. I thought this was an interesting POV, what do other people think about naming functions/methods Topic-Comment? Obviously, mixing naming conventions up in the same project would be weird, but overall? -daniel

    Read the article

  • Why is C++ backward compatible with C ? Why isn't there some "pure" C++ language ?

    - by gokoon
    C and C++ are different languages, blababla we know that. But if those language are different, why is it still possible to use function like malloc or free ? I'm sure there are all sort of dusty things C++ has because of C, but since C++ is another language, why not remove those things to make it a little less bloat and more clean and clear ? Is it because it allows programmers to work without the OO model or because some compilers doesn't support high-level abstract features of C++ ?

    Read the article

  • How do I select column(s) by their "numeric" position in a table?

    - by DulcimerDude
    I am trying to select columns by their "x" position in the table. DBI my $example = $hookup->prepare(qq{SELECT This,That,Condition,"I also want COLUMN-10" FROM tbl LIMIT ? ?}); ###column_number=10 ordinal_position?? $example->execute('2','10') or die "Did not execute"; Is this possible or do I need to run another single select to just that column? One problem I encountered was with a col named "Condition". For some reason, when I tried to select Condition the execute would die. I never attempted but, What if the column name was SELECT? Another note is the table is 75 cols wide and I only need 50 of them. The Col names are pretty verbose so, I would like to just call them by their "position". This would also allow the col names to be changed in the future without having to change the select statement. I am quite the newbie so please explain any answers down to my level. Thanks for any assistance..

    Read the article

  • .NET XML serialization

    - by ShdNx
    I would like to serialize and deserialize mixed data into XML. After some searches I found out that there were two ways of doing it: System.Runtime.Serialization.Formatters.Soap.SoapFormatter and System.Xml.Serialization.XmlSerializer. However, neither turned out to match my requirements, since: SoapFormatter doesn't support serialization of generic types XmlSerializer refuses to serialize types that implement IDictionary, not to mention that it's far less easy-to-use than "normal" serialization (e.g. see this SO question) I'm wondering if there exists an implementation that doesn't have these limitations? I have found attempts (for example CustomXmlSerializer and YAXLib as suggested in a related SO question), but they don't seem to work either. I was thinking about writing such serializer myself (though it certainly doesn't seem to be a very easy task), but then I find myself limited by the CLR, as I cannot create object instances of types that won't have a paramaterless constructor, even if I'm using reflection. I recall having read somewhere that implementations in System.Runtime.Serialization somehow bypass the normal object creation mechanism when deserializing objects, though I'm not sure. Any hints of how could this be done? Could somebody please point me to the right direction with this?

    Read the article

  • Two radically different queries against 4 mil records execute in the same time - one uses brute force.

    - by IanC
    I'm using SQL Server 2008. I have a table with over 3 million records, which is related to another table with a million records. I have spent a few days experimenting with different ways of querying these tables. I have it down to two radically different queries, both of which take 6s to execute on my laptop. The first query uses a brute force method of evaluating possibly likely matches, and removes incorrect matches via aggregate summation calculations. The second gets all possibly likely matches, then removes incorrect matches via an EXCEPT query that uses two dedicated indexes to find the low and high mismatches. Logically, one would expect the brute force to be slow and the indexes one to be fast. Not so. And I have experimented heavily with indexes until I got the best speed. Further, the brute force query doesn't require as many indexes, which means that technically it would yield better overall system performance. Below are the two execution plans. If you can't see them, please let me know and I'll re-post then in landscape orientation / mail them to you. Brute-force query: Index-based exception query: My question is, based on the execution plans, which one look more efficient? I realize that thing may change as my data grows.

    Read the article

  • Ignore folders with certain filetypes

    - by gavin19
    I'm trying in vain to rewrite my old Powershell script found here - "$_.extension -eq" not working as intended? - for Python.I have no Python experience or knowledge and my 'script' is a mess but it mostly works. The only thing missing is that I would like to be able to ignore folders which don't contain 'mp3s', or whichever filetype I specify. Here is what I have so far - import os, os.path, fnmatch path = raw_input("Path : ") for filename in os.listdir(path): if os.path.isdir(filename): os.chdir(filename) j = os.path.abspath(os.getcwd()) mp3s = fnmatch.filter(os.listdir(j), '*.txt') if mp3s: target = open("pls.m3u", 'w') for filename in mp3s: target.write(filename) target.write("\n") os.chdir(path) All I would like to be able to do (if possible) is that when the script is looping through the folders that it ignores those which do NOT contain 'mp3s', and removes the 'pls.m3u'. I could only get the script to work properly if I created the 'pls.m3u' by default. The problem is that that creates a lot of empty 'pls.m3u' files in folders which contain only '.jpg' files for example. You get the idea. I'm sure this script is blasphemous to Python users but any help would be greatly appreciated.

    Read the article

  • REST - why we need million urls and different HTTP request?

    - by Andre
    I asked this question. But I still don't understand why we need to utilize different HTTP requests: DELETE/PUT/POST/GET in order to build nice API Wouldn't it be a lot simpler to pass all information in request parameters and have a SINGLE ENTRY-POINT for your api?: GET www.example.com/api?id=1&method=delete&returnformat=JSON GET www.example.com/api?id=1&method=delete&returnformat=XML or POST www.example.com/api {post data: id=1&method=delete&returnformat=JSON} POST www.example.com/api {post data: id=1&method=delete&returnformat=XML} and then - we can handle all methods and data internally without the need for hundreds of urls... how would you call this type of API - It's not REST apparently, it's not SOAP. then - what is it? UPDATE I'm not proposing any new standards here. I merely asking a question in order to better understand why web services work the way they work.

    Read the article

  • Reason for different segments in Linux on x86

    - by anjruu
    Hey all, So, I know that Linux uses four default segments for an x86 processor (kernel code, kernel data, user code, user data), but they all have the same base and limit (0x00000000 and 0xfffff), meaning each segment maps to the same set of linear addresses. Given this, why even have user/kernel segments? I understand why there should be separate segments for code and data (just due to how the x86 processor deals with the cs and ds registers), but why not have a single code segment and a single data segment? Memory protection is done through paging, and the user and kernel segments map to the same linear addresses anyway. Thanks! anjruu

    Read the article

  • PyGTK: Radiobuttons are still displayed after removal

    - by canavanin
    Hi everyone! I am using PyGTK and the gtk.assistant. On one page I would like to display two radiobuttons in case the user selected a certain option on a previous page. The labels of the buttons - and whether the buttons are to be present at all - are to depend entirely on that earlier selection. Furthermore, if the user goes back and changes that selection, the page containing the radiobuttons is to be updated accordingly. I have got as far as having the radiobuttons displayed when necessary, and with the correct labels. The trouble is that if I go back and change the determining selection, or if I move one page further than the 'radiobutton page' and then move back, the buttons are not only not removed (in case that would have been required), their number has also doubled. To show you what I'm doing, here's part of my code (I've left out bits that do unrelated things, that's why the function name doesn't fit). The function is called when the "prepare" signal is emitted prior to construction of the 'radiobutten page'. def make_class_skills_treestore(self): print self.trained_by_default_hbox.get_children() # PRINT 1 for child in self.trained_by_default_hbox.get_children(): if type(child) == gtk.RadioButton: self.trained_by_default_hbox.remove(child) #child.destroy() # <-- removed the labels, but not the buttons print self.trained_by_default_hbox.get_children() # PRINT 2 class_skills = self.data.data['classes'][selected_class].class_skills.values() default_trained_count = (class_skills.count([True, True]) , class_skills.count([True, False])) num_default_trained_skills = default_trained_count[1] / 2 # you have to pick one of a pair --> don't # count each as trained by default for i in range(default_trained_count[0]): # those are trained by default --> no choice num_default_trained_skills +=1 selected_class = self.get_classes_key_from_class_selection() if default_trained_count[1]: for skill in self.data.data['classes'][selected_class].class_skills.keys(): if self.data.data['classes'][selected_class].class_skills[skill] == [ True, False ] and not self.default_radio: self.default_radio.append(gtk.RadioButton(group=None, label=skill)) elif self.data.data['classes'][selected_class].class_skills[skill] == [ True, False ] and self.default_radio: self.default_radio.append(gtk.RadioButton(group=self.default_radio[0], label=skill)) if self.default_radio: for radio in self.default_radio: self.trained_by_default_hbox.add(radio) self.trained_by_default_hbox.show_all() self.trained_by_default_hbox and self.trained_by_default_label, as well as self.default_radio stem from the above function's class. I have two print statements (PRINT 1 and PRINT 2) in there for debugging. Here's what they give me: PRINT 1: [<gtk.Label object at 0x8fc4c84 (GtkLabel at 0x90a2f20)>, <gtk.RadioButton object at 0x8fc4d4c (GtkRadioButton at 0x90e4018)>, <gtk.RadioButton object at 0x8fc4cac (GtkRadioButton at 0x90ceec0)>] PRINT 2: [<gtk.Label object at 0x8fc4c84 (GtkLabel at 0x90a2f20)>] So the buttons have indeed been removed, yet they still show up on the page. I know the code requires some refactoring, but first I'd like to get it to work at all... If someone could help me out that would be great! Thanks a lot in advance for your replies - any kind of help is highly appreciated.

    Read the article

  • How to get a JTextField event that started a pop up menu in Java ?

    - by Frank
    I have a JTextField that represents a day, such as "Sunday", when I left mouse click on it, it changes background color, when I right mouse click on it, a pop up menu comes up, after I click on a menu item, such as "1st of month", it gets the value, closes the menu and then change the bgcolor, my code looks like this : JTextField dayHeading=new JTextField("Su"); ...... final JPopupMenu Pmenu; JMenuItem menuItem; Pmenu=new JPopupMenu(); menuItem=new JMenuItem("1st of month"); Pmenu.add(menuItem); menuItem=new JMenuItem("2nd of month"); Pmenu.add(menuItem); ...... menuItem.addMouseListener(new MouseAdapter() { public void mouseReleased(final MouseEvent e) { System.out.println(((JMenuItem)e.getComponent()).getText()); onHeadingClicked(e); // Error : java.lang.ClassCastException: javax.swing.JMenuItem cannot be cast to javax.swing.JTextField // How to get the orininal JTextField event that started this pop up menu, so I can pass it onto onHeadingClicked() ? } }); ...... dayHeading.setEditable(false); dayHeading.setFocusable(false); dayHeading.addMouseListener(new MouseAdapter() { public void mouseReleased(final MouseEvent evt) { if (SwingUtilities.isLeftMouseButton(evt)) onHeadingClicked(evt); else if (SwingUtilities.isRightMouseButton(evt)) Pmenu.show(evt.getComponent(),evt.getX(),evt.getY()); } }); ...... void onHeadingClicked(final java.awt.event.MouseEvent evt) { final javax.swing.JTextField fld=(javax.swing.JTextField) evt.getSource(); ... } My question is : in the menuItem.addMouseListener section, how to get the orininal JTextField event that started this pop up menu, so I can pass it onto onHeadingClicked() ?

    Read the article

  • ASP.NET - ViewState: empty placeholder generates view state

    - by Budda
    On my web-page I have PlaceHolder, not controls are loaded into it. <asp:PlaceHolder ID="PlaceHolderStatMain" runat="server"> </asp:PlaceHolder> I am looking the ViewState generated for the page, it is the following: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTg1NDkyNTUzD2QWAgIDD2QWAgIND2QWAmYPZBYCAgEPZBYCZg9kFgJmD2QWBmYPFQEYL3N0YXRfc3RhZGl1bS9sZWFndWVfV0VGZAIBDxUBGC9zdGF0X3N0YWRpdW0vbGVhZ3VlX0VFRmQCAg8VARgvc3RhdF9zdGFkaXVtL2xlYWd1ZV9GQ1VkZEuSBUr5LFL6WfCehNBJgjrq0GzwWCWN2qlU70V7LAAb" /> When I set EnableViewState to false: <asp:PlaceHolder ID="PlaceHolderStatMain" runat="server" EnableViewState="false"> </asp:PlaceHolder> The viewstate content was decreased significantly: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTg1NDkyNTUzZGTTn8Y28VwmpE/K7yPPkLFvhrqMdU8THijFW/BMFzk0tQ==" /> Question: how to remove 'useless' viewstate content without disabling viewstate for placeholder himself (I would like other control loaded into placeholder to has viewstate)? Is it possible at all? Any thought are welcome! P.S. I am using ASP.NET 4.0

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >