Daily Archives

Articles indexed Saturday May 15 2010

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

  • Can the Visual Studio (2010) Command Window handle "external tools" with project/solution relative p

    - by ee
    I have been playing with the Command Window in Visual Studio (View-Other Windows-Command Window). It is great for several mouse-free scenarios. (The autocompleting file "Open" command rocks in a non-trivial solution.) That success got me thinking and experimenting: Possibility 1.1: You can use the Alias commands to create custom commands Possibility 1.2: You can use the Shell command to run arbitrary executables and specify parameters (and pipe the result to the output or command windows) Possibility 2: A previously setup external tool definition (with project-relative path variables) could be run from the command window What I am stuck on is: There doesn't appear to be a way to send parameters to an aliased command (and thus the underlying Shell call) There doesn't appear to be a way to use project/solution relative paths ($SolutionDir/$ProjectDir) on a Shell call Using absolute paths in Shell works, but is fragile and high-maintenance (one alias for each needed use case). Typically you want the command to run against a file relative to your project/solution. It seems you can't run the traditional external tools (Tools-External Tools...) in the command window Ultimately I want the external tool functionality in the command window in some way. Can anyone see a way to do this? Or am I barking up the wrong tree? So my questions: Can an "external tool" of some sort (using relative project/solution path parameters) be used in the Command Window? If yes, How? If no, what might be a suitable alternative?

    Read the article

  • Inserting new <TD> elements into a table row.

    - by Hunter S. Smythe
    I have created a small application written in XHTML, JavaScript/JQuery and PHP. The PHP reads and writes to a small SQLite database. How would i go about inserting cells into a pre-scripted table. The cells would need to be configured using some information from my database. For example, below are two cells with their data retrieved from my database: Cell One Starts: 120px; Finishes: 180px; Background: Blue; Cell Two Starts: 240px; Finishes: 300px; Background: Green; On my table row, it is 500px in width. How would I insert the cells above into the row. In this example, the first cell would start 120px into the row and have a width of 180px. The second cell would start 240px into the row and have a width of 300px. I just cant seem to work out a way of doing this, any ideas would be very helpful. Thank you for any input, all is appreciated. Hunter.

    Read the article

  • Authlogic Current User Question - hiding admin links...

    - by bgadoci
    I think I am missing something while using the Authlogic gem w/ Rails. To set the stage I have multiple users and each user can create posts and comments. Upon the display of a post or comment I would like to give the user who created them the option to edit or destroy. I am successfully using the following code to hide and show elements based on if a user is logged in or not but can't seem to find out how to only show these links to the actual user who created them...not any user that is logged in. <% if current_user %> <%= link_to 'Edit', edit_question_path(question) %> | <%= link_to 'Destroy', question, :confirm => 'Are you sure?', :method => :delete %> <% else %> <p>nothing to see here</p> <% end %> Here is the def of current_user located in the application controller in case I need to change something here. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time protect_from_forgery # See ActionController::RequestForgeryProtection for details# helper_method :current_user private def current_user_session return @current_user_session if defined?(@current_user_session) @current_user_session = UserSession.find end def current_user return @current_user if defined?(@current_user) @current_user = current_user_session && current_user_session.record end end

    Read the article

  • Generating All Permutations of Character Combinations when # of arrays and length of each array are

    - by Jay
    Hi everyone, I'm not sure how to ask my question in a succinct way, so I'll start with examples and expand from there. I am working with VBA, but I think this problem is non language specific and would only require a bright mind that can provide a pseudo code framework. Thanks in advance for the help! Example: I have 3 Character Arrays Like So: Arr_1 = [X,Y,Z] Arr_2 = [A,B] Arr_3 = [1,2,3,4] I would like to generate ALL possible permutations of the character arrays like so: XA1 XA2 XA3 XA4 XB1 XB2 XB3 XB4 YA1 YA2 . . . ZB3 ZB4 This can be easily solved using 3 while loops or for loops. My question is how do I solve for this if the # of arrays is unknown and the length of each array is unknown? So as an example with 4 character arrays: Arr_1 = [X,Y,Z] Arr_2 = [A,B] Arr_3 = [1,2,3,4] Arr_4 = [a,b] I would need to generate: XA1a XA1b XA2a XA2b XA3a XA3b XA4a XA4b . . . ZB4a ZB4b So the Generalized Example would be: Arr_1 = [...] Arr_2 = [...] Arr_3 = [...] . . . Arr_x = [...] Is there a way to structure a function that will generate an unknown number of loops and loop through the length of each array to generate the permutations? Or maybe there's a better way to think about the problem? Thanks Everyone!

    Read the article

  • How should a one-man development shop document their code?

    - by CKoenig
    Hi, please let me first describe my situation. I work in an IT department for a small-to-medium sized industrial-company and basically I'm the only real developer (sometimes a second guy joins in for his own projects). I programm mostly in C#/.net. Of course I only programm for internal need (Intranet, reporting, data-driven apps, some mobile apps, ...). My question is how should I document my work? It's a highly dynamic environment (the features and bug fixes I implement are tested by me during production, and go live, often within a day. If I technical documentation like MSDN or even overview diagramms those would take me more time to sync than the whole programming process. Also I feel it's a waste of time because I would be the only one who ever read it. I do understand that if I get sick, leave, or forget this documentation would be valuable. PS:well of course you are right - the quesion is how much and how/where. I try using the XML-docu comments for the public exposed parts but as I'm a believer in self-documenting code the comments mostly restates in plain text what you can read from the method-head itself :(Maybe using the remarks section is the key but if you have 30 lines of code with a 15 line xml-comment in front it just looks dirty (sorry for posting it here but our firewall rejects JSON :( )

    Read the article

  • HttpWebResonse hangs on multiple request

    - by Ehsan
    I've an application that create many web request to donwload the news pages of a web site (i've tested for many web sites) after a while I find out that the application slows down in fetching the html source then I found out that HttpWebResonse fails getting the response. I post only the function that do this job. public PageFetchResult Fetch() { PageFetchResult fetchResult = new PageFetchResult(); try { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(URLAddress); HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); Uri requestedURI = new Uri(URLAddress); Uri responseURI = resp.ResponseUri; if (Uri.Equals(requestedURI, responseURI)) { string resultHTML = ""; byte[] reqHTML = ResponseAsBytes(resp); if (!string.IsNullOrEmpty(FetchingEncoding)) resultHTML = Encoding.GetEncoding(FetchingEncoding).GetString(reqHTML); else if (!string.IsNullOrEmpty(resp.CharacterSet)) resultHTML = Encoding.GetEncoding(resp.CharacterSet).GetString(reqHTML); resp.Close(); fetchResult.IsOK = true; fetchResult.ResultHTML = resultHTML; } else { URLAddress = responseURI.AbsoluteUri; relayPageCount++; if (relayPageCount > 5) { fetchResult.IsOK = false; fetchResult.ErrorMessage = "Maximum page redirection occured."; return fetchResult; } return Fetch(); } } catch (Exception ex) { fetchResult.IsOK = false; fetchResult.ErrorMessage = ex.Message; } return fetchResult; } any solution would greatly appreciate

    Read the article

  • Mixing JPA annotations and XML configuration

    - by HDave
    I have a fairly large (new) project in which we have annotated many domain classes with JPA mappings. Now it is time to implement many named queries -- some entities may have as many as 15-20 named queries. I am thinking that writing these named queries in annotations will clutter the source files and therefore am considering putting these in XML mapping files. Is this possible? Mort importantly, is this reasonable? Are there better approaches? How is this done?

    Read the article

  • NHibernate Tutorial #5 - Working with Many to Many relationships

    - by BobPalmer
    After a short break last week, I wanted to make sure I made time to publish the next in my series of tutorials on NHibernate. This week I'll be covering Many to Many relationships, the hilo algorithm, IdBag element, and touch on Lazy Loading. You can view the entire article at this link: http://docs.google.com/Doc?docid=0AUP-rKyyUMKhZGczejdxeHZfMjZkdjd3cjJnMg&hl=en As always, feedback and any technical bits I may have missed are always appreciated! -Bob Palmer

    Read the article

  • What LPR arguments do I need to print a 1400x800 pixel image on a 4x6 label?

    - by Nick
    This is driving me nuts. UPS sends our system a 1400x800 GIF image of a shipping label, which is supposed to fit nicely on a 4x6 page. Unfortunately, I can't seem to get the command line options right to make it happen. We're using an Eltron/Zebra 2844 with a network adapter, and printing from our Ubuntu 8.04 server using CUPS. We're using the correct drivers, and test pages print correctly. No matter what I try though, it insists on printing the UPS labels accross 6 pages, with a little bit of the label on each page, or way too small. I've tried a bazillion different lpr settings, most of them producing garbage. The closest I've gotten is this: lpr -P Eltron2844 -o natural-scaling=55 -o page-right=0 -o page-left=0 -o landscape -o media="4x6" ./1ZY437560399620027.gif but it causes the image to be too small on the page. It's about an inch too short, and there's a 1/2" margin on both sides. If I bump the scale up to 56, it explodes the image onto two pages, and squashes it. Any ideas?

    Read the article

  • Setting UIActivityIndicatorView while view is prepared

    - by iFloh
    Hi, I have a UITabbBarController with a UITableView. Under certain circumstances the TabBarControllers dataset requires updating when a user arrives from another view, e.g. the initial load when the TabBarController is called the first time, or when the settings are changed. This dataset update takes about 2 seconds and I want to show an UIActivityIndicatorView. Trouble is that when I enter from another view I don't know which view to attach it to, since the loading of the tabbarController is carried out in the viewWillAppear method. Any clues how I can go about this?

    Read the article

  • Howto install distribute for Python 3

    - by chris.nullptr
    I am trying to install distribute using ActivePython 3.1.2 on Windows. Running python distribute_setup.py as described at the cheese shop give me: No setuptools distribution found running install ... File "build\src\setuptools\command\easy_install.py", line 16, in <module> from setuptools.sandbox import run_setup File "build\src\setuptools\sandbox.py", line 164, in <module> fromlist=['__name__']).__file__) AttributeError: 'module' object has no attribute '__file__' Something went wrong during the installation. See the error message above. Is there possibly an unknown dependency that I'm missing?

    Read the article

  • Given a linked list of numbers. Swap every 2 adjacent links.

    - by Learner
    Given a linked list of numbers. Swap every 2 adjacent links. For eg if a linked list given to you is- a-b-c-d-e-f O/p expected- b-a-d-c-f-e Every 2 alternate links have to be swapped. I have written a solution here. Can you suggest me some other solution. Can you comment on my solution and help me better write it? void SwapAdjacentNodes (Node head) { if (head == null) return; if (head.next == null) return; Node curr = head; Node next = curr.Next; Node temp = next.Next; while (true) { temp = next.Next; next.Next = curr; curr.Next = temp; if (curr.Next != null) curr = curr.Next; else break; if (curr.Next.Next!=null) next = curr.Next.Next; else break; } }

    Read the article

  • Are there any good Java API for facebook?

    - by Kamikaze Mercenary
    I've played around a bit with twitter4j and found it absolutely wonderful. Now I've been looking into the equivalent for facebook but so far haven't had much luck finding a decent project. I looked into facebook-java-api but it appears that they break their API from release to release. I consider this unacceptable. I'm currently playing around a bit with RestFB and the API seems decent so far but I've been having some connection problems. I'm just looking for a simple library that lets me post status updates, send direct messages and get a list of friends through minimal coding effort. Has anyone had any success using a java API for facebook and if so, what are you using? Thanks.

    Read the article

  • this is for oracle apps project module information

    - by nil
    hi to all i m taking about oracle apps project module in project module there was project status inquiry inside that percent complete functionality i want require information what is this functionality and it's update automatically or require run any requites or other please give me information what this function do thanks nil

    Read the article

  • String to Integer Smalltalk

    - by Anton
    Pretty simple question I need to get an integer from the user and I only know how to get a string from them. So if there is a way to get an integer from the user or to convert the string to an integer please let me know.

    Read the article

  • Running Apache for All Local Webpages

    - by waiwai933
    So I've enabled PHP on my Mac OS X 10.5 (Leopard), and it's working great so long as: 1) I place the file in the ~/Sites directory 2) I use the http://localhost/~user/example.php URL instead of the file:///Users/user/Sites/example.php I presume this is because unless both of those conditions are true, Apache is not involved, and thus neither is PHP. So is there any way to remove either of those conditions? (Well, really the latter, because the first is a symptom of the second)

    Read the article

  • Hire Expert Joomla Developers For Best Joomla Web Development

    With the introduction of new tool like Joomla CMS it has become easier to build websites without any difficulty. Joomla can offer you a dynamic website with robust content management system, but at the same time hiring expert Joomla developers can further let you get a professional, attractive and usable Joomla website. In this article, learn why hiring Joomla developers can be the best option if one is looking to make a Joomla website.

    Read the article

  • BlackBerry Library problems. (jre6 + NET_RIM_BLACKBERRY)

    - by kimera84
    Hi Everyone, I'm new in blackberry environement programming, I'm developing an application for this device and there are some probs about libraries that I don't understand. I have the main project called: npoBBerry - his library is NET_RIM_BLACKBERRY (from 4.6.1 version...) it includes other two projects: Npo - his library is standard jre6 (Npo inlcudes NpoCore) NpoCore - his library is standard jre6 Compliance was set... In Java Compiler level is set to 1.4 for all. Now the problem is that I'm not able to build my project. 4 errors: Error preverifying class ch.yek.npo.model.Advertising Error preverifying class ch.yek.npo.repository.Repository$1 Error!: Error: preverifier failed: C:\Program Files\eclipse\plugins\net.rim.eide.componentpack4.6.1_4.6.1.27\components\bin\preverify.ex ... Error!: Error: preverifier failed: C:\Program Files\eclipse\plugins\net.rim.eide.componentpack4.6.1_4.6.1.27\components\bin\preverify.ex ... I know that libraries are differents but maybe I'm missing something. NpoCore represents models, interfaces Npo just take data from a repository NpoBBeryy just use this data from Services... Please help and thanks in advance... :)

    Read the article

  • Passing a parameter in a Report's Open Event to a parameter query (Access 2007)

    - by JPM
    Hi there, I would like to know if there is a way to set the parameters in an Access 2007 query using VBA. I am new to using VBA in Access, and I have been tasked with adding a little piece of functionality to an existing app. The issue I am having is that the same report can be called in two different places in the application. The first being on a command button on a data entry form, the other from a switchboard button. The report itself is based on a parameter query that has requires the user to enter a Supplier ID. The user would like to not have to enter the Supplier ID on the data entry form (since the form displays the Supplier ID already), but from the switchboard, they would like to be prompted to enter a Supplier ID. Where I am stuck is how to call the report's query (in the report's open event) and pass the SupplierID from the form as the parameter. I have been trying for a while, and I can't get anything to work correctly. Here is my code so far, but I am obviously stumped. Private Sub Report_Open(Cancel As Integer) Dim intSupplierCode As Integer 'Check to see if the data entry form is open If CurrentProject.AllForms("frmExample").IsLoaded = True Then 'Retrieve the SupplierID from the data entry form intSupplierCode = Forms![frmExample]![SupplierID] 'Call the parameter query passing the SupplierID???? DoCmd.OpenQuery "qryParams" Else 'Execute the parameter query as normal DoCmd.OpenQuery "qryParams"????? End If End Sub I've tried Me.SupplierID = intSupplierCode, and although it compiles, it bombs when I run it. And here is my SQL code for the parameter query: PARAMETERS [Enter Supplier] Long; SELECT Suppliers.SupplierID, Suppliers.CompanyName, Suppliers.ContactName, Suppliers.ContactTitle FROM Suppliers WHERE (((Suppliers.SupplierID)=[Enter Supplier])); I know there are ways around this problem (and probably an easy way as well) but like I said, my lack of experience using Access and VBA makes things difficult. If any of you could help, that would be great!

    Read the article

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