Search Results

Search found 976 results on 40 pages for 'josh p'.

Page 24/40 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • How do I call exec in psake to an executable with a variable path?

    - by Josh Kodroff
    I can't seem to call this executable correctly in my psake deploy script. If I do this: exec { "$ArchiverOutputDir\NServiceBus.Host.exe /install" } It simply outputs this (and is clearly not calling the executable - just outputting the value of that expression): c:\ReloDotNet2_ServiceEndpoints\Archiver\NServiceBus.Host.exe /install But if I do this: exec { c:\ReloDotNet2_ServiceEndpoints\Archiver\NServiceBus.Host.exe /install } I get the expected output from the executable. How do I correctly call an executable with a variable in the path to the executable in psake? If this is actually a PowerShell issue, please feel free to correct the question to reflect that insight. I

    Read the article

  • replace html tags within xml content with wordML formatting tags

    - by Josh
    I am taking an XML document and creating a word document using XSLT and OpenXML. The problem is that when I create the word document, all of the HTML that is within the CDATA tags are not escaped and look like this: GET /recipe/recipe/cat.php/&gt;&quot;&gt;&lt;script&gt;alert(document.domain)&lt;/script&gt; I have tried defining "cdata-section-elements" in my xsl:output; however I receive an error stating that p tag doesn't match the w:t tag.(the p tag is apart of the CDATA HTML). Here is what one of my xsl templates looks like: <xsl:template match="SECTION"> <w:p w:rsidR="00272D24" w:rsidRPr="00272D24" w:rsidRDefault="00272D24"> <w:pPr> <w:rPr> <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/> </w:rPr> </w:pPr> </xsl:template> <w:r w:rsidRPr="00272D24"> <w:rPr> <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/> </w:rPr> <w:t> <xsl:value-of select="INFORMATION"/> </w:t> </w:r> </w:p> Here is what the xml looks like: <INFORMATION> <![CDATA[ <P> line 1 of information <P> line 2 of information.......]]> </INFORMATION> Here is what the word output looks like: (white space and poor formatting) DIAGNOSIS: <P> line 1 of information. <P> line 2 of information I need to be able to somehow render the HTML or strip out the HTML. If I strip out the HTML then I would have to search for every possible HTML element, which is madness! Any help at all would be appreciated... Thanks.

    Read the article

  • Dropdownlist post in ASP.NET MVC3 and Entity Framework Model

    - by Josh Blade
    I have 3 tables: RateProfile RateProfileID ProfileName Rate RateID RateProfileID PanelID Other stuff to update Panel PanelID PanelName I have models for each of these. I have an edit page using the RateProfile model. I display the information for RateProfile and also all of the Rates associated with it. This works fine and I can update it fine. However, I also added a dropdown so that I can filter Rates by PanelID. I need it to post back on change so that it can display the filtered rates. I'm using @Html.DropDownList("PanelID", (SelectList)ViewData["PanelDropDown"], new { onchange = "$('#RateForm').submit()" }) for my dropdownlist. Whenever it posts back to my HttpPost Edit method though, it seems to be missing all information about the Rates navigation property. It's weird because I thought it would do exactly what the input/submit button that I have in the form does (which actually passes the entire model back to my HttpPost Edit action and does what I want it to do). The panelID is properly being passed to my HttpPost Edit method and on to the next view, but when I try to query the Model.Rates navigation property is null (only when the post comes from the dropdown. Everything works fine when the post comes from my submit input). Get Edit: public ActionResult Edit(int id, int panelID = 1) { RateProfile rateprofile = db.RateProfiles.Single(r => r.RateProfileID == id); var panels = db.Panels; ViewData["PanelDropDown"] = new SelectList(panels, "PanelID", "PanelName", panelID); ViewBag.PanelID = panelID; return View(rateprofile); } HttpPost Edit: [HttpPost] public ActionResult Edit(RateProfile rateprofile, int panelID) { var panels = db.Panels; ViewData["PanelDropDown"] = new SelectList(panels, "PanelID", "PanelName", panelID); ViewBag.PanelID = panelID; if (ModelState.IsValid) { db.Entry(rateprofile).State = EntityState.Modified; foreach (Rate dimerate in rateprofile.Rates) { db.Entry(dimerate).State = EntityState.Modified; } db.SaveChanges(); return View(rateprofile); } return View(rateprofile); } View: @model PDR.Models.RateProfile @using (Html.BeginForm(null,null,FormMethod.Post, new {id="RateForm"})) { <div> @Html.Label("Panel") @Html.DropDownList("PanelID", (SelectList)ViewData["PanelDropDown"], new { onchange = "$('#RateForm').submit()" }) </div> @{var rates= Model.Rates.Where(a => a.PanelID == ViewBag.PanelID).OrderBy(a => a.minCount).ToList();} @for (int i = 0; i < rates.Count; i++) { <tr> <td> @Html.HiddenFor(modelItem => rates[i].RateProfileID) @Html.HiddenFor(modelItem => rates[i].RateID) @Html.HiddenFor(modelItem => rates[i].PanelID) @Html.EditorFor(modelItem => rates[i].minCount) @Html.ValidationMessageFor(model => rates[i].minCount) </td> <td> @Html.EditorFor(modelItem => rates[i].maxCount) @Html.ValidationMessageFor(model => rates[i].maxCount) </td> <td> @Html.EditorFor(modelItem => rates[i].Amount) @Html.ValidationMessageFor(model => rates[i].Amount) </td> </tr> } <input type="submit" value="Save" /> } To summarize my problem, the below query in my view only works when the post comes from the submit button and not when it comes from my dropdownlist. @{var rates= Model.Rates.Where(a => a.PanelID == ViewBag.PanelID).OrderBy(a => a.minCount).ToList();}

    Read the article

  • Best way to encrypt certain fiels in SQL Server 2008?

    - by Josh
    I'm writing a .net web app that will read and write information to a SQL 2008 backend database. Some of this information will be highly confidential in nature so I want to encrypt certain data elements. I dont want to use TDE or any full-database encryption for performance reasons. My main concern is protecting this sensitive data as a last resort against a SQL injection or even a database server compromise. My question is what is the best way to do this to preserve performance? Is it faster to use the SQL2008 encryption functions such as EncryptByKey, or would it be faster to encrypt and decrypt the data in the .NET web app itself using a symmetric key stored in the secure web.config and store the encrypted values in the DB?

    Read the article

  • Authentication for SaaS

    - by josh
    What would be recommended as an authentication solution for a Software-as-a-service product? Specifically, my product would have clients that would typically have low information technology skills, potentially not even having an IT department within their organization. I would still like to have my application authenticate against their internal directory service (eDirectory, Active Directory, etc.). I don't want them, however, to have to open/forward ports (for instance, opening up port 636 so I can do LDAPS binds directly to their directory service). One idea I had was to have an application installed on a server within their organization's network that would backconnect to my service. This would be a persistant socket. When I need to authenticate a user, I send the credentials via the socket (encrypted) - the application then performs a bind/whatever to authenticate against the directory service and replies with OK/FAIL. What would you suggest? My goal here is to essentially have the client install an application within their network, with very little configuration or intervention.

    Read the article

  • JDBC with MySQL

    - by Josh K
    I'm working on getting my database to talk to my Java programs. What do I need to get started? Having already read through (and been thoroughly confused, something that does not happen often) with some other turorials I figured I'd best ask here. How do I import a jar file from the local directory? Can someone give me a quick and dirty sample program using the JDBC?

    Read the article

  • How to add a Favicon to RSS feeds using Wordpress?

    - by Josh
    A friend of mine wants to make her favicon visible when people user Google Reader to view the RSS of her Wordpress blog. Anyone have a quick tip on how / where to make that reference? Her current web host is Bluehost, and apparently that is the "icon" people see when using Google Reader. Any suggestions would be helpful.

    Read the article

  • Update count every second causing massive memory problems

    - by Josh
    Just on my local machine, trying the run the following script causes my computer to crash... What am I doing wrong? (function($) { var count = '6824756980'; while (count > 0) { setInterval(function() { $('#showcount').html(Math.floor(count-1)); count--; }, 1000 ); } })(jQuery); All I need to do is subtract one from the var "count" and update/display it's value every second.

    Read the article

  • Setting xsl:value-of into an href attribute and the text field of a link in an XSLT

    - by Josh
    I am trying to set an a href that is both a link to and has the text for a link through an XSLT transformation. Here's what it looks like so far. <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="actionUrl"/> </xsl:attribute> <xsl:text><xsl:value-of select="actionUrl"/></xsl:text> </xsl:element> The problem is that it says "xsl:value-of cannot be a child of the xsl:text element". Any ideas?

    Read the article

  • Null file when uploading via MVC

    - by Josh
    I have the following form on an .NET MVC View: <form method="post" enctype="multipart/form-data" action="/Video/UploadDocument"> <input type="file" id="document1" name="document1"/> <input type="submit" value="Save"/> </form> And the controller has the following signature that gets called: public ActionResult UploadDocument(HttpPostedFileBase file) { return View(); } When I break inside the UploadDocument method, the parameter 'file' is null. I've selected a valid document on my desktop and know it contains text. What am I missing to get this file upload working?

    Read the article

  • jQuery addClass() not running before jQuery.ajax()

    - by Josh
    I'm trying to have a button that onclick will apply a class loading (sets cursor to "wait") to the body, before making a series of ajax requests. Code is: $('#addSelected').click(function(){ $('body').addClass('loading'); var products = $(':checkbox[id^=add_]:checked'); products.each(function(){ var prodID = $(this).attr('id').replace('add_', ''); var qty = $('#qty_' + prodID).val(); if($('#prep_' + prodID).val()) { prodID += ':' + $('#prep_' + prodID).val(); } // Have to use .ajax rather than .get so we can use async:false, otherwise // product adds happen in parallel, causing data to be lost. $.ajax({ url: '<?=base_url()?>basket/update/' + prodID + '/' + qty, async: false, beforeSend: function(){ $('body').addClass('loading'); } }); }); }); I've tried doing $('body').addClass('loading'); both before the requests, and as a beforeSend callback, but there is no difference. In firebug I can see that body doesn't get the loading class until after the requests are complete. Any ideas?

    Read the article

  • SyntaxError: Parse Error only happens in safari

    - by Josh Crowder
    Im getting SyntaxError: Parse Error, only on safari. Here is the code in question. <script type="text/javascript"> // I am using transloadit a jquery plugin. which works on every other page and is loading fine on safari by the looks of it. The errors is on line 44 which is export: { Can anyone see anything wrong with that page?

    Read the article

  • SQL query for select distinct with most recent timestamp first

    - by Josh
    I have a mysql table with three columns: username, location, timestamp. This is basically a log of user activity of what location they are in and the time that they were there. What I want to do is select a distinct username+location where only the most recent item (by timestamp) is provided. So say the table consists of: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00 tom roomtwo 2011-3-25 08:30:00 pam roomone 3011-3-25 07:20:23 I would want only these to be selected: tom roomone 2011-3-25 10:45:00 tom roomtwo 2011-3-25 09:00:00

    Read the article

  • Issues Deploying ROOT Context in Tomcat6

    - by Josh K
    I'm working on getting an application deployed to the ROOT ("/") context in my Tomcat 6 instance. Here's what has been done: Defined another virtual host (domain.com) Created the respective folder (/etc/tomcat6/Catalina/domain.com) Set it to auto deploy WAR's Set appBase to CATALINA_BASE/domainapps and created respective folder Copied manager.xml from localhost to domain.com. Now I'm trying to deploy into the ROOT context by uploading a ROOT.war to CATALINA_BASE/domainapps. This isn't working. I don't get any exceptions thrown, but the stock ROOT page ("It works !") stays up. I have successfully deployed it into another context (by uploading domainapp.war and viewing at /domainapp), but not ROOT. Re-reading the Virtual Host setup it makes reference to CATALINA_HOME and CATALINA_BASE. My CATALINA_HOME is at /usr/share/tomcat6/domainapp while CATALINA_BASE is /var/lib/tomcat6. Which should I be using for what? Currently haven't touched CATALINA_HOME but will try messing with a few things there. A better question might be what is the generally accepted flow taken to setup a new Tomcat instance and deploy an application to the root context.

    Read the article

  • PDF to PNG Processor - Paperclip

    - by Josh Crowder
    I am trying to develop a system in which a user can upload a slideshow (pdf) and it'll export each slide as a png. After some digging around I came across a post on here that suggested using a processor. I've had a go, but I cant get the command to run, if it is running then I don't know what is happening because no errors are being shown. Any help would be appreciated! module Paperclip class Slides < Processor def initialize(file, options = {}, attachment = nill) super @file = file @instance = options[:instance] @current_format = File.extname(@file.path) @basename = File.basename(@file.path, @current_format) end def make dst = Tempfile.new( [ @basename, @format].compact.join(".")) dst.binmode command = <<-end_command -size 640x300 #{ File.expand_path(dst.path) } tester.png end_command begin success = Paperclip.run("convert", command.gsub(/\s+/, " "))) rescue PaperclipCommandLineError raise PaperclipError, "There was an error processing the thumbnail for #{@basename}" end end end end I think my problem is with the convert command... When I run that command by hand, it works but it doesn't give the details of each slide it just executes it. What I need to happen is once its made all the slides, pass back the data to a new model... or I know where all the slides are, but once I get to that point I'm not sure what todo.

    Read the article

  • dynamiclly schedule a lead sales agent

    - by Josh
    I have a website that I'm trying to migrate from classic asp to asp.net. It had a lead schedule, where each sales agent would be featured for the current day, or part of the day.The next day a new agent would be scheduled. It was driven off a database table that had a row for each day in it. So to figure out if a sales agent would show on a day, it was easy, just find today's date in the table. Problem was it ran out rows, and you had to run a script to update the lead days 6 months at a time. Plus if there was ever any change to the schedule, you had to delete all the rows and re-run the script. So I'm trying to code it where sql server figures that out for me, and no script has to be ran. I have a table like so CREATE TABLE [dbo].[LeadSchedule]( [leadid] [int] IDENTITY(1,1) NOT NULL, [userid] [int] NOT NULL, [sunday] [bit] NOT NULL, [monday] [bit] NOT NULL, [tuesday] [bit] NOT NULL, [wednesday] [bit] NOT NULL, [thursday] [bit] NOT NULL, [friday] [bit] NOT NULL, [saturday] [bit] NOT NULL, [StartDate] [smalldatetime] NULL, [EndDate] [smalldatetime] NULL, [StartTime] [time](0) NULL, [EndTime] [time](0) NULL, [order] [int] NULL, So the user can schedule a sales agent depending on their work schedule. Also if they wanted to they could split certain days, or sales agents by time, So from Midnight to 4 it was one agent, from 4-midnight it was another. So far I've tried using a numbers table, row numbers, goofy date math, and I'm at a loss. Any suggestions on how to handle this purely from sql code? If it helps, the table should always be small, like less than 20 never over 100. update After a few hours all I've managed to come up with is the below. It doesn't handle filling in days not available or times, just rotates through all the sales agents with leadTable as ( select leadid,userid,[order],StartDate, case DATEPART(dw,getdate()) when 1 then sunday when 2 then monday when 3 then tuesday when 4 then wednesday when 5 then thursday when 6 then friday when 7 then saturday end as DayAvailable , ROW_NUMBER() OVER (ORDER BY [order] ASC) AS ROWID from LeadSchedule where GETDATE()>=StartDate and (CONVERT(time(0),GETDATE())>= StartTime or StartTime is null) and (CONVERT(time(0),GETDATE())<= EndTime or EndTime is null) ) select userid, DATEADD(d,(number+ROWID-2)*totalUsers,startdate ) leadday from (select *, (select COUNT(1) from leadTable) totalUsers from leadTable inner join Numbers on 1=1 where DayAvailable =1 ) tb1 order by leadday asc

    Read the article

  • Apache Axis2 tried books

    - by josh
    I am looking to get my hands wet in Java Web Services. Apache CXF and Axis2 seem to be in demand a lot. I googled a bit for finding a good Axis2 book that has lot of working examples. some books like Quick Start Apache Axis 2 seem to have bad reviews on Amazon and titles like Web Services with Apache CXF and Axis2 seem to lack working examples. I want to get opinion from people who currently work with Axis2 and have read a book or two on the subject. Which is a good book for an Axis2 n00b.

    Read the article

  • Help making this code run faster for spoj.

    - by Josh Meredith
    I've been doing a few of the challenges on the Sphere Online Judge, but I can't seem to get the second problem (the prime generator) to run within the time limit. Does anyone have any tips for increasing the speed of the following code? #include <stdio.h> #include <math.h> int is_prime(int n); void make_sieve(); void fast_prime(int n); int primes[16000]; int main() { int nlines; int m, n; make_sieve(); scanf("%d", &nlines); for (; nlines >= 1; nlines--) { scanf("%d %d", &m, &n); if (!(m % 2)) { m++; } for ( ; m < n; m+=2) { fast_prime(m); } printf("\n"); } return 0; } /* Prints a number if it's prime. */ inline void fast_prime(int n) { int j; for (int i = 0; ((j = primes[i]) > -1); i++) { if (!(n % j)) { return; } } printf("%d\n", n); } /* Create an array listing prime numbers. */ void make_sieve() { int j = 0; for (int i = 0; i < 16000; i++) { primes[i] = -1; } for (int i = 2; i < 32000; i++) { if (i % 2) { if (is_prime(i)) { primes[j] = i; j++; } } } return; } /* Test if a number is prime. Return 1 if prime. Return 0 if not. */ int is_prime(int n) { int rootofn; rootofn = sqrt(n); if ((n <= 2) || (n == 3) || (n == 5) || (n == 7)) { return 1; } if (((n % 2) == 0) || ((n % 3) == 0) || ((n % 5) == 0) || ((n % 7) == 0)) { return 0; } for (int i = 11; i < rootofn; i += 2) { if ((n % i) == 0) { return 0; } } return 1; }

    Read the article

  • How to add the ImageMagick install to my path on Ubuntu

    - by Josh
    I have had been on a roller coaster trying to get ImageMagick to work on my Ubuntu slice. I Whenever I try to upload an image I get the following error: /tmp/stream.1170.0 is not recognized by the 'identify' command. If I type 'which identify' I get: /usr/local/bin/identify If I run '/usr/local/bin/identify' or just 'identify', I get the following error: /usr/local/bin/identify: error while loading shared libraries: libMagickCore.so.3: cannot open shared object file: No such file or directory If I run '/usr/bin/identify', ImageMagick is run just fine. How can I set my path to where when Paperclip runs the identify command, it points to /usr/bin/identify? Thanks. p.s. I have tried adding this to paperclip.rb: Paperclip.options[:command_path] = '/usr/bin' and Paperclip.options[:command_path] = '/usr/local/bin'

    Read the article

  • Why is changing displays slow?

    - by Josh Bronson
    I've had many laptops over the course of many years, and while many things have sped up, one thing remains as slow today as it was years ago: (dis)connecting an external display. What's taking it so long to detect the new display and update the pixel buffers? I use Macs primarily, but I think this is equally slow on other platforms.

    Read the article

  • Why is win32com so much slower than xlrd?

    - by Josh
    I have the same code, written using win32com and xlrd. xlrd preforms the algorithm in less than a second, while win32com takes minutes. Here is the win32com: def makeDict(ws): """makes dict with key as header name, value as tuple of column begin and column end (inclusive)""" wsHeaders = {} # key is header name, value is column begin and end inclusive for cnum in xrange(9, find_last_col(ws)): if ws.Cells(7, cnum).Value: wsHeaders[str(ws.Cells(7, cnum).Value)] = (cnum, find_last_col(ws)) for cend in xrange(cnum + 1, find_last_col(ws)): #finds end column if ws.Cells(7, cend).Value: wsHeaders[str(ws.Cells(7, cnum).Value)] = (cnum, cend - 1) break return wsHeaders And the xlrd def makeDict(ws): """makes dict with key as header name, value as tuple of column begin and column end (inclusive)""" wsHeaders = {} # key is header name, value is column begin and end inclusive for cnum in xrange(8, ws.ncols): if ws.cell_value(6, cnum): wsHeaders[str(ws.cell_value(6, cnum))] = (cnum, ws.ncols) for cend in xrange(cnum + 1, ws.ncols):#finds end column if ws.cell_value(6, cend): wsHeaders[str(ws.cell_value(6, cnum))] = (cnum, cend - 1) break return wsHeaders

    Read the article

  • Turning a JSON list into a POJO

    - by Josh L
    I'm having trouble getting this bit of JSON into a POJO. I'm using Jackson configured like this: protected ThreadLocal<ObjectMapper> jparser = new ThreadLocal<ObjectMapper>(); public void receive(Object object) { try { if (object instanceof String && ((String)object).length() != 0) { ObjectDefinition t = null ; if (parserChoice==0) { if (jparser.get()==null) { jparser.set(new ObjectMapper()); } t = jparser.get().readValue((String)object, ObjectDefinition.class); } Object key = t.getKey(); if (key == null) return; transaction.put(key,t); } } catch (Exception e) { e.printStackTrace(); } } Here's the JSON that needs to be turned into a POJO: { "id":"exampleID1", "entities":{ "tags":[ { "text":"textexample1", "indices":[ 2, 14 ] }, { "text":"textexample2", "indices":[ 31, 36 ] }, { "text":"textexample3", "indices":[ 37, 43 ] } ] } And lastly, here's what I currently have for the java class: protected Entities entities; @JsonIgnoreProperties(ignoreUnknown = true) protected class Entities { public Entities() {} protected Tags tags; @JsonIgnoreProperties(ignoreUnknown = true) protected class Tags { public Tags() {} protected String text; public String getText() { return text; } public void setText(String text) { this.text = text; } }; public Tags getTags() { return tags; } public void setTags(Tags tags) { this.tags = tags; } }; //Getters & Setters ... I've been able to translate the more simple objects into a POJO, but the list has me stumped. Any help is appreciated. Thanks!

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >