Search Results

Search found 2682 results on 108 pages for 'michael mao'.

Page 84/108 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • WF - Creating a selective list

    - by Michael Bendtsen
    I have a stupid question. I have created a workflow Designer host where I publish my own activities. I also have a property grid which only displays the properties decorated with a special attribute. This designer is going to be used by none IT staff. What I want is that on an activity the user can select a property value from a list. I know I just could create an Enum but I would like it to be dynamic. I.e. all events on a specific interface (extracted using reflection). Is this at all possible or am I stuck with enums?

    Read the article

  • Are WCF Services encrypted automatically if they go over SSL?

    - by michael
    Basically, if I have a plain WCF Service over HTTPS is it automatically secure? [ServiceContract] public interface ICalc { [OperationContract] int add(int a, int b); } public class Calculator : ICalc { public int add(int a, int b) { return a + b; } } I figure the actual SOAP message isn't encrypted here, but is it still secure if I use https? Basically, if I use a basichttpbinding with no security settings in my config over https://www.myserver.com/services/Calc.svc is that secure?

    Read the article

  • Code Composer 4 (Eclipse based)- makefiles

    - by michael
    How do I prevent Code Composer 4 (which is based on Eclipse) from generating its own makefile and use the one I provide instead? Background: I am starting a FreeRTOS project on a MSP430F5436 using Code Composer 4 and have a demo app with a supplied make file) Thanks!

    Read the article

  • JavaScript Load New Page Question

    - by Michael
    What I am looking to do is if a user complete a form it will provide access to a new location. <script language="JavaScript" type="text/javascript"> <!-- function validateForm(theForm) { var firstname = theForm.firstname.value; var lastname = theForm.lastname.value; var email = theForm.email.value; if (firstname == "") { alert("Please fill in your First Name."); theForm.firstname.focus(); return false; } if (lastname == "") { alert("Please fill in your Last Name."); theForm.lastname.focus(); return false; } if (email == "") { alert("Please fill in your email address."); theForm.email.focus(); return false; } return true; } I know this part is wrong but I have no idea how to go about doing it. any help would be nice.. if lastname="" if firstname="" if email="" load('www.google.com');

    Read the article

  • Adding a web address to a <a href="value">

    - by Michael Robinson
    I have an upload script that write a index.html file, I modified it to mail me the results, however the point to the root, since the email isn't in the root, the image doesn't load. How do I append the code to add "http://www.home.html/uploaded" prior to the ". $value ." so that the images show up in the email. Here is portion of PHP that assigns the images to a $result: // Process value of Imagedata field, this is JPEG-files array foreach ($_FILES[Imagedata][name] as $key => $value) { $uploadfile = $destination_dir . basename($_FILES[Imagedata][name][$key]); if (move_uploaded_file($_FILES['Imagedata']['tmp_name'][$key], $uploadfile)) { $result .= "File uploaded: <a href='". $value . "'>" . $value . "</a><br>"; } } // $result .= "<br>"; Here is what I'm now receiving in the email, : <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Upload results</title> </head> <body> AdditionalStringVariable: pass additional data here<br><a> href='gallery_grannylovesthis_l.jpg'><img border = '0' src='QIU_thumb_gallery_grannylovesthis_l.jpg'/></a><br><br><br>File uploaded: <a href='gallery_grannylovesthis_l.jpg'>gallery_grannylovesthis_l.jpg</a><br><br> GlobalControlData: PHOTO_VISIBILITY : 2<br> GlobalControlData: PHOTO_DESCR : Requiredtest<br> GlobalControlData: PHOTO_TITLE : Requiredtest<br><br>gallery_grannylovesthis_l.png<br> control: , value: <br> </body> </html> Thanks in advance for any guidance...I have a feeling it's something simple.

    Read the article

  • Preserving the GLBlendFunc

    - by Michael Minerva
    I need to preserve the current GlBlendFunc so can restore it after I do some work. It seems that this is not one of the attributes that can be saved with GLPushAttrib, is there some other similar method I can use to preserve the state?

    Read the article

  • Large transactions causing "System.Data.SqlClient.SqlException: Timeout expired" error?

    - by Michael
    My application requires a user to log in and allows them to edit a list of things. However, it seems that if the same user always logs in and out and edits the list, this user will run into a "System.Data.SqlClient.SqlException: Timeout expired." error. I've read comments about increasing the timeout period but I've also read a comment about it possibly caused by uncommitted transactions. And I do have one going in the application. I'll provide the code I'm working with and there is an IF statement in there that I was a little iffy about but it seemed like a reasonable thing to do. I'll just go over what's going on here, there is a list of objects to update or add into the database. New objects created in the application are given an ID of 0 while existing objects have their own ID's generated from the DB. If the user chooses to delete some objects, their IDs are stored in a separate list of Integers. Once the user is ready to save their changes, the two lists are passed into this method. By use of the IF statement, objects with ID of 0 are added (using the Add stored procedure) and those objects with non-zero IDs are updated (using the Update stored procedure). After all this, a FOR loop goes through all the integers in the "removal" list and uses the Delete stored procedure to remove them. A transaction is used for all this. Public Shared Sub UpdateSomethings(ByVal SomethingList As List(Of Something), ByVal RemovalList As List(Of Integer)) Using DBConnection As New SqlConnection(conn) DBConnection.Open() Dim MyTransaction As SqlTransaction MyTransaction = DBConnection.BeginTransaction() Try For Each SomethingItem As Something In SomethingList Using MyCommand As New SqlCommand() MyCommand.Connection = DBConnection If SomethingItem.ID > 0 Then MyCommand.CommandText = "UpdateSomething" Else MyCommand.CommandText = "AddSomething" End If MyCommand.Transaction = MyTransaction MyCommand.CommandType = CommandType.StoredProcedure With MyCommand.Parameters If MyCommand.CommandText = "UpdateSomething" Then .Add("@id", SqlDbType.Int).Value = SomethingItem.ID End If .Add("@stuff", SqlDbType.Varchar).Value = SomethingItem.Stuff End With MyCommand.ExecuteNonQuery() End Using Next For Each ID As Integer In RemovalList Using MyCommand As New SqlCommand("DeleteSomething", DBConnection) MyCommand.Transaction = MyTransaction MyCommand.CommandType = CommandType.StoredProcedure With MyCommand.Parameters .Add("@id", SqlDbType.Int).Value = ID End With MyCommand.ExecuteNonQuery() End Using Next MyTransaction.Commit() Catch ex As Exception MyTransaction.Rollback() 'Exception handling goes here End Try End Using End Sub There are three stored procedures used here as well as some looping so I can see how something can be holding everything up if the list is large enough. Other users can log in to the system at the same time just fine though. I'm using Visual Studio 2008 to debug and am using SQL Server 2000 for the DB.

    Read the article

  • Trigger on database using a web application and a winform application

    - by Michael
    Hello all, Situation: I have a web application which shows errors and where you can accept those error messages. I also have a service, which checks errors from a system and sets the error messages in the database. When I accept an error in the web application, i would like the service to know which error message has been accepted, so that it can do some other actions. My guess is that this could be done through some sort of trigger, but i can't figure out how. Can anyone help me with this?

    Read the article

  • Howto check if two hosts are the same

    - by Michael Stoll
    Hi, I just came across an issue, where I had to check if a path points into a windows share. Part of this problem is to check if host A is the same as host B. Where host A and host B can be one of the following {IPv4-Address, IPv6-Address, Hostname, FQDN}. As I do not need to be exact it's enough to resolve and compare the IP-Addresses in my case. But is there, theoretically, a method to check if the hosts are the same?

    Read the article

  • Grails: can remoteField update multiple fields?

    - by Michael Bavin
    Hi, Assume i have a book entity with an isbn field. When entered a isbn number, i want 2 fields to be updated: title and author. My controller looks like this: def ajaxGetBook = { def book = Book.findByIsbn(params.isbn) if(book==null) book = new Book() render book as JSON } So my call works, and i get a full JSON Book. Now i would like to update 2 texfields by the update attribute <g:remoteField action="ajaxGetBook" update="title" name="isbn" value="${bookInstance?.book?.isbn}" paramName="isbn"/> Now the title field gets updated with the full book object, so that doesn't work. Is it possible to update field title with only the JSON book.title? Is it possible to update more fields at once? I could render book.title as JSON but that works for only one field. Thank you

    Read the article

  • make target is never determined up to date

    - by Michael
    Cygwin make always processing $(chrome_jar_file) target, after first successful build. So I never get up to date message and always see commands for $(chrome_jar_file) are executing. However it happens only on Windows 7. On Windows XP once it built and intact, no more builds. I narrowed down the issue to one prerequisite - $(jar_target_dir). Here is part of the code # The location where the JAR file will be created. jar_target_dir := $(build_dir)/chrome # The main chrome JAR file. chrome_jar_file := $(jar_target_dir)/$(extension_name).jar # The root of the JAR sources. jar_source_root := chrome # The sources for the JAR file. jar_sources := bla #... some files, doesn't matter jar_sources_no_dir := $(subst $(jar_source_root)/,,$(jar_sources)) $(chrome_jar_file): $(jar_sources) $(jar_target_dir) @echo "Creating chrome JAR file." @cd $(jar_source_root); $(ZIP) ../$(chrome_jar_file) $(jar_sources_no_dir) @echo "Creating chrome JAR file. Done!" $(jar_target_dir): $(build_dir) echo "Creating jar target dir..." if [ ! -x $(jar_target_dir) ]; \ then \ mkdir $(jar_target_dir); \ fi $(build_dir): @if [ ! -x $(build_dir) ]; \ then \ mkdir $(build_dir); \ fi so if I just remove $(jar_target_dir) from $(chrome_jar_file) rule, it works fine.

    Read the article

  • How can I remove my last commit in my local git repository

    - by michael
    Hi, This is the output of my 'git log'. But when I do a 'git pull' , the top commit causes conflict. So I did a 'git rebase -abort' commit 7826b25db424b95bae9105027edb7dcbf94d6e65 commit 5d1970105e8fd2c7b30c232661b93f1bcd00bc96 But my question is Can I 'save' my commit to a patch and then do a git pull? Just like I want to emulate * I did not do a git commit, but I did a 'git stash' instead * Do a git pull so that I should not get any merge error So I need to somehow 'turn back the clock'. Is that possible in git?

    Read the article

  • How to add indexes to MySQL tables?

    - by Michael
    I've got a very large MySQL table with about 150,000 rows of data. Currently, when I try and run SELECT * FROM table WHERE id = '1'; the code runs fine as the ID field is the primary index. However, recently for a development in the project, I have to search the database by another field. For example SELECT * FROM table WHERE product_id = '1'; This field was not previously indexed, however, I've added it as an index but when I try to run the above query, the results is very slow. An EXPLAIN query reveals that there is no index for the product_id field when I've already added one and as a result the query takes any where from 20 minutes to 30 minutes to return a single row. EDIT: My full EXPLAIN results are: | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+----------------------+------+---------+------+------+------------------+ | 1 | SIMPLE | table | ALL | NULL | NULL | NULL | NULL | 157211 | Using where | +----+-------------+-------+------+----------------------+------+---------+------+------+------------------+

    Read the article

  • Define 2D array with loops in php

    - by Michael
    I have an array $rows where each element is a row of 15 tab-delimited values. I want to explode $rows into a 2D array $rowData where each row is an array element and each tab-delimited value is assigned to a different array element. I've tried these two methods without success. I know the first one has a coding error but I do not know how to correct it. Any help would be amazing. for ($i=0; $i<count($rows); $i++){ for ($j=0; $j<15; $j++){ $rowData = array([$i] => array (explode(" ", $rows[$j]))); } } foreach ($rows as $value){ $rowData = array( array (explode(" ", $rows[$value]))); }

    Read the article

  • How to find the number of inversions in an array ?

    - by Michael
    This is an phone interview question: "Find the number of inversions in an array". I guess they mean O(N*log N) solution since O(N^2) is trivial. I guess it cannot be better than O(N*log N) since sorting is O(N*log N) I have checked a similar question from SO and can summarize the answers as follows: Calculate half the distance the elements should be moved to sort the array : copy the array and sort the copy. For each element of the original array a[i] find it's position j in the sorted copy (binary search) and sum abs(i - j)/2. Modify merge sort : modify merge to count inversions between two sorted arrays (it takes O(N)) and run merge sort with the modified merge. Does it make sense ? Are there other (maybe simpler) solution ? Isn't it too hard for a phone interview ?

    Read the article

  • XUL: create menu items dynamically and set "selected" attr

    - by Michael
    I have a firefox extension Options pref panel, where I should dynamically create menu items and select particular item to be current. here is the XUL file part <menulist id="rss_service_combo"> <menupopup id="rss_service_menu"/> </menulist> Then in load event of the pref panel, using js I append menuitem elements into menupop. This is working fine. The only problem is that even if I set the selected element the item is not selected and combo box is initially empty. The only way is working at the moment is if I manually add those menuitems into XUL file and set selected attribute, but I need to do it dynamically.

    Read the article

  • Windows Forms Unhandled-Exception Dialog

    - by Michael
    I want to get Default Windows Forms Unhandled-Exception Dialog whenever my C# application encounters U-E. In vs 2005 when I turn off jit Debugging in app.conf like this: <configuration> <system.windows.forms jitDebugging="false" /> <configuration> the application behaves correctly and shows Windows Forms U-E default dialog, with Continue, Quit, call stack and all. However in vs 2008, on the same machine or different, even though I diable jit I still get Default .NET Unhandled-Exception Dialog, with Debug, Send Report and Don't Send buttons. How can I make my vs 2008 app act like the one I make in vs 2005, to show Windows Forms U-E dialog box? Please do not recommend to use AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); just because I don't use custom handler in my vs 2005 project, why would I use in vs 2008? I want to let this job do CLR. Any help is appreciated

    Read the article

  • How can I pass a C++ member function to a C API as a parameter

    - by michael
    Hi, In my C++ program, I need to call this c API: GConn* gnet_conn_new (const gchar *hostname, gint port, GConnFunc func); where GConnFunc is defined as: void (*GConnFunc) (GConn *conn); My question is if I have a C++ class and have a member function like Class A { public: A(); void my_func (GConn* conn); } In my A::A() Constructor, how can I pass this-myfunc to gnet_conn_new as the GConnFunc parameter? Thank you.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >