Daily Archives

Articles indexed Saturday December 25 2010

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

  • How do I bind a Listview SelectedItem to a Textbox using the TwoWay mode?

    - by Nick U
    I am very new to WPF and testing some things that I would like to include in an application that I will be working on. I have a 2 row ListView (bound to a textbox) with the names Scott Guthrie and Jon Skeet in it. I am trying to select "Scott Guthrie" in the ListView and have it populate the TextBox. I want to be able to edit the text and tab off and have the ListView updated. Edit:I removed the code since that really didn't add anything to the question.

    Read the article

  • How can i find which anchor has been clicked for download in destination page with out using query string

    - by Dorababu
    I am having a web form initially which have href as follows <a href="downloadInfo.aspx">ACH File Management System Trail(msi)</a> <a href="downloadInfo.aspx">ACH File Management System Trail(zip)</a> These are my two anchor tags when i click on this i will redirect both to a same page where user has to fill details and a mail will be send to the user for the given mail id. When the user clicks on mail i would like to have the download for which he opted to download. If msi means i would like to prompt msi file to be downloaded and if zip it should be downloaded I need this to be worked with out using query-string

    Read the article

  • How do I do multipled level routes best in MVC

    - by Lilja
    I have a site where I would like an URL like: /Some maincategory name/{id}/Some subcategory name/{id}/Some item name/{id} I include the IDs of each level since the name is not unique. This is doable but I have to create a new routing for each level. My Html.ActionLink also looks nasty. Each level has it's own controller since the levels are completely different. The URLs could be something like this: _/Birds/2/Waders/4/Flamingos/23_ _/Mammals/5/Dogs/23/Longeared/25/Somedog/76_ _/Insects/7/Spiders_ This is just an example and not what I'm going to use. My applications has nothing to do with animals. Is there a good way of doing this or should I use the standard routing instead?

    Read the article

  • Generate SQL Server Express database from Entity Framework 4 model

    - by Cranialsurge
    I am able to auto-generate a SQL Server CE 4.0 *.sdf file using code-first generation as explained by Scott Guthrie here. The connection string for the same is as follows: <add name="NerdDinners" providerName="System.Data.SqlServerCe.4.0" connectionString="data source=|DataDirectory|NerdDinner.sdf"/> However if I try to generate an mdf instead using the following connection string, it fails to do so with the following error - "The provider did not return a ProviderManifestToken string.". <add name="NerdDinners" providerName="System.Data.SqlClient" connectionString="data source=|DataDirectory|NerdDinner.mdf"/> Even directly hooking into a SQLEXPRESS instance using the following connection string fails <add name="NerdDinners" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=NerdDinner;Integrated Security=True"/> Does EF 4 only support SQL CE 4.0 for database creation from a model for now or am I doing something wrong here?

    Read the article

  • Optimize Use of Ramdisk for Eclipse Development

    - by Eric J.
    We're developing Java/SpringSource applications with Eclipse on 32-bit Vista machines with 4GB RAM. The OS exposes roughly 3.3GB of RAM due to reservations for hardware etc. in the virtual address space. I came across several Ramdisk drivers that can create a virtual disk from the OS-hidden RAM and am looking for suggestions how best to use the 740MB virtual disk to speed development in our environment. The slowest part of development for us is compiling as well as launching SpringSource dm Server. One option is to configure Vista to swap to the Ramdisk. That works, and noticeably speeds up development in low memory situations. However, the 3.3GB available to the OS is often sufficient and there are many situations where we do not use the swap file(s) much. Another option is to use the Ramdisk as a location for temporary files. Using the Vista mklink command, I created a hard link from where the SpringSource dm Server's work area normally resides to the Ramdisk. That significantly improves server startup times but does nothing for compile times. There are roughly 500MB still free on the Ramdisk when the work directory is fully utilized, so room for plenty more. What other files/directories might be candidates to place on the Ramdisk? Eclipse-related files? (Parts of) the JDK? Is there a free/open source tool for Vista that will show me which files are used most frequently during a period of time to reduce the guesswork?

    Read the article

  • What causes my borderless C++/CLI app to crash when overriding WndProc?

    - by Ste
    I use a form with border NONE. I need to override WndProc for resize and move form. However, using this code, my app crashes! static const int WM_NCHITTEST = 0x0084; static const int HTCLIENT = 1; static const int HTCAPTION = 2; protected: virtual void Form1::WndProc(System::Windows::Forms::Message %m) override { switch (m.Msg) { case WM_NCHITTEST: if (m.Result == IntPtr(HTCLIENT)) { m.Result = IntPtr(HTCAPTION); } break; } Form1::WndProc(m); } virtual System::Windows::Forms::CreateParams^ get() override { System::Windows::Forms::CreateParams^ cp = __super::CreateParams; cp->Style |= 0x40000; return cp; } How can I fix my code not to crash but still allow my form to be moved and resized?

    Read the article

  • Variable wont echo

    - by jonnnnnnnnnie
    I have the following code, where the var $username doesn't echo, when you type in a value. //TODO: SET AUTH TOKEN as random hash, save in session $auth_token = rand(); if (isset($_POST['action']) && $_POST['action'] == 'Login') { $errors = array(); //USED TO BUILD UP ARRAY OF ERRORS WHICH ARE THEN ECHOED $username = $_POST['username']; if ($username = '') { $errors['username'] = 'Username is required'; } echo $username; // var_dump($username) returns string 0 } require_once 'login_form.html.php'; ?> login_form is this: <form method="POST" action=""> <input type="hidden" name="auth_token" value="<?php echo $auth_token ?>"> Username: <input type="text" name="username"> Password: <input type="password" name="password1"> <input type="submit" name="action" value="Login"> </form> The auth token part isn't important, it just when I type in a value in username textbox and press the login button, the username wont echo, var_dump returns string (0) and print_r is just blank.

    Read the article

  • How to print a page when a JButton is pressed in java swing using PrinterJob?

    - by Prayag Upd
    I tried the following code AWT but at runtime shows multiple print dialogs repeatedly.... package printerjob; import java.awt.BasicStroke; import java.awt.Frame; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.WindowAdapter; import java.awt.print.PageFormat; import java.awt.print.Printable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; /** * * @author pragX */ public class FramePrinterJob extends Frame implements Printable{ public void start(){ add(button); } @Override public void paint(Graphics graphics){ PrinterJob printerJob=PrinterJob.getPrinterJob(); printerJob.setPrintable(this); if(printerJob.printDialog()){ try{ printerJob.print(); }catch(PrinterException printerException){ //printerException.printStackTrace(); System.out.println("Error Printing." + printerException); } } } public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { //throw new UnsupportedOperationException("Not supported yet."); if(pageIndex>=1){ return Printable.NO_SUCH_PAGE; } graphics.translate((int) pageFormat.getImageableX(), (int)pageFormat.getImageableY()); Graphics2D graphics2D=(Graphics2D)graphics; graphics2D.setStroke(new BasicStroke(4f)); graphics2D.drawLine(20, 20, 20, 120); graphics2D.drawLine(40, 20, 40, 120); graphics2D.drawLine(20, 70, 40, 70); graphics2D.drawLine(60, 70, 60, 120); graphics2D.drawLine(60, 40, 60, 45); return Printable.PAGE_EXISTS; } public static void main(String args[]){ Frame frame=new FramePrinterJob(); frame.addWindowListener(new WindowAdapter() { public void windowClosing(){System.exit(0);}}); frame.setSize(300,400); frame.setVisible(true); } }

    Read the article

  • Installing XAMPP in Amazon EC2

    - by Woho87
    Hi! Can someone explain to me(not a rocket scientist) all the steps for installing XAMPP for a EC2 instance running Linux? And yes I have look the entire web and found nothing, except this "Deploying a lamp stack" and this "Starting Amazon EC2 with Mac OS X". I found the latter one more useful, but as a said I'm not a rocket scientist. I got stuck in to the latter link where I should edit the file .bash_profile with a text editor. I tried the "vi" in SSH, but why can't I open it on textEditor included in all Macs? Is there any easier way to setting up a XAMPP server for a linux server in EC2?

    Read the article

  • Servers / ram for social network- how many?

    - by Marty
    I am launching my social network soon an looking into hosting. The question i am lost is: Do i need separate servers for web vs database vs image handling since there is photo sharing? Or does 1 server handle it all? Also is more ram better? If i get 50GB ram is that better than having 8 gb ram? EDIT: It is PHP codeignitor and MySQL for now. (switch to NoSQL DB later if demand calls fr it.) I will be using memcache also. Concept wise it is similar to yelp, so geographic based with lots of user content and image sharing + live feeds an privacy levels. User plan is open question. Without testing the demand for this i cant give a number. But the concept is unique, no one out there with the set of features i am releasing so it could grow. Ideally I want to plan for handling about 1-2 million views / month from launch. If it goes more than that then I will upgrade.

    Read the article

  • Determining End of Line Delimiter

    - by Michael Merchant
    How do you verify what the delimiter for a file is? I'm using eclipse to edit a script file on my windows system that I use to deploy on my unix server. The script specifies file names and I'd like to be certain that eclipse is saving the files with unix end of line delimiters. I've set my preferences to use the Unix Line Delimiter on new files using: Window > Preferences > General > Workspace > "New text file line delimiter" And have changed my script file's line delimiter using. File -> Convert Line Delimiters To Is there a way (preferably with the eclipse IDE) to check that there is no "\r"?

    Read the article

  • Social-Networking Startup, Hosting Plan

    - by pws5068
    I've created a social networking community which is soon ready to release, and I'm trying to decide on a type of hosting plan. I have considered options such as VPS and Reseller plans. I anticipate (or hope for at least) a significant amount of traffic/bandwidth in the not-too-distant future. If I open a reseller, will I receive the same amount of server lag during busy hours that I do with a shared account? How significant is the profit margin with the reseller option? Aside from generalized "configurability", what advantages merit purchasing a VPS? Is there anything stopping me from reselling space on a VPS account? Features I need Include: PHP, MySql, Unlimited Domains, Ruby on Rails, Remote Database Connections

    Read the article

  • Need to determine how php files are being rendered in a LAMP configuration (CGI, FastCGI, or mod-php)

    - by Chris Williams
    How do I determine how our php files are being rendered in a simple LAMP configuration? phpinfo shows: -- Configure Command -- --enable-force-cgi-redirect --enable-fastcgi -- Server API -- CGI/FastCGI -- cgi-fcgi -- Directive Local Value Master Value cgi.check_shebang_line 1 1 cgi.fix_pathinfo 1 1 cgi.force_redirect 1 1 cgi.nph 0 0 cgi.redirect_status_env no value no value cgi.rfc2616_headers 0 0 fastcgi.logging 1 1

    Read the article

  • How to unlock and remove a protected partition from Prestigio USB stick?

    - by mr.b
    Ok, so, I have one of those fancy schmancy devices, which is given to me by a frustrated friend of mine. Device is a Prestigio Leather 8GB, which identifies itself to Linux host as: Bus 001 Device 006: ID 1307:0165 Transcend Information, Inc. 2GB/4GB Flash Drive Kernel messages as USB device is plugged in: kernel: [ 2769.580042] usb 1-9: new high speed USB device using ehci_hcd and address 7 kernel: [ 2769.714782] scsi8 : usb-storage 1-9:1.0 kernel: [ 2770.713937] scsi 8:0:0:0: Direct-Access 8192MB flash drive 1.00 PQ: 0 ANSI: 2 kernel: [ 2770.714535] scsi 8:0:0:1: Direct-Access 8192MB flash drive 1.00 PQ: 0 ANSI: 2 kernel: [ 2770.715734] sd 8:0:0:0: Attached scsi generic sg3 type 0 kernel: [ 2770.716108] sd 8:0:0:1: Attached scsi generic sg4 type 0 kernel: [ 2770.722175] sd 8:0:0:0: [sdc] 962560 512-byte logical blocks: (492 MB/470 MiB) kernel: [ 2770.722657] sd 8:0:0:0: [sdc] Write Protect is on kernel: [ 2770.731078] sd 8:0:0:1: [sdd] 14012416 512-byte logical blocks: (7.17 GB/6.68 GiB) kernel: [ 2770.731215] sdc: kernel: [ 2770.738251] sd 8:0:0:1: [sdd] Write Protect is off kernel: [ 2770.880328] kernel: [ 2770.885876] sd 8:0:0:0: [sdc] Attached SCSI removable disk kernel: [ 2770.887442] sdd: unknown partition table kernel: [ 2771.049605] sd 8:0:0:1: [sdd] Attached SCSI removable disk So, symptoms are typical for U3-like devices: two separate devices inside of a single flash device. Windows sees it also as two identical usb devices, and mounts two separate drives to system, whereas first one presents itself as a CDROM device, holding a write-protected content, and second is a regular flash-disk partition, that "can" be written to. However, it seems like it's broken in some weird way, since it won't let me write anything to it, format it, nothing, but that's not the issue right now. Question: How can I unlock entire USB stick so it appears to system as a single, 8GB device which can be partitioned and used normally, without restrictions? Since it appeared to be an U3 device, I have tried standard utilities: both U3 Uninstaller by u3.com (found on SoftPedia), and opensource u3_tool from sourceforge (on both Windows and Linux). First utility failed to even detect USB stick as U3 device (simply stood idle while I re-plugged stick several times), while second tool failed with some obscure error about SCSI command unable to do something (I might be able to provide exact errors when I switch back to windows). u3_tool -i /dev/sg3 (Display device info) fails with u3_partition_info() failed: Device reported command failed: status 1 ...and every other option fails with same error, minus first part which states which command precisely has failed. So, apparently, this isn't a U3 device. Or, if it is, it doesn't behave like one. I read on a few occasions that this device protection is done by special command sent to device which tells it to lock itself, and so there should be an unlock command, that would set drive straight. Does anyone have any idea about what could I do to this device to fix it? P.S. I also mentioned a problem with being unable to use second "drive", but I'll tackle that problem when (and if) I manage to merge those two devices into one...

    Read the article

  • Ubuntu maverick username and password works with ssh but not with smb when I connect from MacOS 10.6.5

    - by biomed
    I have an Ubuntu Maverick desktop that I can easily connect using ssh but when I want to see the shared directories using "go to server", MacOs connects to the Ubuntu machine and I can see the shared directories but when I enter my username and passord to get access it complains about me entering wrong username and/or password. Any ideas? What more information would you need to give me some advise? Is there a step by step how-to manual to get this done? thanks

    Read the article

  • How to find out the dependency paths?

    - by ???
    For example, there are packages and their dependencies: a -> b (a require b) b -> c & d x -> a y -> x z -> x z -> x & y Now, give c and z, there are two dependency paths: z -> x -> a -> b -> c z -> y -> x -> a -> b -> c The question is how to find out the dependency paths between two specific Debian packages? P.S. The idea behind is to draw the dependency graph for a given set of packages, include the intermediate ones missing in the chain.

    Read the article

  • Asus EEE PC 1005HA (XP Home) refuses to connect to Virgin Mobile MiFi

    - by Dennis Wurster
    My client has an Asus EEE PC model 1005HA, and we're attempting to connect it to the WiFi network created by a VirginMobile MiFi unit. They also have a MacBook Pro with Snow Leopard that has absolutely no issue connecting to the MiFi. The specific symptom is that the netbook fails to lease an IP address from the MiFi unit. I supply the 12-digit numerical password (WPA) to the netbook, it throws a 'waiting for network' dialog with an indeterminate progress indicator, and then times out. Update: We've determined that this behavior has stopped when the EEE PC and the MiFi unit were taken out of the client's home, and to a different home that didn't have an existing wifi network. Similarly, when taken to a third location that didn't have wifi, the EEE PC and MiFi got along swimmingly. My current theory is that the existing wifi networks and the wifi leg of the MiFi unit are on the same channel and competing with one another. Perhaps the MacBook Pro has the capability to overcome this interference, while the EEE PC doesn't.

    Read the article

  • Run a program in compatibility mode without Administrator privileges

    - by a_m0d
    I have a PC which is mostly used for playing games. The PC is a few years old, running XP, and most likely won't ever be upgraded to Windows 7. However, there are a few games that need to be run in compatibility mode for some reason, and this currently requires them to be run as the administrator. Unfortunately, I haven't found any way around this - although I have the administrator password, I don't want to reveal it to the others who use the PC, and this means that I have to be present every time to start the program for them (using Run as ... - Administrator). Is there any way I can allow these programs to be run in compatibility mode without requiring elevated user privileges? I have already made the standard user a Power User, but this hasn't helped at all. Any advice would be appreciated.

    Read the article

  • How do I set a ComboBox default *not in the drop down* when a list item begins with the same text as a drop down item?

    - by John Conrad
    Using C#, say you have a ComboBox that has a DropDownStyle set to DropDown (there are items in the drop down but the user can manually enter a value as well). How do you set a default value for the ComboBox that is not in the list of values in the drop down, but begins with text from a possible selection? Normally setting ComboBox.Text works fine, but if there is an item in the drop down that begins with the text you want as the default, it automatically selects the first item in the list that starts with the text. For example: Values in the drop down: c:\program files\ c:\windows\ d:\media\ Default Value Assignment myComboBox.Text = "C:\"; Result Initial value of ComboBox when the form opens is "c:\program files\". So what am I doing wrong? How do I correctly set a default value of an item not in the drop down list that begins with a possible selection?

    Read the article

  • How to load another's service certificate to my WebLogic truststore?

    - by Murugan
    An online service provided me with their certificate (a pfx file) along with its password. I am looking to load that into my WebLogic 8.1 truststore in Unix. There is a truststore currently that exists in my WebLogic. I am new to this so I was wondering what was the process to add that other party's certificate to my existing WebLogic keystore. Do I need to convert the pfx file into a different for Unix?

    Read the article

  • MUL instruction help

    - by Tanner Babcock
    I've read a few tutorials and examples, but I cannot wrap my head around how the MUL instruction works. I've used ADD and SUB without problems. So apparently this instruction multiplies its operand by the value in a register. What register (eax, ebp, esp, etc.) is multiplied by the first operand? And what register is the result stored in, so I can move it to the stack? Sorry, I'm just learning x86 assembly. When I try to compile this line... mull $9 I get, "Error: suffix or operands invalid for 'mul'". Can anyone help me out? Thanks. EDIT: OK Madhur, I replaced "mull" with "mul" and I'm still getting the same error. Here's the whole source. .globl _main _main: pushl %ebp movl %esp, %ebp subl $8, %esp movl $7, %eax mul $9 movl %eax, (%esp) call _putchar xorl %eax, %eax leave ret

    Read the article

  • Initializing a List c#

    - by Mohan
    List<Student> liStudent = new List<Student> { new Student { Name="Mohan",ID=1 }, new Student { Name="Ravi",ID=2 } }; public class Student { public string Name { get; set; } public int ID { get; set; } } Is there other way to write this? I am a newbie. I want to make instance of student class first and assign properties in list.

    Read the article

  • How to startactivityforresult in tab child of TabHost

    - by user541383
    I have TabHost with tab child like this: tabHost.addTab(tabHost.newTabSpec("web") .setIndicator("web") .setContent(new Intent(this, webview.class))); In WebView class, I startactivityforresult: startActivityForResult(new Intent(Webview.this,EventManage.class),GET_CODE); In Eventmanage class, I set result but can not capture result in webview class. Anybody can help me with this problem?

    Read the article

  • WP7 PanoramaItem with Icon/Button next to Header

    - by Ramon Bosch
    Windows Phone 7's People hub has an "all" panorama item with "search" and a "new" buttons right next to the header/title. I can't seem to accomplish this with PanoramaItem in Visual Studio using the standard Panorama control. I don't know enough Silverlight/WPF either to be able to position something manually and control transitions/movement correctly. How can I set a button (or any object, for that matter) to go alongside the header of a wp7 PanoramaItem? Thanks!

    Read the article

  • PDF writeHTML for rendering tables

    - by sami
    I'm using TCPDF and following this example which uses writeHTML and heredoc syntax to write a table. http://www.tcpdf.org/examples/example_048.phps I'm trying to do though is switch the font using setFont before writing each column. This means I have to break the html and write it on different pieces (see pseudo code). But once I break the HTML like that, it doesn't work, I think because it becomes invalid. writeHTML <tr> writeHTML first column setFont() writeHTML second column writeHTML </tr> I want to use writeHTML because it helps me write the table without having to manually construct. But how can I make modifications before I output each cell?

    Read the article

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