Daily Archives

Articles indexed Friday January 7 2011

Page 13/34 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Set the selected item for a combobox in a datagrid

    - by JingJingTao
    I am using a datagrid which has many combobox fields in it, when I click the datagrid combobox the selected item or highlighted value is the last item in the list, but I would like it to highlight the first(top) item in the list. I know for just a combobox, all I need to do is change the combobox.selecteditem or combobox.selectedindex, but I'm not sure what to do in this case. I have binded the combobox to a table in the database and used a datatable to store the combobox values and then I add a row to the datatable, I think the reason the last item in the combobox is highlighted is because I added a row to the datatable. Thank you for your help. String strGetTypes = "SELECT holidaycodeVARCHAR4Pk, codedescVARCHAR45 FROM holidaytype ORDER BY holidaycodeVARCHAR4Pk Desc"; DataTable dtHolidayType = new DataTable(); MySqlDataAdapter dbaElements = new MySqlDataAdapter(strGetTypes, ShareSqlSettings.dbConnect); dbaElements.Fill(dtHolidayType); DataGridViewComboBoxCell cboxDays = new DataGridViewComboBoxCell(); cboxDays.DataSource = dtHolidayType; cboxDays.DisplayMember = "codedescVARCHAR45"; cboxDays.ValueMember = "holidaycodeVARCHAR4Pk"; //Blank row dtHolidayType.Rows.Add(1); // gridDailyEmp.Rows[j].Cells[day] = cboxDays;

    Read the article

  • PHP Session variable isset(..)=1 after session_start()

    - by Nicsoft
    Hello! I guess I am not understanding the scope of session variables, or the session itself, in PHP, hence this question: This is my code if(!session_id()==""){ echo "Getting rid of session"."</br>"; session_destroy(); } echo "Before session_start(): ".isset($_SESSION["first_date_of_week"])."</br>"; session_start(); echo "After session_start(): ".isset($_SESSION["first_date_of_week"])." ".$_SESSION["first_date_of_week"]->format("Y-m-d")."</br>"; The output is: Before session_start(): After session_start(): 1 2011-01-09 How come that when doing the isset(..) on the session variable it is set directly after starting the session, even though I haven't even used it or set it yet? It does, however, still have the same value as before. Also, session_id()="" since the if-clause is never triggered. I never kill the session, how come it is set to ""? I.e. I refresh the page and expects the session to still be alive. Using the isset(..) function is then pretty useless testing if it has been set already... Thanks in advance! /Niklas

    Read the article

  • WPF - Listbox bound to collection acts as one item

    - by user553765
    Hi, I have a listbox with the ItemsControl binding the ItemsSource to a readonly collection of strings. The ItemTemplate then declares the DataTemplate as a checkbox where its content is that of the name of the particular item in the collection and IsChecked bound to a property to determine whether or not the item is selected (it's just a listbox of checkboxes) This works fine with one exception - MouseOver the ListBox and it acts as if the collection of Strings is a single item; the whole box acts as if selected. This wouldn't be as much of a problem were it not for this also affecting the scrollbars where they won't get enabled - presumably because it considers the one item as being visible on the screen even though it in actual facts is x+ with only x-y showing on the screen. How do I get the listbox to act as if each individual string is its own item. I assume it acts this way because I declared a datatemplate in order to get a listbox of checkboxes?? Any help would be much appreciated!

    Read the article

  • How to setup PTR (Reverse DNS) at Godaddy DNS manager

    - by PokemonCraft
    My hosting provider already did PTR setup. Now i have to setup it at my DNS holder i guess. What am i supposed to do at my Godaddy account. thank you. my ip : 64.250.113.235 and you can check my ptr record from here http://mxkit.com/webmaster-tools/ptr-check result Ptr records for 64.250.113.235 are: Server: 10.0.80.11 Address: 10.0.80.11#53 Non-authoritative answer: 235.113.250.64.in-addr.arpa name = notification.pokemoncraft.com.

    Read the article

  • Is there a VNC server for mac with decent international keyboard support?

    - by Stephan
    Hi, I'm having trouble finding a VNC server for Mac OS X that allows me to connect from a Windows box with German keyboard layout. I've tried the built-in desktop sharing and several versions of Vine but all of them had problems with several keys. Does maybe anyone know about a working combination of a Mac OS X VNC server and Windows VNC client which properly supports a German keyboard layout on the client? Update: I don't think the Windows client is the problem, because I have no issues connecting to Linux boxes. And I've tried several different clients.

    Read the article

  • Tunnell network requests with Windows 7

    - by mark
    I've Windows 7 64bit Pro client in a private LAN behind a Netgear wgr614v7 router. I've also a remote Debian server machine outside. I'd like to tunnel all (or specified ports/protocols) over this outside server, so when I'm on the Windows machine and I request serverfault.com it would not appear from the wgr614v7 public IP but from the server. But it's not only about HTTP traffic, it's basically about everything I'd like to: other TCP ports, even UDP, etc. It must be transparent to the application, e.g. they shouldn't be aware of this. All their requests just appear as being from the server and the tunnel between them takes care about the packets. I'm aware of e.g. Putty and forwarding individual ports or using it as a socks proxy, however not many applications to support this and the support in windows itself looks non-existent to me. I might add it should be something "reasonable" easy to set up. I've heard about PPTP but I'm unsure about it's security implications (by design). Should I go for VPN? There seem to be two common solutions for Linux (OpenSwan and StrongSwan), why would I pick the one over the other? I also fear that setting up a VPN might be quite complex, OTOH maybe it's the only sane way to do the things right? Or is OpenVPN sufficient? I'm seeking for open (source) solutions, what other options to I have or which direction should I head to?

    Read the article

  • How to setup a tunneled connection to a NAS?

    - by Jan
    Hi there, While looking into alternatives for Dropbox I explored the idea of a NAS. It would be easy to hook up the NAS to a broadband connection and have the users access the files. However, - The data needs to be encrypted on the NAS itself (in case it gets stolen). - The connection to the NAS needs to be secure (VPN?). - The drive needs to appear as a drive under windows (so no https). Any ideas? Thanks in advance, I can't seem to find the final solution! Jan

    Read the article

  • Linux distro for acer 4741G laptop

    - by sandundhammikaperera
    Hi all, I need to install linux for my acer 4741 laptop. Anyone who did this before and managed to solve the device driver problems please share your experience with me. I already installed the backtrack linux and I able to make it work the both wireless and wired network connections and also the sound card is also working. But the problem is that I unable to configure 1360x768 resolution of the display. The display looking really flat and ugly under that linux. some help ? can you guide how to correctly configure the /etc/X11/xorg.conf ? --Thanks in advance--

    Read the article

  • Why is the "Standard Account" option disabled (grayed-out)

    - by Clayton Hughes
    I just installed Win7 64bit on a new hard drive, and I created a user account through the OOBE. I want to make my user account a standard user. However, if I go into "User Accounts" and select "Change my account type", the standard user option is greyed out--this account apparently has to be an administrator. I thought maybe it was the only admin account on the machine, so I tried to create a new user account named "Administrator", but was told I couldn't, because one already exists. What gives? What do I have to do to run as a standard user?

    Read the article

  • How to configure sendmail to relay local user mail to public host?

    - by Chau Chee Yang
    I am using Linux/Fedora's sendmail as my mail server. The server do not has a public domain name. It connect to Internet via dial-up. There are few users in the server. I have successfully configure my sendmail to relay mail to public host (via smart_host): # mail <user>@gmail.com [email protected] receive mail from this private host. However, if I send a mail to local user (without domain name): # mail <user> All mails are deliver to my server's mail spooler (/var/spool/mail). I wish all mails send to local user may relay to a public domain that I have registered, is that possible to do so with sendmail? mail user1 will send mail to [email protected] mail user2 will send mail to [email protected]

    Read the article

  • Flash Player : un chercheur trouve comment contourner le bac à sable et transmettre des données à un serveur distant

    Flash Player : un chercheur trouve comment contourner le bac à sable et transmettre des données à un serveur distant Un chercheur a trouvé un moyen de contourner la Sandbox de Flash Player, une mesure de sécurité introduite récemment par Adobe. Billy Rios a publié sur son blog la procédure pour contourner la protection qui isole le processus du Player du reste de la machine, un contournement du « bac à sable » qui pourrait donner la possibilité à un pirate de voler des données et de les transmettre à un serveur distant. Cette preuve de faisabilité (PoC) liée aux fichiers SWF montre que l'on peut transmettre des données locales sans que l'utilisateur victime n'ait aucune ind...

    Read the article

  • PowerPivot Workshop in London #ppws

    - by AlbertoFerrari
    As you might have read in Marco’s post , the PowerPivot Workshop I and Marco Russo have prepared is now starting its European tour. We will be in London on February 7,8 2011 and then touch most of the European countries during the next few months. We have provided the workshop first in Amsterdam and it has been a huge success, it is now time to start the roadshow and meet people who want to learn PowerPivot all over Europe: I am really excited about this! You will find updated information and workshop...(read more)

    Read the article

  • SQL Server Unit Testing with tSQLt

    When one considers the amount of time and effort that Unit Testing consumes for the Database Developer, is surprising how few good SQL Server Test frameworks are around. tSQLt , which is open source and free to use, is one of the frameworks that provide a simple way to populate a table with test data as part of the unit test, and check the results with what should be expected. Sebastian and Dennis, who created tSQLt, explain.

    Read the article

  • Why use C++ when C works for large projects equally well?

    - by Karl
    Before I start, please DO NOT make this into a C vs C++ flamewar. This question has nothing to do with which language is better or not. Period. I have read that C++ is said to be fit for large projects. After all, it makes managing code easier. OO and other features, for example the STL. But then why use C++ when C works equally well for large projects? Take the example of the Linux kernel. Or GNOME. Or even Windows I guess, it is written in C right? So why bother at all with the complexity of C++ (templates and all that), when C works well and this is not just a statement, but proper examples have been quoted. If it works for projects of magnitude of the kernel, why is C++ preferred or why is C not used for almost all projects?

    Read the article

  • Sudden Breakthroughs (Miracles at work)

    - by MobileDev123
    Lot of things has been discussed that can be taken as negative things about programmers work. Lets discuss about something good and unexpected things that happen to programmers. Example: (After R&D of two days and a lot of disappointments) You just spend an hour with your PM to explain that some feature due to some problem you are unable to release this module in today's beta... after a lot of arguments you are given an hour to make your app work without this module. You sit on your workstation to make a release and all of a sudden you find what turns out to be a silly little problem.... (you solve it and prepare a desired build) did you face miracle (= sudden, positive surprises?) in your life?? what was your reaction in case you have come through such experience?? (N.B. I know my English is not that good and that's why I'm open to every linguistic mistakes needed to be corrected)

    Read the article

  • Design of input files reading when it comes to defaults/transformations

    - by Stefano Borini
    Suppose you have an application that reads an input file, on a language that does not support the concept of None. The input is read, parsed, and the contents are stored on a structure for later use. Now, in general you want to keep into account transformation of the data from the input, such as adding default values when not specified, or adding full path information to relative path specified in the input. There are two different strategies to achieve this. The first strategy is to perform these transformations at input file reading time. In practice, you put all the intelligence into the input parser, and your application has no logic to deal with unexpected circumstances, such as an unspecified value. You lose the information of what was specified and what wasn't, but you gain in black-boxing the details. Your "running code" needs that information in any case and in a proper form, and is not concerned if it's the default or a user-specified information. The second strategy is to have the file reader a real one-to-one mapper from the file to a memory-stored object, with no intelligent behavior. unspecified values are not filled (which may however be a problem in languages not supporting None) and data is stored verbatim from the file. The intelligence for recovery must now go into the "running code", which must check what was specified in the file, eventually fall back to a default, or modify the input properly before using it. I would like to know your opinion on these two approaches, and in particular which one you found the most frequently implemented.

    Read the article

  • VirtualBox host: Ubuntu vs. Windows XP

    - by iambriansreed
    In order to lengthen the lifespan of my machine I am replacing the weakest link, the hard drive and installing a new OS. I had planned on using xp pro as my virtualbox host and ubuntu as guest. After messing with ubuntu desktop and server I am really impressed and am thinking of reversing the virtualbox setup; ubuntu host xp guest. I would use XP for Adobe Fireworks, Netflix, and iTunes (maybe) that's pretty much it. Any reason not to do ubuntu host with xp guest? I know the xp vbox will run slower as a guest but really how much slower? It's a desktop. 4gb ram, 500gb disk, Pent D 3.2 ghz

    Read the article

  • Compiz: How can I pin osd-lyrics to the Desktop?

    - by joebuntu
    Hey ya, I have certain applications pinned to my desktop. such as Rainlendar (1), which offers this option in the settings window conky (2), with "own_window_type normal" in my ~/.conkyrc Rhythmbox's Desktop Cover Art plugin (3), a python plugin sticked to the desktop. They all hide nicely below all other Windows. I set Compiz to not minimize them on "show desktop" command using "window rules". I also use [osd-lyrics][1] to display music lyrics. It's default behaviour is to stick always on top, which is irritating sometimes and, in my case, looks rather fugly. (4) See screenshot at: http://i.imgur.com/ie16K.jpg Now how can I tell Compiz to pin the osd-lyrics bar to the desktop below all other windows and not minimize it? I tried all sorts of window rules and exceptions, e.g. using "class=osd-lyrics", "title=osd-lyrics" but the OSD doesn't seem to match any of these. Any ideas? Running: Ubuntu 10.10 Maverick Meerkat, Compiz 0.8.6, osd-lyrics 0.3 from code.google.com/p/osd-lyrics

    Read the article

  • Domains with similar names and issues

    - by abel
    I recently purchased one of those domain names like del.ico.us. While registering I found that delicious.com was being used. Argument: I found that delicious.com belonged to the same category as my to-be website. It served premium delicious dishes. Counter Argument: My to-be domain though belonging to the same category, specialized in serving free but delicious dishes or in giving out links(affiliate) to other sites serving premium delicious dishes. Additional Counter Arguments: 1.delicious.com was not in English. 2.the del.icio.us in my domain name though having the same spelling, is not going to be used in the same fashion. For eg.(this may not make sense, because the names have been changed)the d in delicious on my website actually stands for the greek letter Delta(?/d) and since internationalized domains are still not easily typable, I am going for the english equivalent.The prefix holds importance for the theme of the service which my website intends to offer. My Question: Can I use the domain name del.icio.us for my website? How are these kinds of matters dealt? (The domain names used are fictitious. And I have already registered the domain but have not started using it.I chanced upon this domain name because it was short, easy to remember and suited the theme of my website.)

    Read the article

  • Looking for a Regex to get SccTeamFoundationServer value from .sln file

    - by Arthur
    I am looking tor a Regex for C# to get SccTeamFoundationServer value from .sln file. Maybe someone has come across such need and found a solution. Could you help? File: Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication", "WebApplication\WebApplication.csproj", "{AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication", "ConsoleApplication\ConsoleApplication.csproj", "{2BD82C34-CF50-4559-A3CD-F85ACD657292}" EndProject Global GlobalSection(TeamFoundationVersionControl) = preSolution SccNumberOfProjects = 3 SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccTeamFoundationServer = http://ServerName:8080/ SccLocalPath0 = . SccProjectUniqueName1 = ConsoleApplication\\ConsoleApplication.csproj SccProjectName1 = ConsoleApplication SccLocalPath1 = ConsoleApplication SccProjectUniqueName2 = WebApplication\\WebApplication.csproj SccProjectName2 = WebApplication SccLocalPath2 = WebApplication EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Debug|Any CPU.Build.0 = Debug|Any CPU {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Release|Any CPU.ActiveCfg = Release|Any CPU {AE0F6C02-1C8D-426D-AFA0-C07A52E6112F}.Release|Any CPU.Build.0 = Release|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Debug|Any CPU.Build.0 = Debug|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Release|Any CPU.ActiveCfg = Release|Any CPU {2BD82C34-CF50-4559-A3CD-F85ACD657292}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal

    Read the article

  • Find valid assignments of integers in arrays (permutations with given order)

    - by evident
    Hi everybody! I am having a general problem finding a good algorithm for generating each possible assignment for some integers in different arrays. Lets say I have n arrays and m numbers (I can have more arrays than numbers, more numbers than arrays or as much arrays as numbers). As an example I have the numbers 1,2,3 and three arrays: { }, { }, { } Now I would like to find each of these solutions: {1,2,3}, { }, { } { }, {1,2,3}, { } { }, { }, {1,2,3} {1,2}, {3}, { } {1,2}, { }, {3} { }, {1,2}, {3} {1}, {2,3}, { } {1}, { }, {2,3} { }, {1}, {2,3} {1}, {2}, {3} So basically I would like to find each possible combination to assign the numbers to the different arrays with keeping the order. So as in the example the 1 always needs to come before the others and so on... I want to write an algorithm in C++/Qt to find all these valid combinations. Does anybody have an approach for me on how to handle this problem? How would I generate these permutations?

    Read the article

  • WPF-Can a XAML object be a source as well as a target for bindings?

    - by iambic77
    I was wondering if it's possible to have a TextBlock as a target and a source? Basically I have a bunch of entities which have simple relationships to other entities (like Entity1 Knows Entity3, Entity3 WorksAt Entity2 etc.) I have a Link class that stores SourceEntity, Relationship and TargetEntity details. What I want to be able to do is to select an entity then display the relationships related to that entity, with the target entities of each relationship listed underneath the relationship names. When an entity is selected, an ObservableCollection is populated with the Links for that particular entity (SelectedEntityLinks<Link>). Because each entity could have the same relationship to more than one target entity (Entity1 could know both Entity3 and Entity4 for eg.), I've created a method GetThisRelationshipEntities() that takes a relationship name as a parameter, looks through SelectedEntityLinks for relationship names that match the parameter, and returns an ObservableCollection with the target entities of that relationship. Hope I'm making this clear. In my xaml I have a WrapPanel to display each relationship name in a TextBlock: <TextBlock x:Name="relationship" Text="{Binding Path=Relationship.Name}" /> Then underneath that another Textblock which should display the results of GetThisRelationshipEntities(String relationshipName). So I want the "relationship" TextBlock to both get its Text from the binding I've shown above, but also to provide its Text as a parameter to the GetThisRelationshipEntities() method which I've added to <UserControl.Resources> as an ObjectDataProvider. Sorry if this is a bit wordy but I hope it's clear. Any pointers/advice would be great. Many thanks.

    Read the article

  • Oracle database connection string PLSQL compatibility

    - by user521180
    Hi I'm using an application called Logi info. it requires a connection string to my oracle database. the connection works fine but in order to configure the connection to recive ref cursors from the database, I apparently need to add PLSQLRSet=1 to the end of the string. when I do that I recieve an error "invalid connection string" Here is my connection string without plsqlrset=1 Data Source=SID; User Id=username; Password=password; My concern is that PLSQLRSet=1 might be .NET paramater only. Can anyone shed some light on the issue. Thanks

    Read the article

  • C# - Check which event changed / accessed a Property

    - by binil
    I have a class with property say private string fieldSelectedItem; public string FieldSelectedItem { get { return fieldSelectedItem; } set { fieldSelectedItem = value; } } it is accessed from many place. I came across a situation that the a property in class is accessed by some event. and also some event is changing the value. i tried debugging. is it possible to check which event/function has changed/accessed the property. is there any method to do so.

    Read the article

  • How to set the Cell height as dynamically in iPhone?

    - by Pugal Devan
    Hi Friends, In my apps, i have created table view and displayed the images and the labels in the table view. I have downloaded the image and set the image height into the another class, so i have set the image height as delegate value. In my problem is, heightForRowAtIndexPath method is call very earlier and it never calls again. So how i set the cell height depends on the image height? - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { In Console: the height of the image is --------------------------0.000000 the height of the image is --------------------------0.000000 the height of the image is --------------------------0.000000 } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { In Console: the height of the image is --------------------------98.567039 the height of the image is --------------------------300.000000 the height of the image is --------------------------232.288406 } Is any possible to call the heightforRowAtIndexPath method inside the cellForRowAt method. Because i have set the cell frame size and height depends on the image height. So how can i set the cell height depends on the image height?, please guide me. Thanks!

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >