Search Results

Search found 513 results on 21 pages for 'sean ochoa'.

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

  • Learning how to program real things.

    - by Sean
    How would you guys recommend I actually learn to program real things? I mean, I know how to do basic academic things. I can implement a templated stack/queue/map/etc. data structure in C++ or Java or whatever. I can make a text-based hangman game or whatever. Etc etc. But how can I learn to program something real, something useful? I've done project Euler up to question 100 or so, and I feel like that's given me more mathematical maturity but not programming maturity. Should I buy a book and follow exercises, struggle through interesting projects, etc, ? In short, how did you guys transition from academic exercises to real, fun and/or useful programs?

    Read the article

  • Using asp.net mvc model binders generically

    - by Sean Chambers
    I have a hierarchy of classes that all derive from a base type and the base type also implements an interface. What I'm wanting to do is have one controller to handle the management of the entire hierarchy (as the actions exposed via the controller is identical). That being said, I want to have the views have the type specific fields on it and the model binder to bind against a hidden field value. something like: <input type="text" name="model.DerivedTypeSpecificField" /> <input type="hidden" name="modelType" value="MyDerivedType" /> That being said, the asp.net mvc model binders seem to require the concrete type that they will be creating, because of that reason I would need to create a different controller for every derived type. Has anyone does this before or know how to manipulate the model binder to behave in this way? I could write my own model binder, but I'm not wanting anything past the basic model binding behavior of assign properties and building arrays on the target type. Thanks!

    Read the article

  • Why doesnt doesnt HTML input of type file not work with Ajax update panel

    - by Sean P
    I have a input of type file and when i try to do a Request.files when the input is wrapped in an update panel...it always returns an empty httpfilecollection. Why??? This is the codebehind: (At HttpContext.Current.Request.Files...its always 0 for the count.) Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click Dim uploads As HttpFileCollection uploads = HttpContext.Current.Request.Files For i As Integer = 0 To (uploads.Count - 1) If (uploads(i).ContentLength > 0) Then Dim c As String = System.IO.Path.GetFileName(uploads(i).FileName) Try uploads(i).SaveAs("C:\UploadedUserFiles\" + c) Span1.InnerHtml = "File Uploaded Sucessfully." Catch Exp As Exception Span1.InnerHtml = "Some Error occured." End Try End If Next i End Sub This example comes from the ASP.Net website...but my application is very similar.

    Read the article

  • Adding Message Part dynamically in Receive Pipeline

    - by Sean
    Hello, I tried to create a custom pipeline component that takes a message and attaches additional another part dynamically (during Disassemble stage). I haven't set up a send port, so that I can see what BizTalk is trying to process. I can see only the body part, the additional part doesn't show up. This is the code I used: var part = pc.GetMessageFactory().CreateMessagePart(); part.Data = new MemoryStream(new byte[] {1, 2, 3, 4, 5}); inmsg.AddPart("another_part", part, false); Thank you.

    Read the article

  • How can I type cast EventArgs to have a .point property in c#? [closed]

    - by Sean Smyth
    I'm working with a double click function in c#. the function takes an object and EventArgs as it's parameters: private void gvHL7_DoubleClick(object sender, EventArgs e){ . . . } However, I want to use the .Point property, and EventArgs doesn't have that property. I know that DevExpress.XtraGrid.Views.Grid.GridMenuEventArgs does, but it's saying that's an invalid casting. What type should I cast my EventArgs instance to if I wish to access the .Point property? Edit: The double click function I'm working with is provided by devexpress for their grids.

    Read the article

  • Customising Web-logics default 404 error page

    - by Sean McDaid
    I am running weblogic 9. When I enter an incorrect URL below the application root I redirect 404 request to a customized error page. Eg. http://localhost:7001/myApp/non-existent redirects to my customised error page. Is there a way to do this for all incorrect URLs entered, not necessarily below the application root? Eg. http://localhost:7001/anything_non-existent should redirect to my customized error page, not the web-logic default one? Thanks

    Read the article

  • how to trigger notification from other framework in atmosphere (comet)?

    - by Sean Xiong
    basically i have read some samples, but all are self contained in one servlet. such as: use doGet to establish the long polling connection, and then use doPost to trigger the event to notify all suspended connections. Here is my question: I have other web actions programming in spring mvc, in the spring mvc controller a user post a message via /message/post, how can I make this action to trigger the atmosphere handler to notify the suspended connections?

    Read the article

  • ASP.NET MVC 2 Cancel Asynchronous Action

    - by Sean Carpenter
    The MSDN documentation for using an asynchronous controller mentions choosing an asynchronous controller when you want to provide a way for users to cancel requests. I couldn't find any documentation related to actually allowing users to cancel asynchronous requests, however. Is there a way to indicate to ASP.Net and/or the MVC framework that a request should be canceled?

    Read the article

  • Suppress the HTTP_X_FORWARDED_FOR http header, c# .net C++

    - by Sean
    I'm writing an application in C# that uses proxies. The proxies are sending the HTTP_X_FORWARDED_FOR during HTTP requests, and this is unwanted behavior. I am extending the Interop.SHDocVw axWebBrowser (aka Internet Explorer) control right now, but can take another approach if needed for this problem. Is there some way to suppress this header... can this be done in code, on the proxy server, or not at all?

    Read the article

  • How should I progressively enhance this content with JavaScript?

    - by Sean Dunwoody
    The background to this problem is that I'm doing a computing project which involves Some drop down boxes for input, and a text input where the user can input a date. I've used YUI to enhance the form, so the calendar input uses the YUI calendar widget and the drop down list is converted into a horizontal list of inputs where the user only has to click once to select any input as opposed to two clicks with the drop down box (hope that makes sense, not sure how to explain it clearly) The problem is, that in the design section of my project I stated that I would follow the progressive enhancement principles. I am struggling however to ensure that users without JavaScript are able to view the drop down box / text input on said page. This is not because I do not necessarily know how, but the two methods I've tried seem unsatisfactory. Method 1 - I tried using YUI to hide the text box and drop down list, this seemed like the ideal solution however there was quite a noticeable lag when loading the page (especially for the first time), the text box and drop down list where visibile for at least a second. I included the script for this just before the end of the body tag, is there any way that I can run it onload with YUI? Would that help? Method 2 - Use the noscript tag . . . however I am loathed to do this as while it would be a simple solution, I have read various bad things about the noscript tag. Is there a way of making mehtod one work? Or is there a better way of doing this that I am yet to encounter?

    Read the article

  • Excel, VBA Vlookup, multiple returns into rows

    - by Sean Mc
    Very new to VBA, so please excuse my ignorance. How would you alter the code below to return the result into rows as opposed to a string? Thanks in advance.... data Acct No CropType ------- --------- 0001 Grain 0001 OilSeed 0001 Hay 0002 Grain function =vlookupall("0001", A:A, 1, " ") Here is the code: Function VLookupAll(ByVal lookup_value As String, _ ByVal lookup_column As range, _ ByVal return_value_column As Long, _ Optional seperator As String = ", ") As String Application.ScreenUpdating = False Dim i As Long Dim result As String For i = 1 To lookup_column.Rows.count If Len(lookup_column(i, 1).text) <> 0 Then If lookup_column(i, 1).text = lookup_value Then result = result & (lookup_column(i).offset(0, return_value_column).text & seperator) End If End If Next If Len(result) <> 0 Then result = Left(result, Len(result) - Len(seperator)) End If VLookupAll = result Application.ScreenUpdating = True End FunctionNotes:

    Read the article

  • What's the most DRY-appropriate way to execute an SQL command?

    - by Sean U
    I'm looking to figure out the best way to execute a database query using the least amount of boilerplate code. The method suggested in the SqlCommand documentation: private static void ReadOrderData(string connectionString) { string queryString = "SELECT OrderID, CustomerID FROM dbo.Orders;"; using (SqlConnection connection = new SqlConnection(connectionString)) { SqlCommand command = new SqlCommand(queryString, connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(); try { while (reader.Read()) { Console.WriteLine(String.Format("{0}, {1}", reader[0], reader[1])); } } finally { reader.Close(); } } } mostly consists of code that would have to be repeated in every method that interacts with the database. I'm already in the habit of factoring out the establishment of a connection, which would yield code more like the following. (I'm also modifying it so that it returns data, in order to make the example a bit less trivial.) private SQLConnection CreateConnection() { var connection = new SqlConnection(_connectionString); connection.Open(); return connection; } private List<int> ReadOrderData() { using(var connection = CreateConnection()) using(var command = connection.CreateCommand()) { command.CommandText = "SELECT OrderID FROM dbo.Orders;"; using(var reader = command.ExecuteReader()) { var results = new List<int>(); while(reader.Read()) results.Add(reader.GetInt32(0)); return results; } } } That's an improvement, but there's still enough boilerplate to nag at me. Can this be reduced further? In particular, I'd like to do something about the first two lines of the procedure. I don't feel like the method should be in charge of creating the SqlCommand. It's a tiny piece of repetition as it is in the example, but it seems to grow if transactions are being managed manually or timeouts are being altered or anything like that.

    Read the article

  • Desktop PC Raid 5 or JBOD?

    - by Sean Lim
    I have a desktop PC and I want to get alot of space for movies, music, and pictures. I probably will not be deleting files. I am running Windows 7 on my system. It is kind of silly I just want the physical drives to be labeled as a single letter drive. And probably map my video, documents, pictures and music on that single drive. The main reason I considered RAID 5 because I would be lazy to get the data I lost and hopefully that if I get a new drive, it would rebuild it. So my question is which would be better? A second question is can I get RAID card that has only 2 internal connectors and still do RAID 5? or do I have to get a RAID card that has 4 internal connectors.

    Read the article

  • Visual Studio line deletion

    - by Sean
    Is there any way in Visual Studio 2003 that I can delete a line without it being copied into the clipboard? There are instances when I want to copy the first line of a block of text and then delete the following n lines but this then puts the last line I deleted into the clipboard, which is very annoying. I have come from a brief keymap background and I could easily do this with Alt-D. And while I'm on the subject, why on earth have MS stopped supporting the brief keymap?

    Read the article

  • Visual Studio Macro: How to perform "File -> Save All" programatically

    - by Sean B
    I am looking for the equivalent of running "File - Save All" before certain Rake macros. What I have so far is: Private Sub Pre_Rake() Dim i As Integer DTE.Documents.SaveAll() For i = 1 To DTE.Solution.Projects.Count If Not DTE.Solution.Projects.Item(i).Saved Then DTE.Solution.Projects.Item(i).Save() End If Next End Sub DTE.Documents.SaveAll works fine, but the for loop does not save the project files as I would expect. If I make a copy of a file in the solution explorer, that file is not included in the project file (.CSPROJ) after Pre_Rake() runs. I would still have to press CTRL-SHIFT-S or File - Save All. So, how to Save All with a Visual Studio Macro?

    Read the article

  • Win CE 6.0 client using WCF Services - Reduce Bandwidth

    - by Sean
    We have a Win CE 6.0 device that is required to consume services that will be provided using WCF. We are attempting to reduce bandwidth usage as much as possible and with a simple test we have found that using UDP instead of HTTP saved significant data usage. I understand there are limitations regarding WCF on .NET Compact Framework 3.5 devices and was curious what people thought would be the appropriate way forward. Would it make sense to develop a custom UDP binding, and would that work for both sides? Any feedback would be appreciated. Thanks.

    Read the article

  • Javascript height statement

    - by Sean
    This is not working and I can't figure out where I went wrong: <style> * { margin: 0px } div { height: 250px; width: 630px; overflow: hidden; vertical-align: top; position: relative; } iframe { position: absolute; left: -50px; top: -130px; } </style> <script> window.onload = function() { document.getElementsByTagName('body')[0].onkeyup = function(e) { var div = document.getElementById('capture'); if(e.keyCode == 70) { if(div.style.height == 250){ alert("Yes"); } else {alert("no");} } } }; </script>

    Read the article

  • Facebook iFrame APP not working in IE, works on every other browser

    - by Sean Ashmore
    So im getting a blank page when loading this page within an iFrame on Internet explorer, every other browser works fine.. I have also tried using p3p headers as other people have suggested, but to no avail. <?php require ("connect.php"); require ("config.php"); require ("fb_config.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Login handler</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="css/login.css" type="text/css"> </head> <body> <?//=$user?> <?php if($user == 0) { echo "You are not logged into facebook. Nice try."; }else{ $query = "SELECT id,fb_id,login_ip,login_count,activated,sitestate FROM login WHERE fb_id='".mysql_real_escape_string($user)."'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); if (mysql_num_rows($result) == 0) { $sql = "INSERT INTO login SET id = '', fb_id ='" .mysql_real_escape_string($user). "', name = '" .rand(10000000000000000,99999999999999999999). "', signup =NOW() , password = '" .mysql_real_escape_string($pass). "', state = '0', mail = '" .mysql_real_escape_string($_POST['mail']). "',location='".mysql_real_escape_string($randomlocation)."',location_start='".mysql_real_escape_string($randomlocation)."', signup_ip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."',ref='".mysql_real_escape_string($_POST['ref'])."', activation_id = '" .mysql_real_escape_string($activation_link). "',activated='2', killprotection = '$twodayprot',gender='" .mysql_real_escape_string($_POST["gender"]). "'"; $res = mysql_query($sql); } //if($row['fb_id'] != $user){ //echo "Your facebook ID: $user is NOT in the MW DB."; //exit(); //}else{ if(empty($row['login_ip'])){ $row['login_ip'] = $_SERVER['REMOTE_ADDR']; }else{ $ip_information = explode("-", $row['login_ip']); if (in_array($_SERVER['REMOTE_ADDR'], $ip_information)) { $row['login_ip'] = $row['login_ip']; }else{ $row['login_ip'] = $row['login_ip']."-".$_SERVER['REMOTE_ADDR']; } } $update_login = mysql_query("UPDATE login SET login_count=login_count+'1' WHERE name='".mysql_real_escape_string($_POST['username'])."'") or die(mysql_error()); $_SESSION['user_id'] = $row['id']; $result = mysql_query("UPDATE login SET userip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."',login_ip='".mysql_real_escape_string($row['login_ip'])."',login_count='0' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'") or die(mysql_error()); if ($row['sitestate'] == 0){ header("location: home.php"); } elseif ($row['sitestate'] == 2) { header("location: killed.php?id={$row['id']}&encrypted={$row['password']}"); } else { header("location: banned.php?id={$row['id']}&encrypted={$row['password']}"); } }// id check. ?> </body> </html>

    Read the article

  • Automated user testing with times

    - by Sean
    I am attempting to test user interaction with an off the shelf product. The current process is to run through a manual script and record how long certain processes take to populate data, it may populate a datagrid, a tree, a list box, etc... It will also need to be able record how long it takes to generate a pdf report. We do not require extremely accurate time just to the nearest second or less than a second. I need to know if there is a simple Automated testing product that will handle the above criteria.

    Read the article

  • Creating a Web Service to automatically get information

    - by Sean P
    I want to create some sort of method of creating a web service that will run automatically and run DB queries and some API calls which will then store data that I can use/call without taking the processing or time penalty of doing it every time a user access my web service. Is this possible? If so, point me in the right direction on how to implement something like this Using vb.net and ASP.net Thanks in advance!!

    Read the article

  • Text input for multi-valued attribute

    - by Sean
    I need to create an input form that will allow a user to enter any number of values for a particular attribute. I've tried several approaches, all of which seem to have various levels of failure. The latest model bean looks something like: public class Product { private String name; private String[] tags; ...accessors... } The input fields look something like: <h:inputText id="name" value="#{product.name}"></h:inputText> <h:inputText id="tag0" value="#{product.tag[0]}"></h:inputText> My plan was to allow the user is to use javascript to add additional form fields as needed. This type of setup gives me a 'Target Unreachable' error. What am I missing? I am using JSF 1.1 on WebSphere 6.1

    Read the article

  • Drop duplicated axis label in Flex Chart

    - by Sean Chen
    Hi, All. I use LineChart in Flex with horizontal category axis and I need drop duplicated category label on the chart. The data I use are like that: {Product: "C1", Store: "S1", Profit: "1500}, {Product: "C2", Store: "S1", Profit: "1000}, {Product: "C3", Store: "S2", Profit: "800}, {Product: "C4", Store: "S2", Profit: "1200}, {Product: "C5", Store: "S3", Profit: "1800} Beacuse I set horizontalAxis.categoryField = "Store" , the chart show label "S1,S1,S2,S2,S3" on ths axes. However, both C1 and C2 data point group on the second "S1" category (as same as C3,C4 on second S2). If I accept group data point on the same x-poistion, is there any idea to drop duplicated label?

    Read the article

  • Non-Profit Volunteer Opportunities

    - by Sean
    I have seen questions on SO regarding volunteering for potential employers or volunteering to help out on open source projects. But what about putting your IT skills to use at traditional non-profit organizations as a volunteer? I would like to volunteer some time to a worthwhile cause in 2010, but am having a hard time finding organizations who may need IT help. Does anyone do this? Are there any websites out there to help one find organizations looking for such help? I would think some must have a need for free software development type work? I saw a bit on 'WeVolunteer' that publishes a database of volunteer opportunities (http://www.wetv.com/volunteer.html), but it seems to be more 'typical' volunteer opportunities (soup kitchens, walk-a-thons, etc).

    Read the article

  • Priority queue with dynamic item priorities.

    - by sean
    I need to implement a priority queue where the priority of an item in the queue can change and the queue adjusts itself so that items are always removed in the correct order. I have some ideas of how I could implement this but I'm sure this is quite a common data structure so I'm hoping I can use an implementation by someone smarter than me as a base. Can anyone tell me the name of this type of priority queue so I know what to search for or, even better, point me to an implementation?

    Read the article

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