Search Results

Search found 1393 results on 56 pages for 'brian postow'.

Page 32/56 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • An autoformat tool to automatically insert braces around single-line clauses?

    - by Brian Deacon
    So assuming that in our work environment we've decided that the One True Faith forbids this: if (something) doSomething(); And instead we want: if (something) { doSomething(); } Is there a tool that will do that automagically? Awesomest would be to have eclipse just do it, but since we're really just recovering from one ex-employee that thought he was too pretty for coding conventions, a less-friendly tool that would do it right just once would suffice.

    Read the article

  • Problem sending email with Codeigniter - Headers sent in the message body

    - by Brian
    Having a strange issue with the email class in codeigniter. When I send email directly to my gmail account email address, it works fine. However if I send email to a different email address and use POP3 to import that email address into gmail, then for some reason all the headers are included in the message. Here's the code for sending the email: $this->email->clear(); $config['mailtype'] = "html"; $this->email->initialize($config); $this->email->set_newline("\r\n"); $this->email->from('[email protected]', 'Website'); $this->email->to('[email protected]'); $this->email->message($message); Here's what arrives in my inbox when the email is sent to an account which is imported into gmail via POP3: Date: Fri, 7 Jan 2011 15:07:04 +0000 From: "Website" <[email protected]> Reply-To: "[email protected]" <[email protected]> X-Sender: [email protected] X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: <[email protected]> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="B_ALT_4d272c1835c46" This is a multi-part message in MIME format. Your email application may not support this format. --B_ALT_4d272c1835c46 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit this is the email message content --B_ALT_4d272c1835c46 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html> <body> <p>this is the email message content </p> </body> </html> --B_ALT_4d272c1835c46--

    Read the article

  • Binary comparison operators on generic types

    - by Brian Triplett
    I have a generic class that takes a type T. Within this class I have a method were I need to compare a type T to another type T such as: public class MyClass<T> { public T MaxValue { // Implimentation for MaxValue } public T MyMethod(T argument) { if(argument > this.MaxValue) { // Then do something } } } The comparison operation inside of MyMethod fails with Compiler Error CS0019. Is it possible to add a constraint to T to make this work? I tried adding a where T: IComparable<T> to the class definition to no avail.

    Read the article

  • Can you let users upload Sinatra apps and run them inside Rails as middleware?

    - by Brian Armstrong
    I want to let users write small custom apps (think themes or plugins on Wordpress) and upload/run them on my site. I'm thinking about using Sinatra apps for this since it would give the users a lot of flexibility, and then running them as middleware inside my rails app. But I can't figure out the security implications of this. I tried creating a simple sinatra app as middleware, and it has access to all the rails models and everything - so that is bad. Is there a way for rack to keep these separate so that the sinatra apps are effectively sandboxed and can't do any bad things (outside of an API or some specific way I setup for them to communicate)? There may be an easier way to accomplish this that I haven't thought of too, so ideas welcome. Thanks!

    Read the article

  • Java Code Error Help..please

    - by Brian
    I am getting the following error and do not know how to fix it....any help would be great...Thanks Exception in thread "main" java.lang.NullPointerException at Polynomial.add(Polynomial.java:115) at PolyTest.main(PolyTest.java:18)

    Read the article

  • How do I register a server side click on an HTMLGenericControl?

    - by Brian Scott
    I'm looking for a reliable mechanism to generate a server side postback handler for an HTMLGenericControl such as an . I have some markup that I do not wish to change and would prefer to treat this in the same fashion as a standard .Net server control. Also, I know I can use a template based control to place some .Net controls within the markup as hidden and then trigger their click events from a client side click proxy. However, I'm really enquiring as to whether this can be done better.

    Read the article

  • Regular Expressions: RegEx for determining valid PHP class property names?

    - by Brian Lacy
    I am using PHP's magic __set and __get methods to access a private array in a class. I want to make sure the property names requested (i.e. $myObj->FakeProperty) are valid according to PHP property name rules before accessing them. My current RegEx isn't doing the trick; with my test values, _12 always falls through the cracks. I'm not actually sure that my test values even represent a realistic representation of what is and isn't allowed for PHP class property names, but I'm not really too concerned about it, just that I have some sort of rudimentary check in place. Test Fields: albert12 12Albert _12 _Albert12 _12Albert _____a_1 RegEx: ^(?=_*[A-z]+)[A-z0-9_]+$

    Read the article

  • Simple MySQL Query taking 45 seconds (Gets a record and its "latest" child record)

    - by Brian Lacy
    I have a query which gets a customer and the latest transaction for that customer. Currently this query takes over 45 seconds for 1000 records. This is especially problematic because the script itself may need to be executed as frequently as once per minute! I believe using subqueries may be the answer, but I've had trouble constructing it to actually give me the results I need. SELECT customer.CustID, customer.leadid, customer.Email, customer.FirstName, customer.LastName, transaction.*, MAX(transaction.TransDate) AS LastTransDate FROM customer INNER JOIN transaction ON transaction.CustID = customer.CustID WHERE customer.Email = '".$email."' GROUP BY customer.CustID ORDER BY LastTransDate LIMIT 1000 I really need to get this figured out ASAP. Any help would be greatly appreciated!

    Read the article

  • Unable to load assembly with windows service

    - by Brian
    I have created a windows service in C# VS2008 that uses a reference to an external class library to wrote. I have added the reference to it in VS2008. When I run start the service it throws an exception when trying to access the external DLL: Could not load file or assembly 'vcribAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. The DLL is in the same directory as the service.exe file. Is there something special that I need to do for windows services like putting the DLL in another directory?

    Read the article

  • What is Lazy Loading?

    - by Brian Boatright
    What is Lazy Loading? [Edit after reading a few answers] Why do people use this term so often? Say you just use a ASP/ADO recordset and load it with data or ADO.NET Datasource for a gridview. I guess I should have asked why people use the term Lazy Loading, what "other" types are their?

    Read the article

  • CruiseControl .Net Plugin Vb.net Error

    - by Brian
    I am trying to make my own Labeller plugin for Cruise Control .Net 1.4.3. I have made a class based on another plug in example but I keep getting an error Class 'AssemblyVersionLabeller' must implement 'Function Generate(integrationResult As IIntegrationResult) As String' for interface 'ThoughtWorks.CruiseControl.Core.ILabeller' Here is my code : Imports Exortech.NetReflector Imports ThoughtWorks.CruiseControl.Core Imports ThoughtWorks.CruiseControl.Core.Util Namespace NetAssembly.CCNet.Label _ Public Class AssemblyVersionLabeller Implements ILabeller Public Sub Run(ByVal result As IIntegrationResult) result.Label = Generate(result) End Sub Public Function Generate(ByVal integrationResult As IIntegrationResult) As String Dim label As String = integrationResult.LastIntegration.Label Return label End Function <ReflectorProperty("prefix", Required:=False)> _ Public Prefix As String = String.Empty End Class End Namespace What am I doing wrong? What have I missed? Background Info: I am using VS2005. I cant use CrusieControl 1.4.4 RC2 (which has an Assembly Labeller) because my source control's plugin (SCM Anywhere) doesnt work with it.

    Read the article

  • How to upload files?

    - by Brian Roisentul
    I just wanted to know how to configure FCKEditor to upload files and images to the server where the website is hosted. The relevant part for it's config file(i think) looks like this: FCKConfig.LinkUpload = true ; FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ; FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ; // empty for all FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one FCKConfig.ImageUpload = true ; FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ; FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one Could it be a folder permission problem? Is this part of the config.js alright?

    Read the article

  • ipad dev - in the UISplitViewController template, how is the method setDetailItem called?

    - by Brian
    I am developing an ipad app which has a UISplitViewController. (I use IB to build the interface, but I do not use the template) Both master and detail (left and right) views are navigationController. The left view subclass UITableView and the right view should push another controller if the cell on the left is selected. I don't know how to make my detail view responds to my master view. Also, in the template, the detailViewController has a id detailItem and a method setDetailItem. How are these two connected? I cannot see any connection between but setDetailItem is called when detailViewController.detailItem is being called. Thanks in advance.

    Read the article

  • best way to switch between secure and unsecure connection without bugging the user

    - by Brian Lang
    The problem I am trying to tackle is simple. I have two pages - the first is a registration page, I take in a few fields from the user, once they submit it takes them to another page that processes the data, stores it to a database, and if successful, gives a confirmation message. Here is my issue - the data from the user is sensitive - as in, I'm using an https connection to ensure no eavesdropping. After that is sent to the database, I'd like on the confirmation page to do some nifty things like Google Maps navigation (this is for a time reservation application). The problem is by using the Google Maps api, I'd be linking to items through a unsecure source, which in turn prompts the user with a nasty warning message. I've browsed around, Google has an alternative to enterprise clients, but it costs $10,000 a year. What I am hoping is to find a workaround - use a secure connection to take in the data, and after it is processed, bring them to a page that isn't secure and allows me to utilize the Google Maps API. If any of you have a Netflix account you can see exactly what I would like to do when you sign-in, it is a secure page, which then takes you to your account / queue, on an unsecure page. Any suggestions? Thanks!

    Read the article

  • Nokogiri HttParty Xpath Ruby on Rails

    - by Brian
    I am working with a mmorpg (Eve Online) request that returns xml. I am using httparty for the request and I am trying to use nokogiri to obtain attribute values for a specific element. Here's an example of the response: <eveapi version="2"><currentTime>2012-10-19 22:41:56</currentTime><result><rowset name="transactions" key="refID" columns="date,refID,refTypeID,ownerName1,ownerID1,ownerName2,ownerID2,argName1,argID1,amount,balance,reason,taxReceiverID,taxAmount"><row date="2012-10-18 23:41:50" refID="232323" refTypeID="9" ownerName1="University of Caille" ownerID1="32232" ownerName2="name" ownerID2="34343" argName1="" argID1="0" amount="5000.00" balance="5000.00" reason="Starter fund" taxReceiverID="" taxAmount=""/></rowset></result><cachedUntil>2012-10-19 23:03:40</cachedUntil></eveapi> I only need to access attributes for the element "row" and there can be many rows returned. I have read about xpath and from what I understand if I do the following it should return all rows: doc.xpath('row') however it does not return anything. Here's what I have so far: options = {:keyID => 111111, :vCode => 'fddfdfdfdf'} response = HTTParty.post('https://api.eveonline.com/char/WalletJournal.xml.aspx', :body => options) doc = Nokogiri::XML(response.body) doc.xpath('row').each do |r| end The loop is never executed. What am I doing wrong? I need to return all row elements and gain access to each of the row's attributes. Thanks.

    Read the article

  • Python Process won't call atexit

    - by Brian M. Hunt
    I'm trying to use atexit in a Process, but unfortunately it doesn't seem to work. Here's some example code: import time import atexit import logging import multiprocessing logging.basicConfig(level=logging.DEBUG) class W(multiprocessing.Process): def run(self): logging.debug("%s Started" % self.name) @atexit.register def log_terminate(): # ever called? logging.debug("%s Terminated!" % self.name) while True: time.sleep(10) @atexit.register def log_exit(): logging.debug("Main process terminated") logging.debug("Main process started") a = W() b = W() a.start() b.start() time.sleep(1) a.terminate() b.terminate() The output of this code is: DEBUG:root:Main process started DEBUG:root:W-1 Started DEBUG:root:W-2 Started DEBUG:root:Main process terminated I would expect that the W.run.log_terminate() would be called when a.terminate() and b.terminate() are called, and the output to be something likeso (emphasis added)!: DEBUG:root:Main process started DEBUG:root:W-1 Started DEBUG:root:W-2 Started DEBUG:root:W-1 Terminated! DEBUG:root:W-2 Terminated! DEBUG:root:Main process terminated Why isn't this working, and is there a better way to log a message (from the Process context) when a Process is terminated? Thank you for your input - it's much appreciated.

    Read the article

  • Help Needed With AJAX Script

    - by Brian
    Hello All I am working on an AJAX script but am having difficulties. First, here is the script: var xmlHttp; function GetXmlHttpObject(){ var objXMLHttp=null if (window.XMLHttpRequest){ objXMLHttp=new XMLHttpRequest() } else if (window.ActiveXObject){ objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") } return objXMLHttp } function retrieveData(){ var jBossServer = new Array(); jBossServer[0] = "d01"; jBossServer[1] = "d02"; jBossServer[2] = "p01"; jBossServer[3] = "p02"; for(var i=0; i<jBossServer.length; i++){ xmlHttp = GetXmlHttpObject(); if (xmlHttp == null){ alert ("Something weird happened ..."); return; } var url="./retrieveData.php"; url = url + "?jBossID=" + jBossServer[i]; url = url + "&sid=" + Math.random(); xmlHttp.open("GET",url,true); xmlHttp.onreadystatechange = updateMemory; xmlHttp.send(null); } } function updateMemory(){ if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete"){ aggregateArray = new Array(); aggregateArray = xmlHttp.responseText.split(','); for(var i=0; i<aggregateArray.length; i++){ alert(aggregateArray[i]); } return; } } The "retrieveData.php" page will return data that looks like this: d01,1 MB,2 MB,3 MB They relate to my 4 servers d01, d02, p01, and p02 (dev and prod). What I am doing is scraping the memory information from http://127.0.0.1:8080/web-console/ServerInfo.jsp I want to save code so I attempted to put the AJAX xmlHttp call into a loop, but I don't think it is working. All I ever get back is the information for "p02" four times. Am I able to do what I want or do I need four different functions for each server (i.e., xmlHttpServer01, xmlHttpServer02, xmlHttpServer03, xmlHttpServer04)? Thank you all for reading, have a good day. :)

    Read the article

  • Variable 'app' in url-pattern for servlet mapping

    - by Brian
    I'm learning Spring MVC (and servlets in general) and following springsource's mvc-ajax example, which uses annotated controller methods. It appears that there is only one url-pattern (in web.xml) mapped to a servlet in that example: /app/* I've deployed the app as a WAR file, and the actual, ugly URL I'm requesting is http://127.0.0.1:8080/org.springframework.samples.mvc.ajax-1.0.0-20100407.233245-1/account. So, it appears that 'app' in '/app/*' is a variable corresponding to 'org.springframework.samples.mvc.ajax-1.0.0-20100407.233245-1', however, it isn't universal because it isn't usable in my own app, and it contradicts my understanding that url-pattern contains the portion of the URL after the app name. So, what is 'app'? Where is it configured?

    Read the article

  • Continue Considered Harmful?

    - by brian
    Should developers avoid using continue in C# or its equivalent in other languages to force the next iteration of a loop? Would arguments for or against overlap with arguments about Goto?

    Read the article

  • Reading numeric Excel data as text using xlrd in Python

    - by Brian
    Hi guys, I am trying to read in an Excel file using xlrd, and I am wondering if there is a way to ignore the cell formatting used in Excel file, and just import all data as text? Here is the code I am using for far: import xlrd xls_file = 'xltest.xls' xls_workbook = xlrd.open_workbook(xls_file) xls_sheet = xls_workbook.sheet_by_index(0) raw_data = [['']*xls_sheet.ncols for _ in range(xls_sheet.nrows)] raw_str = '' feild_delim = ',' text_delim = '"' for rnum in range(xls_sheet.nrows): for cnum in range(xls_sheet.ncols): raw_data[rnum][cnum] = str(xls_sheet.cell(rnum,cnum).value) for rnum in range(len(raw_data)): for cnum in range(len(raw_data[rnum])): if (cnum == len(raw_data[rnum]) - 1): feild_delim = '\n' else: feild_delim = ',' raw_str += text_delim + raw_data[rnum][cnum] + text_delim + feild_delim final_csv = open('FINAL.csv', 'w') final_csv.write(raw_str) final_csv.close() This code is functional, but there are certain fields, such as a zip code, that are imported as numbers, so they have the decimal zero suffix. For example, is there is a zip code of '79854' in the Excel file, it will be imported as '79854.0'. I have tried finding a solution in this xlrd spec, but was unsuccessful.

    Read the article

  • How can I sync files in two different git repositories (not clones) and maintain history?

    - by brian d foy
    I maintain two different git repos that need to share some files, and I'd like the commits in one repo to show up in the other. What's a good way to do that for ongoing maintenance? I've been one of the maintainers of the perlfaq (Github), and recently I fell into the role of maintaining the Perl core documentation, which is also in git. Long before I started maintaining the perlfaq, it lived in a separate source control repository. I recently converted that to git. Periodically, one of the perl5-porters would sync the shared files in the perlfaq repo and the perl repo. Since we've switched to git, we'e been a bit lazy converting the tools, and I'm now the one who does that. For the time being, the two repos are going to stay separate. Currently, to sync the FAQ for a new (monthly) release of perl, I'm almost ashamed to say that I merely copy the perlfaq*.pod files in the perlfaq repo and overlay them in the perl repo. That loses history, etc. Additionally, sometimes someone makes a change to those files in the perl repo and I end up overwriting it (yes, check git diff you idiot!). The files do not have the same paths in the repo, but that's something that I could change, I think. What I'd like to do, in the magical universe of rainbows and ponies, is pull the objects from the perlfaq repo and apply them in the perl repo, and vice-versa, so the history and commit ids correspond in each. Creating patches works, but it's also a lot work to manage it Git submodules seem to only work to pull in the entire external repo I haven't found something like svn's file externals, but that would work in both directions anyway I'd love to just fetch objects from one and cherry-pick them in the other What's a good way to manage this?

    Read the article

  • MySQL fields terminated by tab

    - by Brian
    I am trying to upload a tab delimitted file with MySQL. I want a query something likes this: LOAD DATA LOCAL INFILE 'file' INTO TABLE tbl FIELDS TERMINATED BY 'TAB' Is there something I can subsitute for TAB to make this work?

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >