Search Results

Search found 2013 results on 81 pages for 'matt lewis'.

Page 64/81 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • Remove file from dependency jar using maven

    - by Matt Campbell
    I am trying to remove a file from a dependency jar that I am including in my war file in maven. I am deploying the war to JBoss 5.1 and the jar in question contains a persistence.xml file that I don't want. Here's what is going on: my-webapp.war | `-- WEB-INF | `-- lib | `-- dependency.jar | `-- META-INF | `-- persistence.xml When I am building my war, I want to remove persistence.xml Any one have any idea if this can be done easily?

    Read the article

  • Two-key encryption/decryption?

    - by Matt
    I'm looking to store some fairly sensitive data using PHP and MySQL and will be using some form of reversible encryption to do so since I need to get the data back out in plain text for it to be of any use. I'll be deriving the encryption key from the users' username/password combination but I'm stumped for what to do in the (inevitable) event of a password being forgotten. I realise that the purpose of encryption is that it can only be undone using the correct key but this must have been addressed before.. I'm trying to get my head around whether or not public key cryptography would apply to the problem but all I can think of is that the private key will still need to be correct to decrypt the data.. Any ideas?

    Read the article

  • Creating PHP strings using other variables...works manually, can't figure out how automatically

    - by Matt
    Hello, I'm trying to get a variable to be formed automatically using data pulled from a mysql database. I know the data is being pulled from the database in some form resembling its original form, but that data does not act the same as data that is manually typed and assigned to a string. For example, if a cell in a mysql table says... I said "goodbye" before I left. She also said "goodbye." ...and I manually copy/paste it and add the necessary escapes... $string1 = " I said \"goodbye\" before I left. She also said \"goodbye.\" "; ...that does not equal... $string1 = $mysqlResultArray['specificCellWithQuoteShownAbove'] Interestingly, if I echo both versions of $string1 and view the output, they appear to be exactly the same. But they do not function the same when put through various functions I've created. The functions only work if I do the manual copy/paste method--which is not what I want, obviously. I'm not sure if it has to do with the line breaks or the escapes--or some combination of the two. But while both strings are superficially the same, they are apparently functionally different and I don't know why. So how can I create $string1 without manually copy/pasting the contents from the mysql entry and instead querying for the data and assigning it to $string1 in such a way that it's exactly functionally equivalent as the manual copy/pasted string?

    Read the article

  • How should I get the value contained in a particular field of a Drupal 7 custom node?

    - by Matt V.
    What is the "proper" way to get the value stored in a particular field within a custom Drupal node? I've created a custom module, with a custom node, with a custom URL field. The following works: $result = db_query("SELECT nid FROM {node} WHERE title = :title AND type = :type", array( ':title' => $title, ':type' => 'custom', ))->fetchField(); $node = node_load($result); $url = $node->url['und']['0']['value']; ...but is there a better way, maybe using the new Field API functions?

    Read the article

  • Classes within classes in PHP

    - by Matt
    Can you do this in PHP? I've heard conflicting opinions: Something like: Class bar { function a_function () { echo "hi!"; } } Class foo { public $bar; function __construct() { $this->bar = new bar(); } } $x = new foo(); $x->bar->a_function(); Will this echo "hi!" or not?

    Read the article

  • Deploy SMO application to workstation without SQL Server 2008 installed

    - by Matt
    I am trying to deploy an application that uses SMO on a workstation without SQL Server installed on it. The instance the app is connecting to is SQL Server 2008. The application is failing with: Could not load file or assembly 'Microsoft.SqlServer.Replication, Version 10.0.0.0, Culture=neutral, PublicKeyToken=89845cdc8080cc91' or one of its dependencies. An attempt was made to load a program with an incorrect format. The assembly in question is in the same path as my application as well as system32. I am running this on a Windows 7 64 bit box. I have run SQL Native Client, CLR, and SMO MSIs from the 2008 SMO redist download page. This app worked fine when connecting to SQL Server 2005. What gives?

    Read the article

  • Jquery get array details

    - by Matt
    I'm having trouble getting a response back from a Jquery ajax call... (It's a script to authenticate a user, and needs to return their name and user ID. My understanding was that I could encode it as JSON and get the data in the format below. It is returning an error of "undefined" for the alert(). The javascript $.ajax({ type: "POST", url: "myURL.php", data: {username: username, password: password}, success: function(results) { //THIS IS WHERE THE PROBLEM IS alert('Hi '+results.name); //Should be "Hi Basil Fawlty" } }); The PHP (myURL.php) //This comes from a SQL call that returns the following name json_encode(array( 'id'=>1, 'name'=>'Basil Fawlty' )); Any help or ideas on where I am going wrong would be greatly appreciated! Thanks.

    Read the article

  • Code won't exit foreach block

    - by Matt
    I've got the following C# code segment that takes a list, finds objects that are ready to update, then shoves them into a temp list, deletes from the main list, and then goes on its merry way. My issue is that the foreach block, which cycles through my main list, won't exit. TempLog.Clear(); //Ensure TempLog is empty foreach (CLogger ready in PlayerLog) { if (ready.UpdateReady == true) // Record is ready to be updated in database { TempLog.Add(ready); // Add record to templog PlayerLog.Remove(ready); // Remove from playerlog } } <---- Never reaches this point if (TempLog.Count > 0) // Just check that templog isn't empty { new Thread(Update).Start(); // Run update code } I've put heaps of debugging in, and I can watch PlayerLog start at 1, TempLog at 0, then it enters the foreach loop, picks up that the record UpdateReady flag is on, TempLog goes to 1, PlayerLog goes to 0, then it just stops.. No errors, just stops.. Thanks for the help :)

    Read the article

  • What TypeScript pattern can I use to enforce that a function gets a property?

    - by Matt York
    In JavaScript I can do this: function f() {} f.prop = "property"; I want this in TypeScript, but with type checking. What TypeScript pattern can I use to enforce that a function gets a property? Could I use an interface? interface functionWithProperty { (): any; prop: string; } This seems to be a valid interface in TypeScript, but how do I implement this interface such that the TypeScript compiler checks that prop is set? I saw this example: var f : functionWithProperty = (() => { var _f : any = function () { }; _f.prop = "blah"; return _f; }()); But this doesn't work because I can remove _f.prop = "blah"; and everything will still compile. I need to enforce that prop is set.

    Read the article

  • Sorting a List based on an ArrayList within a custom Object

    - by Matt Weldon
    I am using a list to keep track of a number of custom Row objects as follows: Public Rows As List(Of Row)() Row has 2 properties, Key (a String) and Cells (an ArrayList). I need to be able to sort each Row within Rows based on a developer defined index of the Cells ArrayList. So for example based on the following Rows Row1.Cells = ("b", "12") Row2.Cells = ("a", "23") Rows.Sort(0) would result in Row2 being first in the Rows list. What would be the best way of going about implementing this? Thanks

    Read the article

  • Can computer clusters be used for general everyday applications?

    - by Matt Pascoe
    Does anyone know how a computer cluster can be used for everyday applications, like for example video games? I would like to build a computer cluster that can run applications over the cluster that were not specifically designed for computer clusters and still see the performance increase. One use would be for video games, but I would also like to utilize the increased computing power for running a large network of virtualized machines.

    Read the article

  • Getting up to speed on modern architecture

    - by Matt Thrower
    Hi, I don't have any formal qualifications in computer science, rather I taught myself classic ASP back in the days of the dotcom boom and managed to get myself a job and my career developed from there. I was a confident and, I think, pretty good programmer in ASP 3 but as others have observed one of the problems with classic ASP was that it did a very good job of hiding the nitty-gritty of http so you could become quite competent as a programmer on the basis of relatively poor understanding of the technology you were working with. When I changed on to .NET at first I treated it like classic ASP, developing stand-alone applications as individual websites simply because I didn't know any better at the time. I moved jobs at this point and spent the next several years working on a single site whose architecture relied heavily on custom objects: in other words I gained a lot of experience working with .NET as a middle-tier development tool using a quite old-fashioned approach to OO design along the lines of the classic "car" class example that's so often used to teach OO. Breaking down programs into blocks of functionality and basing your classes and methods around that. Although we worked under an Agile approach to manage the work the whole setup was classic client/server stuff. That suited me and I gradually got to grips with .NET and started using it far more in the manner that it should be, and I began to see the power inherent in the technology and precisely why it was so much better than good old ASP 3. In my latest job I have found myself suddenly dropped in at the deep end with two quite young, skilled and very cutting-edge programmers. They've built a site architecture which is modelling along a lot of stuff which is new to me and which, in truth I'm having a lot of trouble understanding. The application is built on a cloud computing model with multi-tenancy and the architecture is all loosely coupled using a lot of interfaces, factories and the like. They use nHibernate a lot too. Shortly after I joined, both these guys left and I'm now supposedly the senior developer on a system whose technology and architecture I don't really understand and I have no-one to ask questions of. Except you, the internet. Frankly I feel like I've been pitched in at the deep end and I'm sinking. I'm not sure if this is because I lack the educational background to understand this stuff, if I'm simply not mathematically minded enough for modern computing (my maths was never great - my approach to design is often to simply debug until it works, then refactor until it looks neat), or whether I've simply been presented with too much of too radical a nature at once. But the only way to find out which it is is to try and learn it. So can anyone suggest some good places to start? Good books, tutorials or blogs? I've found a lot of internet material simply presupposes a level of understanding that I just don't have. Your advice is much appreciated. Help a middle-aged, stuck in the mud developer get enthusastic again! Please!

    Read the article

  • HTAccess mod rewrite issue using QSA

    - by Matt
    Hey, I want to add a parameter to a URL but currently it isnt showing in the $_GET global. A snippet from my htaccess file is as below: RewriteRule ^account/blogs/([0-9]+)/([^\s?]+)/?$ /account/blog.php?blogId=$1 [L,QSA] Then in my php code i want to add a link such as: /account/blogs/1/ThisIsWhereTheTitleGoes?delete=1 The wildcard (any char but space) option is for the blog title as i never know what it would be. I know want to add a query string param on the end such as ?delete=1. I however dont want this as part of the rewrite. Does anybody know how to so this? Thanks

    Read the article

  • Python vs all the major professional languages [closed]

    - by Matt
    I've been reading up a lot lately on comparisons between Python and a bunch of the more traditional professional languages - C, C++, Java, etc, mainly trying to find out if its as good as those would be for my own purposes. I can't get this thought out of my head that it isn't good for 'real' programming tasks beyond automation and macros. Anyway, the general idea I got from about two hundred forum threads and blog posts is that for general, non-professional-level progs, scripts, and apps, and as long as it's a single programmer (you) writing it, a given program can be written quicker and more efficiently with Python than it could be with pretty much any other language. But once its big enough to require multiple programmers or more complex than a regular person (read: non-professional) would have any business making, it pretty much becomes instantly inferior to a million other languages. Is this idea more or less accurate? (I'm learning Python for my first language and want to be able to make any small app that I want, but I plan on learning C eventually too, because I want to get into driver writing eventually. So I've been trying to research each ones strengths and weaknesses as much as I can.) Anyway, thanks for any input

    Read the article

  • Can I use a single MySQL query to select distinct rows and then non-distinct rows if a limit hasn't

    - by Matt Rix
    I hope I'm explaining this properly, my knowledge of MySQL is quite limited. Let's say I have a table with rows that have name and shape fields. I'd like to select a bunch of rows from a table, but return all of the rows with unique shape field values first. If I have less than a certain number of rows, let's say 7, then I'd like to fill the remaining result rows with non-unique shape rows. The best way I can word it is that they're "ordered by uniqueness, and then by some other value". So, I don't want: square, square, circle, circle, rectangle, square, triangle I'd like to have: square, circle, rectangle, triangle, square, square, circle Is this possible to do using a single SQL query? I'm using MySQL with PHP, if that makes any difference. Thanks!

    Read the article

  • How have your coding values changed since graduating?

    - by Matt
    We all walked out of school with the stars in our eyes and little experience in "real-world" programming. How have your opinions on programming as a craft changed since you've gained more experience away from academia? I've become more and more about design a la McConnell : wide use of encapsulation, quality code that gives you warm fuzzy feelings when you read it, maintainability over execution performance, etc..., whereas many of my co-workers have followed a different path of fewer middlemen layers getting in the way, code that is right out in the open and easier to locate, even if harder to read, and performance-centric designs. What have you learned about the craft of software design which has changed the way you approach coding since leaving the academic world?

    Read the article

  • Creating LINQ to SQL for counting a parameter

    - by Matt
    I'm trying to translate a sql query into LINQ to SQL. I keep getting an error "sequence operators not supported for type 'system.string'" If I take out the distinct count part, it works. Is it not because I'm using the GROUP BY? SELECT COUNT(EpaValue) AS [Leak Count], Location, EpaValue AS [Leak Desc.] FROM ChartMes.dbo.RecourceActualEPA_Report WHERE (EpaName = N'LEAK1') AND (Timestamp) '20100429030000' GROUP BY EpaValue, Location ORDER BY Location, [Leak Count] DESC Dim temp = (From p In db2.RecourceActualEPA_Reports _ Where (p.Timestamp = str1stShiftStart) And (p.Timestamp < str2ndShiftCutoff) _ And (p.EpaName = "Leak1") _ Select p.EpaName.Distinct.Count(), p.Location, p.EpaValue)

    Read the article

  • HTML email image inverts on link click Outlook 07/10/13

    - by Matt Maclennan
    I'm having an issue on a HTML email in Word rendered Outlooks (2007, 2010, 2013) where I click an image link, and when the mouse is clicked, the image inverts... Here is the code below... <td align="left" width="360" valign="top" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: collapse;" class="hide"> <a href="#" target="_blank"> <img src="test.jpg" width="360" height="528" alt="alt tag" style="display:block;" class="img_mob centertable" border="0" align="left"> </a> </td> Here is a comparison on the image clicked/not clicked... I have tried putting a text-decoration: none on the link. All the links are styled inline as well. This is the only image that it is having this issue on the email, so tried re-saving the image with no luck. The image is saved as a JPEG and SRGB from a Photoshop PSD. Any ideas? Thanks.

    Read the article

  • MongoDB equivalent of SQL "OR"

    - by Matt
    So, MongoDB defaults to "AND" when finding records. For example: db.users.find({age: {'$gte': 30}, {'$lte': 40}}); The above query finds users = 30 AND <= 40 years old. How would I find users <= 30 OR = 40 years old?

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >