Search Results

Search found 1237 results on 50 pages for 'sam soffes'.

Page 38/50 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • How to insert time in SQl Derver 2005?

    - by sam
    i am creating windows application .In this i have to subtract two dates .i subtract it successfully ,i used TimeSpan to get subtracted value.But when i insert it in SQl Server 2005 db, it inserted with starting date i.e. 1/1/1900 and the calculated difference which format should i use to insert Time only? Thanks in advance

    Read the article

  • Make input field jquery ui datepicker editable

    - by Sam Vloeberghs
    Hi Folks, I've scanned trough the documentation but I can't find out how I to get the field to get the datepickers value AND let it be editable using my keyboard numpad. So filling/editing the date without using the datepicker. I hope my question is clear cause I don't know how the formulate it otherwise.. Greetings

    Read the article

  • WPF: Bind DataGrid to List<String>

    - by Sam
    Funny, how sometimes the simple things bite me in the behind. I can bind a DataGrid nicely to a Collection of some arbitrary class, using a DataGridTextColumn like this: <DataGridTextColumn Header="Name" Binding="{Binding Name}"/> Now I want to bind a DataGrid to a simple Collection. So since there is no property "Name" or something like that to bind to, how do I write the binding: <DataGridTextColumn Header="Name" Binding="{Binding ???}"/> String has no Property "Value" or something like that. And if I just write {Binding } I'll end up with a one-way-binding, unable to write changes back to the Collection. Thinking about it, I think it is not possible to bind to a collection, so I do need to wrap my string into a class? Or is there a way?

    Read the article

  • How do I get characters common to two vectors in C++?

    - by Sam Phelps
    I am trying to compare two vector objects, and return a single vector containing all the chars which appear in both vectors. How would I go about this without writing some horribly complex manual method which compares every char in the first vector to every char in the second vector and using an if to add it to a third vector (which would be returned) if they match. Maybe my lack of real experience with vectors is making me imagine this will be harder than it really is, but I suspect there is some simplier way which I have been unable to find through searching.

    Read the article

  • Showing newly added table row using .show("slow")

    - by Sam Mackrill
    I am cloning a hidden table row then populating it and after validation I want to show the row using a jquery effect ... say .show("slow") var baseRow = $("#tasks tr#baseTaskLine"); var newRow = baseRow.clone(); var lastRow = $("#tasks tr[id^='TaskLine_']" + dayClass + ":last"); var newRowId; if (lastRow.length == 0) { newRowId = "TaskLine_new0"; } else { newRowId = "TaskLine_new" + lastRow[0].rowIndex; } newRow.attr("id", newRowId); : [populate new row] : if (lastRow.length == 0) { baseRow.after(newRow); } else { lastRow.after(newRow); } newRow.hide(); : : [validate via webservice call] : newRow.show("slow"); This does show the row but it appears instantly. I have tried hiding all the <td> elements of the row then showing those and that does seem to work but some strange styles get added to each <td> which interfere with the formatting i.e. style="display: block;"

    Read the article

  • Password value on click is not changing the text to 'Password'

    - by Sam
    window.onload=function() { var password = document.getElementById('apassword'); var real = document.getElementById('password'); var fake = document.createElement('input'); fake.setAttribute('type', 'text'); /*fake.setAttribute('id', 'password');*/ fake.setAttribute('class', 'contact-input contact-right'); password.appendChild(fake); fake.setAttribute('value', 'Password'); fake.onfocus = function() {this.style.display='none';real.style.display=''; real.focus();}; real.style.display = 'none'; real.setAttribute('value', ''); real.onblur = function() {if(this.value==''){this.style.display='none';fake.style.display=''}}; }; AND <label id="apassword"> <input type="password" title="Password" id="password" class="contact-input contact-right" name="password" /> </label> What is supposed to happen is that when you click on the input box, it changes from 'Password' to a blank type="password" input box, however it doesn't happen. This originally worked, but then I had to change some ID's and classes etc. I'm not sure how to debug scripts, so hopefully someone can help me with that, and also with my question :). Thankyou :).

    Read the article

  • Get PropertyInfo from property instead of name

    - by Sam
    Say, for example, I've got this simple class: public class MyClass { public String MyProperty { get; set; } } The way to get the PropertyInfo for MyProperty would be: typeof(MyClass).GetProperty("MyProperty"); This sucks! Why? Easy: it will break as soon as I change the Name of the Property, it needs a lot of dedicated tests to find every location where a property is used like this, refactoring and usage trees are unable to find these kinds of access. Ain't there any way to properly access a property? Something, that is validated on compile time? I'd love a command like this: propertyof(MyClass.MyProperty);

    Read the article

  • c++ recursion with arrays

    - by Sam
    I have this project that I'm working on for a class, and I'm not looking for the answer, but maybe just a few tips since I don't feel like I'm using true recursion. The problem involves solving the game of Hi Q or "peg solitaire" where you want the end result to be one peg remaining (it's played with a triangular board and one space is open at the start.) I've represented the board with a simple array, each index being a spot and having a value of 1 if it has a peg, and 0 if it doesn't and also the set of valid moves with a 2 dimensional array that is 36, 3 (each move set contains 3 numbers; the peg you're moving, the peg it hops over, and the destination index.) So my problem is that in my recursive function, I'm using a lot of iteration to determine things like which space is open (or has a value of 0) and which move to use based on which space is open by looping through the arrays. Secondly, I don't understand how you would then backtrack with recursion, in the event that an incorrect move was made and you wanted to take that move back in order to choose a different one. This is what I have so far; the "a" array represents the board, the "b" array represents the moves, and the "c" array was my idea of a reminder as to which moves I used already. The functions used are helper functions that basically just loop through the arrays to find an empty space and corresponding move. : void solveGame(int a[15], int b[36][3], int c[15][3]){ int empSpace; int moveIndex; int count = 0; if(pegCount(a) < 2){ return; } else{ empSpace = findEmpty(a); moveIndex = chooseMove( a, b, empSpace); a[b[moveIndex][0]] = 0; a[b[moveIndex][1]] = 0; a[b[moveIndex][2]] = 1; c[count][0] = b[moveIndex][0]; c[count][1] = b[moveIndex][1]; c[count][2] = b[moveIndex][2]; solveGame(a,b,c); } }

    Read the article

  • Pass parameters to Windows Service to fire method

    - by Sam Youtsey
    Hi there, I'm attempting to build a Windows Service which will execute some method when a user clicks a button in a WinForms application. I'd like to be able to pass in a few strings when the user presses the GUI button which will have the service consume them and processes a specific method. What's the best way to do this? Thanks for help.

    Read the article

  • Position: absolute a div over Flash

    - by Sam
    Is it possible to position: absolute a <div /> over a Flash banner without adding wmode="transparent" to the banner? I have a lightbox that needs to appear above my ads but I can't directly modify the banners as they come from a third party.

    Read the article

  • [RPM Building] How to take user input during install

    - by Sam
    So when I create a debian package, I am able to write a post-installation shell script that runs just fine. Currently mine is configured to do echo "Please enter your MySQL Database user (default root)" read MYSQL_USER echo "Please enter the MySQL Database user password (default root)" read -s MYSQL_PASS DBEXIST=0 CMD="create database lportal;use lportal;" (mysql -u$MYSQL_USER -p$MYSQL_PASS -e "$CMD") || ((DBEXIST++)) if [ $DBEXIST -ne 0 ]; then echo "Setup finished, but MySQL already has an lportal table. This could be from a previous installation of Liferay. If you want a fresh installation of this bundle, please remove the lportal table and reinstall this package." fi This works fine for Ubuntu. However, I can't seem to get user input to work with RPMs for Fedora. Is there a good way to take user input? From what I understand, RPMs were designed not to allow interactive installs. However I can't see a better way to do this.. Is there possibly a way to automatically find local MySQL settings without asking the user? Otherwise, what's the best way to ask for user input?

    Read the article

  • Click a button in another application

    - by sam
    I want yo use SendMessage or PostMessage to press a button in another app i have a sample code to do this but by getting Window Handle, but don't work also i used "WinDowse" to get required info. here is the code private const uint BM_CLICK = 0x00F5; private const uint WM_LBUTTONDOWN = 0x0201; private const uint WM_LBUTTONUP = 0x0202; private void PushOKButton(IntPtr ptrWindow) { WindowHandle = FindWindow(null, "Form1"); if (ptrWindow == IntPtr.Zero) return; IntPtr ptrOKButton = FindWindowEx(ptrWindow, IntPtr.Zero, "Button", "&Yes"); if (ptrOKButton == IntPtr.Zero) return; SendMessage(ptrOKButton, WM_LBUTTONDOWN, 0, 0); SendMessage(ptrOKButton, WM_LBUTTONUP, 0, 0); SendMessage(ptrOKButton, BM_CLICK, 0, 0); } is There a Compelete Suloution in c# ?

    Read the article

  • Stored procedure does not return data if executed from VBA

    - by Sam
    I had stored procedure MySPOld in Sybase db. I created new sp MySP. This new sp returns data while executed from Sybase Sql Advantage. But not returning the data when called from VBA - Excel 2003 (EOF property of recordset is True). Here is my code.. Dim dbCon As ADODB.Connection Dim rstTemp As New ADODB.Recordset Dim query As String query = "exec MySP '01/01/2010', '01/14/2010'" dbCon.Open connectionString, "username" "password" dbCon.CommandTimeout = 300 rstTemp.Open query, dbCon, adOpenForwardOnly The code was working well with old sp. What could be the problem ? any idea ? Thanks in Advance.

    Read the article

  • How do I validate that my the openid.op_endpoint when a request is completed.

    - by Sam Saffron
    I have an Open ID based authentication system on my site. Occasionally users will have an account registered under [email protected] and they will attempt to login using the google open id provider https://www.google.com/accounts/o8/id, in this case I would like to automatically associate the account and log them in. When the process is done I get a payload from somewhere claiming that openid.op_endpoint=https://www.google.com/accounts/o8/id. My question: Can I trust openid.op_endpoint to be correct? Can this be spoofed somehow by a malicious openid provider? For illustration, lets say someone types in http://evil.org as their openid provider, can I somehow end up getting a request back that claims openid.op_endpoint is google? Do I need to store extra information against the nonce to validate? The spec is kind of tricky to understand

    Read the article

  • Do you use Phing?

    - by Sam McAfee
    Does anyone use Phing to deploy PHP applications, and if so how do you use it? We currently have a hand-written "setup" script that we run whenever we deploy a new instance of our project. We just checkout from SVN and run it. It sets some basic configuration variables, installs or reloads the database, and generates a v-host for the site instance. I have often thought that maybe we should be using Phing. I haven't used ant much, so I don't have a real sense of what Phing is supposed to do other than script the copying of files from one place to another much as our setup script does. What are some more advanced uses that you can give examples of to help me understand why we would or would not want to integrate Phing into our process.

    Read the article

  • jquery bubblepopup inside jquery carousel

    - by sam
    Hi, I am trying to use the jquery bubble popup inside the jquery carousel. the problem everything works fine. but say if i have 10 items in the carousel, display 5 at a time, hiding the remaining 5 items(which could be opened by clicking the left or right navigation). so when we move the mouse over each carousel item that is visible on the screen, we can see the bubble popup. here, if i move the mouse over the empty area on the screen, i am still getting the bubble pop which shouldnt be visible because that particular carousel item is hidden.if i keep on moving over all the hidden items, i am able to see the bubble popup. is there anyway to hide the bubble pop when the carousel item is not visible on the screen.

    Read the article

  • symfony and entity manager

    - by Jenis Sam
    I want to do the following I have a database table of students, and I want to output each student name in a check box list. so checkbox. Student 1 checkbox. Student 2 Where the value of the checkbox is the student's ID. How can I do that using Symfony? I want teachers to be able to select one or more checkboxes. I tried following this tutorial: http://symfony.com/doc/current/cookbook/form/form_collections.html and using collections, but I am lost...

    Read the article

  • inputAccessoryView not hide the view when -resignFirstResponder?

    - by Sam Jarman
    I have attached a toolbar with a UITextField and UIButton to the keyboard when it becomes the first responder via the user taping inside the textfield textField.inputAccessoryView = theToolbar; Problem is, the toolbar disappears when the keyboard is dismissed, thus preventing any further input. Any ideas on how to make the toolbar go back to the bottom of the screen rather than off it completely? I'm thinking a delegate method might help but Im really not too sure. It seems once the inputAccessoryView always the inputAccessoryView :( Cheers

    Read the article

  • Gedit adds line at end of page

    - by Sam
    The answer to this must be somewhere but I'm not finding it -- can anyone help me understand why in Gedit, if I have a page of code there is no extra trailing blank line, but then when I do a file comparison for my svn commit it shows an extra line being added at the end of the file? I have a feeling that Gedit is automatically adding an ending line break. But why, I have no idea...

    Read the article

  • Request URL in Javascript, Fetch URL Content using Java Applet, return to Javascript?

    - by Sam G
    I'm in the process of making a little experiment, it grabs a YouTube page, and returns the highest quality MP4 link, then plays this in a HTML 5 Video element. Now I was using PHP with cURL to get the URL content (YouTube), but that only works on my local server (MP4 link is locked to IP address). I can't think of any other way to get the page content due to cross domain rules except a Java applet. So I've built a Java applet that should return the content of a URL. Java import java.applet.Applet; import java.awt.*; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; public class URLFetcherabc extends Applet { public void init() { } public void paint(Graphics g) { g.drawString("Java loaded. Waiting for URL", 0, 10); } public String getURL(String url, String httpMethod) { try { URL u = new URL(url); HttpURLConnection conn = (HttpURLConnection)u.openConnection(); conn.setRequestMethod(httpMethod); InputStream is = conn.getInputStream(); ByteArrayOutputStream output = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; for (int bytesRead = 0; (bytesRead = is.read(buffer)) != -1; ) { output.write(buffer, 0, bytesRead); } return output.toString(); } catch (Exception e) { }return null; } } Now I've got the applet on the page, but every-time I call the function it returns nothing. Heres my HTML for including the applet. HTML <applet id="URLFetcher" name="URLFetcher" code="URLFetcherabc.class" archive="URLFetcher.jar" height="200" width="200" mayscript=""></applet> Java-Script function fetchurl(urltofetch) { var URLFetcher = document.getElementById("URLFetcher"); var result = URLFetcher.getURL(urltofetch); //Result = URL Content return result; } The function always returns null, in Java the function does work when passed a variable via other means (parameter etc). I've tried running other functions through Javascript and the Java applet does respond. I'm new to Java applets and communicating with them via Javascript, so I'm probably making either a small mistake somewhere or its completely wrong. Any ideas? Thanks

    Read the article

  • Using Variables for Class Names in Python?

    - by Sam McAfee
    I want to know how to use variables for objects and function names in Python. In PHP, you can do this: $className = "MyClass"; $newObject = new $className(); How do you do this sort of thing in Python? Or, am I totally not appreciating some fundamental difference with Python, and if so, what is it?

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >