Search Results

Search found 574 results on 23 pages for 'jeremy ramos'.

Page 18/23 | < Previous Page | 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Object mapping with LINQ and SubSonic

    - by Jeremy Seekamp
    I'm building a small project with SubSonic 3.0.0.3 ActiveRecord and I'm running into an issue I can't seem to get past. Here is the LINQ query: var result = from r in Release.All() let i = Install.All().Count(x => x.ReleaseId == r.Id) where r.ProductId == productId select new ReleaseInfo { NumberOfInstalls = i, Release = new Release { Id = r.Id, ProductId = r.ProductId, ReleaseNumber = r.ReleaseNumber, RevisionNumber = r.RevisionNumber, ReleaseDate = r.ReleaseDate, ReleasedBy = r.ReleasedBy } }; The ReleaseInfo object is a custom class and looks like this: public class ReleaseInfo { public Release Release { get; set; } public int NumberOfInstalls { get; set; } } Release and Install are classes generated by SubSonic. When I do a watch on result, the Release property is null. If I make this a simpler query and watch result, the value is not null. var result = from r in Release.All() let i = Install.All().Count(x => x.ReleaseId == r.Id) where r.ProductId == productId select new Release { Id = r.Id, ProductId = r.ProductId, ReleaseNumber = r.ReleaseNumber, RevisionNumber = r.RevisionNumber, ReleaseDate = r.ReleaseDate, ReleasedBy = r.ReleasedBy }; Is this an issue with my LINQ query or a limitation of SubSonic?

    Read the article

  • How do I stop cropping of a transformed (scaled) image in a grid (silverlight)

    - by Jeremy
    I have a grid with an image in it. Initially, the image is larger than the grid, so it gets cropped which is fine, but if I apply a scaling transform to causing the image to shrink, the portion that was initally cropped remains cropped, but I want it displayed now, because it would fit in the grid. I concidered putting my image in a canvas, but I want it centered vertically and horizontally, which is giving me trouble, so I switched to a grid.

    Read the article

  • Zend Framework Form Element Validators - validate a field even if not required

    - by Jeremy Hicks
    Is there a way to get a validator to fire even if the form element isn't required? I have a form where I want to validate the contents of a texbox (make sure not empty) if the value of another form element, which is a couple of radio buttons, has a specific value selected. Right now I'm doing this by overriding the isValid() function of my form class and it works great. However, I'd like to move this to either its on validator or use the Callback validator. Here's what I have so far, but it never seems to get called unless I change the field to setRequired(true) which I don't want to do at all times, only if the value of the other form element is set to a specific value. // In my form class's init function $budget = new Zend_Form_Element_Radio('budget'); $budget->setLabel('Budget') ->setRequired(true) ->setMultiOptions($options); $budgetAmount = new Zend_Form_Element_Text('budget_amount'); $budgetAmount->setLabel('Budget Amount') ->setRequired(false) ->addFilter('StringTrim') ->addValidator(new App_Validate_BudgetAmount()); //Here is my custom validator (incomplete) but just testing to see if it even gets called. class App_Validate_BudgetAmount extends Zend_Validate_Abstract { const STRING_EMPTY = 'stringEmpty'; protected $_messageTemplates = array( self::STRING_EMPTY => 'please provide a budget amount' ); public function isValid($value) { echo 'validating...'; var_dump($value); return true; } }

    Read the article

  • Running my web site in a 32-bit application pool on a 64-bit OS.

    - by Jeremy H
    Here is my setup: Dev: - Windows Server 2008 64-bit - Visual Studio 2008 - Solution with 3 class libraries, 1 web application Staging Web Server: - Windows Server 2008 R2 64-bit - IIS7.5 Integrated Application Pool with 32-bit Applications Enabled In Visual Studio I have set all 4 of my projects to compile to 'Any CPU' but when I run this web application on the web server with the 32-bit application pool it times out and crashes. When I run the application pool in 64-bit mode it works fine. The production web server requires me to run 32-bit application pool in 64-bit OS which is why I have this configured in this way on the staging web server. (I considered posting on ServerFault but the server part seems to be working fine. It is my code specifically that doesn't seem to want to run in 32-bit application pool which is why I am posting here.)

    Read the article

  • PHP - Nested Looping Trouble

    - by Jeremy A
    I have an HTML table that I need to populate with the values grabbed from a select statement. The table cols are populated by an array (0,1,2,3). Each of the results from the query will contain a row 'GATE' with a value of (0-3), but there will not be any predictability to those results. One query could pull 4 rows with 'GATE' values of 0,1,2,3, the next query could pull two rows with values of 1 & 2, or 1 & 3. I need to be able to populate this HTML table with values that correspond. So HTML COL 0 would have the TTL_NET_SALES of the db row which also has the GATE value of 0. <?php $gate = array(0,1,2,3); $gate_n = count($gate); /* Database = my_table.ID my_table.TT_NET_SALES my_table.GATE my_table.LOCKED */ $locked = "SELECT * FROM my_table WHERE locked = true"; $locked_n = count($locked); /* EXAMPLE RETURN Row 1: my_table['ID'] = 1 my_table['TTL_NET_SALES'] = 1000 my_table['GATE'] = 1; Row 2: my_table['ID'] = 2 my_table['TTL_NET_SALES'] = 1500 my_table['GATE'] = 3; */ print "<table border='1'>"; print "<tr><td>0</td><td>1</td><td>2</td><td>3</td>"; print "<tr>"; for ($i=0; $i<$locked_n; $i++) { for ($g=0; $g<$gate_n; $g++) { if (!is_null($locked['TTL_NET_SALES'][$i]) && $locked['GATE'][$i] == $gate[$g]) { print "<td>$".$locked['TTL_NET_SALES'][$i]."</td>"; } else { print "<td>-</td>"; } } } print "</tr>"; print "</table>"; /* What I want to see: <table border='1'> <tr> <td>0</td> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>-</td> <td>1000</td> <td>-</td> <td>1500</td> </tr> </table> */ ?>

    Read the article

  • Scalable Full Text Search With Per User Result Ordering

    - by jeremy
    What options exist for creating a scalable, full text search with results that need to be sorted on a per user basis? This is for PHP/MySQL (Symfony/Doctrine as well, if relevant). In our case, we have a database of workouts that have been performed by users. The workouts that the user has done before should appear at the top of the results. The more frequently they've done the workout, the higher it should appear in search matches. If it helps, you can assume we know the number of times a user has done a workout in advance. Possible Solutions Sphinx - Use Sphinx to implement full text search, do all the querying and sorting in MySQL. This seems promising (and there's a Symfony Plugin!) but I don't know much about it. Lucene - Use Lucene to perform full text search and put the users' completions into the query. As is suggested in this Stack Overflow thread. Alternatively, use Lucene to retrieve the results, then reorder them in PHP. However, both solutions seem clunky and potentially unscalable as a user may have completed hundreds of workouts. Mysql - No native full text support (InnoDB), so we'd have use LIKE or REGEX, which isn't scalable.

    Read the article

  • appengine_config.py middleware not hit

    - by jeremy
    using 1.3.4 - wsgi middleware is not being installed. i have appengine_config.py at the same level as app.yaml, with the following (for testing): """Configuration.""" raise Exception("hello") def webapp_add_wsgi_middleware(app): return app the exception is never raised. am i missing something?

    Read the article

  • how to fix protocol violation in c#

    - by Jeremy Styers
    I have a c# "client" and a Java "server". The java server has a wsdl it serves to the client. So far it works for c# to make a request for the server to perform a soap action. My server gets the soap request executes the method and tries to return the result back to the client. When I send the response to c# however, I get "The server committed a protocol violation. Section=ResponseStatusLine". I have spent all day trying to fix this and have come up with nothing that works. If I explain what i did, this post would be very long, so I'll keep it brief. i Googled for hours and everything tells me my "response line" is correct. I tried shutting down Skype, rearranging the response line, adding things, taking things away, etc, etc. All to no avail. This is for a class assignment so no, I can not use apis to help. I must do everything manually on the server side. That means parsing by hand, creating the soap response and the http response by hand. Just thought you'd like to know that before you say to use something that does it for me. I even tried making sure my server was sending the correct header by creating a java client that "mimicked" the c# one so I could see what the server returned. However, it's returning exactly what i told it to send. I tried telling my java client to do the same thing but to an actuall running c# service, to see what a real service returns, and it returned basically the same thing. To be safe, I copied it's response and tried sending it to the c# client and it still threw the error. Can anyone help? I've tried all i can think of, including adding the useUnsafeHeaderParsing to my app config. Nothing is working though. I send it exactly what a real service sends it and it yells at me. I send it what i want and it yells. I'm sending this: "200 OK HTTP/1.0\r\n" + "Content-Length: 201\r\n" + "Cache-Control: private\r\n" + "Content-Type: text/xml; charset=utf-8\r\n\r\n";

    Read the article

  • Starting python debugger automatically on error

    - by jeremy
    This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let's say an IndexError, python prints the line, location and quick description of the error and exits. Is it possible to automatically start pdb when an error is encountered? I am not against having an extra import statement at the top of the file, nor a few extra lines of code.

    Read the article

  • Sencha : how to pass parameter to php using Ext.data.HttpProxy?

    - by Lauraire Jérémy
    I have successfully completed this great tutorial : http://www.sencha.com/learn/ext-js-grids-with-php-and-sql/ I just can't use the baseParams field specified with the proxy... Here is my code that follows tutorial description : __ My Store : Communes.js ____ Ext.define('app.store.Communes', { extend: 'Ext.data.Store', id: 'communesstore', requires: ['app.model.Commune'], config: { model: 'app.model.Commune', departement:'var', // the proxy with POST method proxy: new Ext.data.HttpProxy({ url: 'app/php/communes.php', // File to connect to method: 'POST' }), // the parameter passed to the proxy baseParams:{ departement: "VAR" }, // the JSON parser reader: new Ext.data.JsonReader({ // we tell the datastore where to get his data from rootProperty: 'results' }, [ { name: 'IdCommune', type: 'integer' }, { name: 'NomCommune', type: 'string' } ]), autoLoad: true, sortInfo:{ field: 'IdCommune', direction: "ASC" } } }); _____ The php file : communes.php _____ <?php /** * CREATE THE CONNECTION */ mysql_connect("localhost", "root", "pwd") or die("Could not connect: " . mysql_error()); mysql_select_db("databasename"); /** * INITIATE THE POST */ $departement = 'null'; if ( isset($_POST['departement'])){ $departement = $_POST['departement']; // Get this from Ext } getListCommunes($departement); /** * */ function getListCommunes($departement) { [CODE HERE WORK FINE : just a connection and query but $departement is NULL] } ?> There is no parameter passed as POST method... Any idea?

    Read the article

  • How to limit SMTP delivery to hourly batches

    - by Jeremy W
    In an effort to keep us from being labeled spammers by major ISPs (in addition to SPF records, privacy policies, CANSPAM compliance and the like) - I wanted to limit the amount of mail we send out an hour. Is this possible in W2K3 SMTP server? I was looking at outbound connection properties in the SMTP virtual server config screens...It's just not that clear if tinkering with those settings are going to do what I want. In a nutshell, I'd love mail being sent by this server to queue up and send for example, 5,000 messages every 10 minutes or so. Is this possible?

    Read the article

  • How to implement a log window in a web browser?

    - by Jeremy Friesner
    Hi all, I'm interested in adding an HTML/web-browser based "log window" to my net-enabled device. Specifically, my device has a customized web server and an event log, and I'd like to be able to leave a web browser window open to e.g. http://my.devices.ip.address/system_log and have events show up as text in the web browser window as they happen. People could then use this as a quick way to monitor what the system is doing, without needing run any special software. My question is, what is the best way to implement this? I've tried the obvious approach -- just have my device's embedded web server hold the HTTP/TCP connection open indefinitely, and write the necessary text to the TCP socket when an event occurs -- but the problem with that is that most web browsers (e.g. Safari) don't display the web page until the server has closed the TCP connection has been closed, and so the result is that the log data never appears in the web browser, it just acts as if the page is taking forever to load. Is there some trick to make this work? I could implement it as a Java applet, but I'd much prefer something more lightweight/simple, either using only HTML or possibly HTML+JavaScript. Also I'd like to avoid having the web browser 'poll' the server, since that would either introduce too much latency (if the reload delay was large) or put load on the system (if the delay was small)

    Read the article

  • force refresh of part of page in browser

    - by Jeremy
    I have the following html: <ul class="scr"> <li class="scr"> <input type="checkbox" class="chkscr"/> <h3>Item Name</h3> <div class="scr">Contents</div> </li> .... </ul> And the following jQuery: //Set initial state of each scr section $('.chkscr input, input.chkscr').each(function() { chkSCR_Click($(this)); }); //Setup click event $('.chkscr input, input.chkscr').click(function() { chkSCR_Click($(this)); }); //Toggle corresponding scr section for the checkbox function chkSCR_Click(ctl) { if (ctl.attr('checked')) { ctl.parents('li.scr').find('div.scr').stop().show(); } else { ctl.parents('li.scr').find('div.scr').stop().hide(); } } My issue is that when I toggle the last li element to display, the h3 element contents disapear, until I click somewhere else on the page, or scroll the page up and down to cause the browse to repaint that portion of the window. I don't get this behavior in Opera for example, and even in IE the behavior only happens on the last li element, so I'm pretty sure it's an IE quirk and not my code. Is there any workaround I can do through jquery/javascript to force it to repaint the h3 element?

    Read the article

  • Recommendations for IPC between parent and child processes in .NET?

    - by Jeremy
    My .NET program needs to run an algorithm that makes heavy use of 3rd party libraries (32-bit), most of which are unmanaged code. I want to drive the CPU as hard as I can, so the code runs several threads in parallel to divide up the work. I find that running all these threads simultaneously results in temporary memory spikes, causing the process' virtual memory size to approach the 2 GB limit. This memory is released back pretty quickly, but occasionally if enough threads enter the wrong sections of code at once, the process crosses the "red line" and either the unmanaged code or the .NET code encounters an out of memory error. I can throttle back the number of threads but then my CPU usage is not as high as I would like. I am thinking of creating worker processes rather than worker threads to help avoid the out of memory errors, since doing so would give each thread of execution its own 2 GB of virtual address space (my box has lots of RAM). I am wondering what are the best/easiest methods to communicate the input and output between the processes in .NET? The file system is an obvious choice. I am used to shared memory, named pipes, and such from my UNIX background. Is there a Windows or .NET specific mechanism I should use?

    Read the article

  • RegEx replace query to pick out wiki syntax

    - by Jeremy Thake
    I've got a string of HTML that I need to grab the "[Title|http://www.test.com]" pattern out of e.g. "dafasdfasdf, adfasd. [Test|http://www.test.com/] adf ddasfasdf [SDAF|http://www.madee.com/] assg ad" I need to replace "[Title|http://www.test.com]" this with "Title". What is the best away to approach this? I was getting close with: string test = "dafasdfasdf adfasd [Test|http://www.test.com/] adf ddasfasdf [SDAF|http://www.madee.com/] assg ad "; string p18 = @"(\[.*?|.*?\])"; MatchCollection mc18 = Regex.Matches(test, p18, RegexOptions.Singleline | RegexOptions.IgnoreCase); foreach (Match m in mc18) { string value = m.Groups[1].Value; string fulltag = value.Substring(value.IndexOf("["), value.Length - value.IndexOf("[")); Console.WriteLine("text=" + fulltag); } There must be a cleaner way of getting the two values out e.g. the "Title" bit and the url itself. Any suggestions?

    Read the article

  • How to optimize class for viewstate

    - by Jeremy
    If I have an object I need to store in viewstate, what kinds of things can I do to optimize the size it takes to store the object? Obviously storing the least amount of data will take less space, but aside from that, are there ways to architect the class, properties, attrbutes etc, that will effect how large the serialized output is?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23  | Next Page >