Daily Archives

Articles indexed Tuesday March 9 2010

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

  • WCF Certificates without Certificate Store

    - by Kane
    My team is developing a number of WPF plug-ins for a 3rd party thick client application. The WPF plug-ins use WCF to consume web services published by a number of TIBCO services. The thick client application maintains a separate central data store and uses a proprietary API to access the data store. The thick client and WPF plug-ins are due to be deployed onto 10,000 workstations. Our customer wants to keep the certificate used by the thick client in the central data store so that they don't need to worry about re-issuing the certificate (current re-issue cycle takes about 3 months) and also have the opportunity to authorise the use of the certificate. The proposed architecture offers a form of shared secret / authentication between the central data store and the TIBCO services. Whilst I don’t necessarily agree with the proposed architecture our team is not able to change it and must work with what’s been provided. Basically our client wants us to build into our WPF plug-ins a mechanism which retrieves the certificate from the central data store (which will be allowed or denied based on roles in that data store) into memory then use the certificate for creating the SSL connection to the TIBCO services. No use of the local machine's certificate store is allowed and the in memory version is to be discarded at the end of each session. So the question is does anyone know if it is possible to pass an in-memory certificate to a WCF (.NET 3.5) service for SSL transport level encryption? Note: I had asked a similar question (here) but have since deleted it and re-asked it with more information.

    Read the article

  • Problem with setVisible (true)

    - by Jessy
    The two examples shown below are same. Both are supposed to produce same result e.g. generate the coordinates of images displayed on JPanel. Example 1, works perfectly (print the coordinates of images), however example 2 returning 0 for the coordinate. I was wondering why because, I have put the setvisible (true) after adding the panel, in both examples. The only difference is that example 1 used extends JPanel and example 2 extends JFrame EXAMPLE 1: public class Grid extends JPanel{ public static void main(String[] args){ JFrame jf=new JFrame(); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final Grid grid = new Grid(); jf.add(grid); jf.pack(); Component[] components = grid.getComponents(); for (Component component : components) { System.out.println("Coordinate: "+ component.getBounds()); } jf.setVisible(true); } } EXAMPLE 2: public class Grid extends JFrame { public Grid () { setLayout(new GridBagLayout()); GridBagLayout m = new GridBagLayout(); Container c = getContentPane(); c.setLayout (m); GridBagConstraints con = new GridBagConstraints(); //construct the JPanel pDraw = new JPanel(); ... m.setConstraints(pDraw, con); pDraw.add (new GetCoordinate ()); // call new class to generate the coordinate c.add(pDraw); pack(); setVisible(true); } public static void main(String[] args) { new Grid(); } }

    Read the article

  • Constraining window position to desktop working area

    - by simplecoder
    I want to allow a user to drag my Win32 window around only inside the working area of the desktop. In other words, they shouldn't be able to have any part of the window extend outside the monitor(s) nor should the window overlap the taskbar. I'd like to do it in a way that does cause any stuttering. Handling WM_MOVE messages and calling MoveWindow() to reposition the window if it goes off works, but I don't like the flickering effect that's caused by MoveWindow(). I also tried handling WM_MOVING which prevents the need to call MoveWindow() by altering the destination rectangle before the move actually happens. This resolves the flickering problem, but another issue I run into is that the cursor some times gets aways from the window when a drag occurs allowing the user to drag the window around while the cursor is not even inside the window. How do I constrain my window without running into these issues?

    Read the article

  • Good book(s) for MMORPG design & implementation?

    - by mawg
    I am a long time professional C/C++ programmer (mostly embedded systems) and a hobbyist windows & php hacker. Can anyone recommend a book(s) specifically aimed at designing and (hopefully) implementing an MMORPG? I don't need general how to design or how to code books. Maybe a really good generic games book, but I am not interested in 1st person shooters, I want to know what it takes to implement an MMORPG. Good books, maybe also good URLs. Thanks just searching eBay and Amazon threw up a whole slew of books. Amazon's customer reviews give me an idea of how good they are, and the overview tells me what areas they cover

    Read the article

  • Wordpress auto excerpts from post content?

    - by Scott B
    I'm trying to create an auto generated post excerpt from the current page's post content using a function in my theme's header file. The post excerpt will be used as the page's meta description. Can someone give me an idea of how you might go about this once you've got the post content into a string variable? The somewhat tricky part is that, in order to predict a viable stopping point for the post excerpt, I'd like to specify that the cutoff point be the end of the first paragraph of text. And for that reason, it does not make sense to load the entire post content into the string I'm using. Can I grab the first paragraph without having to load the entire post content string? And I'm not certain how to test for that in php. Would regex be the only way?

    Read the article

  • Certificate error with Web Platform Installer

    - by findleyd
     A friend of mine was having an issue getting the Web Platform Installer to work on his Windows Server 2008 R2 box. He said there was some sort of cert error and asked me to try https://go.microsoft.com/fwlink/?LinkId=158722 on my local machine to see if I got the cert error.  I tried it and I did get a cert error on Windows 7 64bit. I happened to notice that that url simply redirects to https://www.microsoft.com/web/webpi/2.0/WebProductList.xml . Out of curiosity I dropped to a command line and tried to run .\WebPlatformInstaller.exe /? to see if there were any command line options. It gave an error that said invalid URI. So we tried running it with the product list url like: "WebPlatformInstaller.exe https://www.microsoft.com/web/webpi/2.0/WebProductList.xml" . This seems to get around the expired cert that is on go.microsoft.com.  Here's a screen shot of the error: 

    Read the article

  • iPhone App to Remotely Control Windows Media Center

    - by Barry-Jon
    Can anyone recommend an iPhone app, for non-jailbroken devices, that can be used to remotely control Windows (7, if it matters) Media Center from outside the home WiFi network? The objective is to be able to connect to the Media Center box during the day when I am not home. For instance, if I realise that the new series of [insert very trendy new show here] is starting tonight and I hadn’t set up a series link I could fire up the app and set my machine to record it. Solutions could include native iPhone apps, iPhone optimised web apps or regular web apps.

    Read the article

  • Help with a compiler warning: Initialization from distinct Objective-C type when types match

    - by Alex Gosselin
    Here is the function where I get the compiler warning, I can't seem to figure out what is causing it. Any help is appreciated. -(void)displaySelector{ //warning on the following line: InstanceSelectorViewController *controller = [[InstanceSelectorViewController alloc] initWithCreator:self]; [self.navController pushViewController:controller animated:YES]; [controller release]; } Interface and implementation for the initWithCreator: method -(InstanceSelectorViewController*)initWithCreator:(InstanceCreator*)creator; -(InstanceSelectorViewController*)initWithCreator:(InstanceCreator*)crt{ if (self = [self initWithNibName:@"InstanceSelectorViewController" bundle:nil]) { creator = crt; } return self; }

    Read the article

  • A textbox class only accept integers in Java

    - by alex
    I just want to do a textbox class onl accepts integers.. I have done something, but i think it's not enough. Can anyone help me, please? Thanks... import java.awt.TextField public class textbox extends TextField{ private int value; public textbox(){ super(); } public textbox(int value){ setDeger(value); } public int getValue() { return value; } public void setValue(int value) { this.value = value; } }

    Read the article

  • Running another process without GUI freezing

    - by Adam
    I'm having trouble getting my GUI to appear and not freeze while running (and waiting for) an outside process. In this case, drivers.exe is a very simply program where the user simply clicks "OK". So whenever I click OK, it exits. I am trying to simply make my status strip count numbers up (really fast) as drivers.exe is executing. But in practice, my GUI never appears at all until drivers.exe exits. private void run_drivers() { Console.WriteLine("Start Driver"); int driver_timeout_in_minutes = 20; System.Diagnostics.Process driverproc = System.Diagnostics.Process.Start(Application.StartupPath + "\\" + "drivers.exe"); driverproc.WaitForExit(driver_timeout_in_minutes * 1000 * 60); //uses milliseconds, we must convert } private void Form1_Load(object sender, EventArgs e) { ThreadStart worker = new ThreadStart(run_drivers); Console.WriteLine("Main - Creating worker thread"); toolStripStatusLabel1.Text = "hi"; Thread t = new Thread(worker); t.IsBackground = true; t.Start(); Console.WriteLine("Main - Have requested the start of worker thread"); int i = 0; while (t.IsAlive) { i++; toolStripStatusLabel1.Text = i.ToString(); } Console.WriteLine("Dead"); }

    Read the article

  • How to learn about Threads, Especially in Java.

    - by Javed Ahamed
    I have always been kind of confused by threads, and my class right now makes heavy use of them. We are using java.util.concurrent but I don't even really get the basics. UpDownLatch, Futures, Executors; these words just fly over my head. Can you guys suggest any resources to help learn what I need from the ground up? Thanks a lot in advance!

    Read the article

  • MySQL table data transformation -- how can I dis-aggregate MySQL time data?

    - by lighthouse65
    We are coding for a MySQL data warehousing application that stores descriptive data (User ID, Work ID, Machine ID, Start and End Time columns in the first table below) associated with time and production quantity data (Output and Time columns in the first table below) upon which aggregate (SUM, COUNT, AVG) functions are applied. We now wish to dis-aggregate time data for another type of analysis. Our current data table design: +---------+---------+------------+---------------------+---------------------+--------+------+ | User ID | Work ID | Machine ID | Event Start Time | Event End Time | Output | Time | +---------+---------+------------+---------------------+---------------------+--------+------+ | 080025 | ABC123 | M01 | 2008-01-24 16:19:15 | 2008-01-24 16:34:45 | 2120 | 930 | +---------+---------+------------+---------------------+---------------------+--------+------+ Reprocessing dis-aggregation that we would like to do would be to transform table content based on a granularity of minutes, rather than the current production event ("Event Start Time" and "Event End Time") granularity. The resulting reprocessing of existing table rows would look like: +---------+---------+------------+---------------------+--------+ | User ID | Work ID | Machine ID | Production Minute | Output | +---------+---------+------------+---------------------+--------+ | 080025 | ABC123 | M01 | 2010-01-24 16:19 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:20 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:21 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:22 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:23 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:24 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:25 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:26 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:27 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:28 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:29 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:30 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:31 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:22 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:33 | 133 | | 080025 | ABC123 | M01 | 2010-01-24 16:34 | 133 | +---------+---------+------------+---------------------+--------+ So the reprocessing would take an existing row of data created at the granularity of production event and modify the granularity to minutes, eliminating redundant (Event End Time, Time) columns while doing so. It assumes a constant rate of production and divides output by the difference in minutes plus one to populate the new table's Output column. I know this can be done in code...but can it be done entirely in a MySQL insert statement (or otherwise entirely in MySQL)? I am thinking of a INSERT ... INTO construction but keep getting stuck. An additional complexity is that there are hundreds of machines to include in the operation so there will be multiple rows (one for each machine) for each minute of the day. Any ideas would be much appreciated. Thanks.

    Read the article

  • Setting Cookie Port

    - by MasterMax1313
    I'm trying to set the port on a cookie in ASP.NET (code below), but I'm getting a very unusual error at runtime (below the code). Any thoughts? target.Cookie = new Cookie { Comment = "Test Comment", CommentUri = new System.Uri("http://www.tempuri.org"), Discard = false, Domain = "tempuri.com", Expired = false, Expires = new DateTime(2015, 12, 31), HttpOnly = false, Name = "TestCookie", Path = "/", Port = "443", Secure = false, Value = "Test Value", Version = 1, }; Exception: System.Net.CookieException: The 'Port'='443' part of the cookie is invalid..

    Read the article

  • Drupal CCK field type with complex fAPI child fields

    - by Cliff Smith
    This question is basically a follow-up to this one: http://stackoverflow.com/questions/1640534/drupal-custom-cck-field-with-multiple-child-fields I need to build a CCK field type that stores several pieces of data, and fAPI form elements to accept the input for each piece of data already exist. These elements are built out into multiple HTML form inputs with fAPI #process functions. The problem is that when I try to use these elements in my CCK field, the input from the widget doesn't line up with the database columns specified in hook_field_settings(). The widget returns something like this: Array ( [thumbnail_image] => [imceimage_path] => ... [imceimage_alt] => ... [imceimage_width] => ... [imceimage_height] => ... [user_address] => [address_number] => ... [address_street] => ... [address_city] => ... [address_state] => ... Unless there's a way to specify "sub-columns" in hook_field_settings(), it appears to me that I can't use form element types with sub-elements in CCK fields. I've tried using CCK field validation to pull out the "imce_xxx" values from thumbnail_image and likewise with user_address, but that doesn't get me anywhere. Is it not possible to use form elements with child elements in CCK field definitions? Thanks, Cliff Smith

    Read the article

  • Netbeans Module not being deployed

    - by DK
    Original Question Title: C:\Documents and Settings\user\My Documents\NetBeansProjects\ConsultingAgency\nbproject\build-impl.xml:563: The module has not been deployed. hello I am new to javaserver face developing and following some netbean tutorials on this Generating a JavaServer Faces CRUD Application from a Database : http://netbeans.org/kb/docs/web/jsf-jpa-crud-wizard.html when I run this generated code on my computer I get this message and it doesn't seem to work. C:\Documents and Settings\user\My Documents\NetBeansProjects\ConsultingAgency\nbproject\build-impl.xml:563: The module has not been deployed. Can anyone help me solving this problem ? thanks in advance.

    Read the article

  • MS Access 2003 - Unbound Form uses INSERT statement to save to table; what about subforms?

    - by Justin
    So I have an unbound form that I use to save data to a table on button click. Is there a way I can have subforms for entry that will allow me to save data to the table within that same button click? Basically I want to add more entry options for the user, and while I know other ways to do it, I am particularly curious about doing it this way (if it can be done). So lets say the 'parent form' is frmMain. And there are two child forms "sub1" and "sub2". Just for example sake lets say on frmMain there are two text boxes: txtTitle & txtAuthor. sub1 and sub2 both have a text Box on them that represent something like prices. The idea is Title & author of a book, and then a price at each store (simplified). So I tried this (because I thought it was worth a shot): Dim db as DAO.database Dim sql as String sql = "INSERT INTO (Title, Author, PriceA, PriceB) VALUES (" if not isnull(me.txtTitle) then sql = sql & """" & me.txtTitle & """," Else sql = sql & " NULL," End If if not IsNull(me.txtAuthor) then sql = sql & " """ & me.txtAuthor & """," else sql = sql & " NULL," end if if not IsNull (forms!sub1.txtPrice) then sql = sql & " """ & forms!sub1.txtPrice & """," else sql = sql & " NULL," end if without finishing the code, i think you may see the GOTCHA i am headed for. I tried this and got an "Access cannot find the form "" ". I think I can pretty much see why on this approach too, because when I click the button that calls the new sub form into the parent form, the values that were just entered are not held/saved as sub1 closes and sub2 opens. I should mention that the idea above is not intended to be a one or the other approach, rather both sub forms used everytime. so this is an example. i want to use this method (if possible) to have about 7 different sub form choices in one form, and be able to save to a table via a SQL statement. I realize that there may be better ways, but I am just wondering if I can get there with this approach out of curiousity. Thanks as always!

    Read the article

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