Search Results

Search found 150 results on 6 pages for 'quoting'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • My Zend Framework 'quoting' mess.

    - by tharkun
    I've got a probably very simple issue to which I can't find a satisfactory (subjectively seen) answer in the Zend Framework manual or elsewhere... There are so many ways how I can hand over my php variables to my sql queries that I lost the overview and probably I lack some understanding about quoting in general. Prepared Statements $sql = "SELECT this, that FROM table WHERE id = ? AND restriction = ?"; $stmt = $this->_db->query($sql, array($myId, $myValue)); $result = $stmt->fetchAll(); I understand that with this solution I don't need to quote anything because the db handles this for me. Querying Zend_Db_Table and _Row objects over the API $users = new Users(); a) $users->fetchRow('userID = ' . $userID); b) $users->fetchRow('userID = ' . $users->getAdapter()->quote($userID, 'INTEGER')); c) $users->fetchRow('userID = ?', $userID); d) $users->fetchRow('userID = ?', $users->getAdapter()->quote($userID, 'INTEGER')); Questions I understand that a) is not ok because it's not quoted at all. But what about the other versions, what's the best? Is c) being treated like a statement and automatically quoted or do I need to use d) when I use the ? identifier?

    Read the article

  • Quoting of decimal values

    - by Peter
    I am storing a running total in a Decimal(10,2) field and adding to it as items are processed. update foo set bar = bar + '3.15' About 20% of the times a warning is issued "Data truncated for column 'bar' at row 4" This warning is never issued if the update value is not quoted. Should decimal values be quoted?

    Read the article

  • Invoicing vs Quoting

    - by FreshCode
    If invoices can be voided, should they be used as quotations? I have an Invoices tables that is created from inventory associated with a Job. I could have a Quotes table as a halfway-house between inventory and invoices, but it feels like I would have duplicate data structures and logic just to handle an "Is this a quote?" bit. From a business perspective, quotes are different from invoices: a quote is sent prior to an undertaking and an invoice is sent once it is complete and payment is due, but how to represent this in my repository and model. What is an elegant way to store and manage quotes & invoices in a database?

    Read the article

  • Invoicing vs Quoting or Estimating

    - by FreshCode
    If invoices can be voided, should they be used as quotations? I have an Invoices tables that is created from inventory associated with a Job or Order. I could have a Quotes table as a halfway-house between inventory and invoices, but it feels like I would have duplicate data structures and logic just to handle an "Is this a quote?" bit. From a business perspective, quotes are different from invoices: a quote is sent prior to an undertaking and an invoice is sent once it is complete and payment is due, but how to represent this in my repository and model. What is an elegant way to store and manage quotes & invoices in a database? Edit: indicated Job === Order for this particular instance.

    Read the article

  • Quoting people for website dev. work

    - by Jason
    Hi All, I have recently given some quotes to a few people. And I need some advice about how things should be done... Q1: I've seen, heard of and read about a lot of developers using free resource sites online to obtain free Privacy Policy, Disclaimers etc for their/customers websites. A customer I quoted the other day expected me to write/get a disclaimer for their site. Who in their right mind would expect a document like that from a Web Developer? I just told them that they need to sort that stuff out themselves with a Lawyer or something, and then to send it to me so I can paste it on a webpage for them. Q2: If you're charging per hour, and you estimate that the project would take 1week to finish (including testing/releasing), but you soon realise that you'll require more time, do you RE-quote them? Or do you just finish off the site at the original quote price? Q3: How do you figure out how much you will charge your customers? Do you charge per-feature, or per hour, or per day, or all of the above? Thanks :)

    Read the article

  • nginx regex characters that require quoting?

    - by Michael Louis Thaler
    So I was configuring nginx today and I hit a weird problem. I was trying to match a location like this: location ~ ^/([0-9]+)/(.*) { # do proxy redirects } ...for URLs like "http://my.domain.com/0001/index.html". This rule was never matching, despite the fact that it by all rights should. It took me awhile to figure out, based on this documentation, that some characters in regexes need to be quoted. The problem is, the documentation is for rewrites, and it specifically calls out curly braces, not square brackets. After a fair bit of experimentation that involved a lot of swearing, I discovered that I could fix the problem by quoting the regex like so: location ~ "^/([0-9]+)/(.*)" { # do proxy redirects } Is there a list somewhere of characters that nginx requires quoting regexes with? Or could there be something else going on here that I'm totally missing? This is my first nginx configuration job, so it's very possible I've misunderstood something...

    Read the article

  • Drupal UC "Quoting / Estimate" error

    - by Murtez
    Hi, I was playing around with Drupal UC and installed a module called "Quoting / Estimate" (http://drupal.org/project/quoting), I tried to run it and got this error: **warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'quoting_quote_clear_page' was given in /home/ergospec/public_html/d/includes/menu.inc on line 348** Has anyone run into this problem? Second question: anyone know of a good quotation module (where customer can request a price quote, not the brackets)? It doesn't have to be in Drupal. Any help is appreciated. Murtez

    Read the article

  • Shell Script Variable Quoting Problem

    - by apinstein
    I have an sh script that contains the line $PHP_COMMAND -r 'echo get_include_path();' I can not edit this script, but I need the eventual command line to be (equivalent to) php -d include_path='/path/with spaces/dir' -r 'echo get_include_path();' How can I achieve this? Below is a script that demonstrates the problem. #!/bin/sh # shell script quoting problem demonstration # I need to be able to set a shell variable with a command with # some options, like so PHP_COMMAND="php -d 'include_path=/path/with spaces/dir'" # then use PHP_COMMAND to run something in another script, like this: $PHP_COMMAND -r 'echo get_include_path();' # the above fails when executed. However, if you copy/paste the output # from this line and run it in the CLI, it works! echo "$PHP_COMMAND -r 'echo get_include_path();'" php -d include_path='/path/with spaces/dir' -r 'echo get_include_path();' # what's going on? # this is also interesting echo "\n--------------------" # this works great, but only works if include_path doesn't need quoting PHP_COMMAND="php -d include_path=/path/to/dir" echo "$PHP_COMMAND -r 'echo get_include_path();'" $PHP_COMMAND -r 'echo get_include_path();' echo "\n--------------------" # this one doesn't when run in the sh script, but again if you copy/paste # the output it does work as expected. PHP_COMMAND="php -d 'include_path=/path/to/dir'" echo "$PHP_COMMAND -r 'echo get_include_path();'" $PHP_COMMAND -r 'echo get_include_path();' Script also available online: http://gist.github.com/276500

    Read the article

  • quoting HTML attribute values

    - by Flavius
    Hi I know the spec allows both ' and " as delimiters for attribute values, and I also know it's a good practice to always quote. However I consider " being the cleaner way, maybe it's just me having grown up with C and C++' syntax. What is the cleanest way of quoting attribute values and why? Please no subjective answers.

    Read the article

  • Windows Batch Scripting Issue - Quoting Variables containing spaces

    - by Rick
    So here's my issue: I want to use %cd% so a user can execute a script anywhere they want to place it, but if %cd% contains spaces, then it will fail (regardless of quotes). If I hardcode the path, it will function with quotes, but if it is a variable, it will fail. Fails: (if %cd% contains spaces) "%cd%\Testing.bat" Works: "C:\Program Files\Testing.bat" Any ideas?

    Read the article

  • Help with variables and new lines, and quoting in a bash script

    - by Scott
    I would like to automate the following svn command. Note this command produces the desired results on my system - Ubuntu 10.04, svn 1.6.6, bash shell, when issued from the command line: svn ci -m $'Added new File: newFile.txt\nOrig loc: /etc/networking/newFile.txt' /home/user/svnDir/newFile.txt I would like to run that command in a bash script, assuming that the original full path to the file is contained in the variable $oFileFull, and the filename is in $oFileName. The script is executed from the svn directory. I need to allow for the possibility that the file name and or path contain spaces. so the line inside my shel script might look like: svn ci -m$'Added new file: ${oFileName}\nOrig loc: ${oFileFull}' ${oFileName} But I want the variables (which may contain spaces) expanded before the command is executed, and I cannot figure out how to do this while enclosing the svn comment in single quotes which is necessary in order to get the new line in the subversion comment log. I am pulling my hair out trying to figure out how to properly quote and assemble this command. Any help appreciated.

    Read the article

  • "Undefined index" when quoting array key

    - by Satish
    I have a form in index.php <?php echo '<form action="update_act.php" method="POST">'; echo '<input type="submit" name="'.$row['act_name'].'" value="edit"> echo </form> ?> Here $row['act_name'] is a value fetched from database. My update_act.php file is <?php echo "Old Activity Name : ".$_POST['$row[\'act_name\']']; ?> But I am getting an error Undefined index: $row['act_name'] in C:\wamp\www\ps\activity\update_act.php. I want to have different names for different submits but I am not able to get its value in another page. Is there any way for it?

    Read the article

  • Python __setattr__ and __getattr__ for global scope?

    - by KT
    Suppose I need to create my own small DSL that would use Python to describe a certain data structure. E.g. I'd like to be able to write something like f(x) = some_stuff(a,b,c) and have Python, instead of complaining about undeclared identifiers or attempting to invoke the function some_stuff, convert it to a literal expression for my further convenience. It is possible to get a reasonable approximation to this by creating a class with properly redefined __getattr__ and __setattr__ methods and use it as follows: e = Expression() e.f[e.x] = e.some_stuff(e.a, e.b, e.c) It would be cool though, if it were possible to get rid of the annoying "e." prefixes and maybe even avoid the use of []. So I was wondering, is it possible to somehow temporarily "redefine" global name lookups and assignments? On a related note, maybe there are good packages for easily achieving such "quoting" functionality for Python expressions?

    Read the article

  • How do I best do balanced quoting with Perl's Regexp::Grammars?

    - by Evan Carroll
    Using Damian Conway's Regexp::Grammars, I'm trying to match different balanced quoting ('foo', "foo", but not 'foo") mechanisms -- such as parens, quotes, double quotes, and double dollars. This is the code I'm currently using. <token: pair> \'<literal>\'|\"<literal>\"|\$\$<literal>\$\$ <token: literal> [\S]+ This generally works fine and allows me to say something like: <rule: quote> QUOTE <.as>? <pair> My question is how do I reform the output, to exclude the needles notation for the pair token? { '' => 'QUOTE AS \',\'', 'quote' => { '' => 'QUOTE AS \',\'', 'pair' => { 'literal' => ',', '' => '\',\'' } } }, Here, there is obviously no desire to have pair in between, quote, and the literal value of it. Is there a better way to match 'foo', "foo", and $$foo$$, and maybe sometimes ( foo ) without each time creating a needless pair token? Can I preprocess-out that token or fold it into the above? Or, write a better construct entirely that eliminates the need for it?

    Read the article

  • Are web application usability issues equal to website usability issues?

    - by Kor
    I've been reading two books about web usability issues and tests (Rocket Surgery Made Easy¹ and Prioritizing Web Usability²) and they claim some strategies and typical problems about website usability and how to lead them. However, I want to do a web application, and I think I lost track of what I am trying to solve. These two books claim to work with raw websites (e-commerce, business sites, even intranet), but I'm not sure if everything about web usability is applicable to web application usability. They sure talk about always having available (and usable) the Back button, to focus on short information rather than big amounts of text, etc., but they could be inaccurate in deeper problems that may be easier (or just skippable) in regular websites. Has anybody some experience in this field and could tell me if both web applications and websites share their usability issues? Thanks in advance Edit: Quoting Wikipedia, a website is a collection of related web pages containing images, videos or other digital assets, and a web application is an application that is accessed over a network such as the Internet or an intranet. To sum up, both shows/lets you search/produce information but websites are "simple" in interaction and keep the classics of websites (one-click actions) and the other one is closer to desktop applications in the meaning of their uses and ways of interaction (double click, modal windows, asynchronous calls [to keep you in the same "environment" instead of reloading it] etc.). I don't know if this clarifies the difference. Edit 2: Quoting @Victor and myself, a website is anything running in your browser, but a web application is somewhat running in your browser that could be running in your desktop, with similar behaviors and features. Gmail is a web application that could replace Outlook. GDocs could replace Office. Grooveshark could replace your music player, etc.

    Read the article

  • 100% Product Coverage in EBS CRM Communities

    - by Oracle_EBS
    Starting June 1st we are now providing 100% coverage for the entire Oracle CRM product line! To facilitate this growth we have made the following changes: Quoting, Telesales, Mobile Field Service and Lease and Finance Management have all been decommissioned and their content moved to their respective communities. Quoting and Telesales are now covered in the newly renamed Sales, Marketing & Common Apps community. Mobile Field Service is now covered in the Field Service Product Family community which used to be called Depot Repair. Lease and Finance Management is now under Contracts. The CRM Communities are an excellent channel for collaborating on issues that are not highly time sensitive or complex. Check with Oracle experts and Industry Peers as they can provide a clue or a nudge toward an answer or a confirmation on a workaround. Some of the best and brightest will be there to assist you. Check the News & Announcement regions for an updated list of covered products. Here are links to the current CRM communities. Service Install Base Contracts CRMO Field Service Product Family Sales, Marketing & Common Apps Trade Management Sales Compensation

    Read the article

  • Regex & BBCode - Perfecting Nested Quote

    - by Moe
    Hey there, I'm working on some BBcode for my website. I've managed to get most of the codes working perfectly, however the [QUOTE] tag is giving me some grief. When I get something like this: [QUOTE=1] [QUOTE=2] This is a quote from someone else [/QUOTE] This is someone else quoting someone else [/QUOTE] It will return: > 1 said: [QUOTE=2]This is a quote from > someone else This is someone else quoting someone else[/QUOTE] So what is happening is the [/quote] from the nested quote is closing the quote block. The Regex I am using is: "[quote=(.*?)\](.*?)\[/quote\]'is" How can I make it so nested Quotes will appear properly? Thank you.

    Read the article

  • Ruby 1.8.7 compatibility

    - by Sebastian
    I had a exception when I switch to Ruby 1.8.7 on Snow Leopard ArgumentError: wrong number of arguments (1 for 0) /Library/Ruby/Gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract/quoting.rb:27:in 'to_s' /Library/Ruby/Gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract/quoting.rb:27:in 'quote' /Library/Ruby/Gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/mysql_adapter.rb:190:in 'quote' /Library/Ruby/Gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:2042:in 'quote_value' /Library/Ruby/Gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:2034:in 'attributes_with_quotes' Application uses Rails 1.2.5: there is no chance to update rails in this app. Somebody have solution?

    Read the article

  • Equivalent of #map in ruby in golang

    - by Oct
    I'm playing with Go and run into something I'm unable to find in Google, although there is certainly something that exists: I'm using the following struct: type Syntax struct { name string extensions *regexp.Regexp } type Scanner struct { classifier * bayesian.Classifier save_file string name_to_syntax map[string] *Syntax extensions_to_syntax map[*regexp.Regexp] *Syntax } I'd like to perform the following using Go and I'm quoting ruby because it's how I'd do that using ruby: test_regexpes = my_scanner.extensions_to_syntax.keys My goal is to get an array of *regexp.Regexp . Any idea on how to do that in a simple way ? Thank you !

    Read the article

  • Is there any evidence that lisp actually is better than other languages at artificial intelligence?

    - by Joe D
    I asked this question on SO but it was closed fairly promptly (within 3 minutes) because it was too subjective. I then thought to ask it here on Programmers, a site for "subjective questions on software development". Quoting from the original question: There seems to be a long-held belief (mainly by non-lispers) that lisp is only good for developing AI. Where did this belief originate? And is there any basis in fact to it?

    Read the article

  • SEO Services Did Not Match Your Expectations?

    It is rather disappointing that everyone blames the SEO for a job done badly. Nobody wants to look at the market that is brimming with buyers willing to pay too little and quoting ridiculously low prices for getting their sites SEOed. No offense meant but aren't the buyers getting what they are willing to pay for?

    Read the article

  • Single quotes vs double quotes

    - by Eric Hydrick
    I just started a job where I'm writing Python after coming from a Java background, and I'm noticing that other developers tend to quote strings using single quotes ('') instead of double quotes (""). For example: line1 = 'This is how strings typically look.' line2 = "Not like this." Is there a particular reason for this other than personal preference? Is this the proper way to be quoting strings?

    Read the article

  • Why does this article state that graduate education liberate one from concerns like the efficiency of hardware-based integers?

    - by kadaj
    Quoting The Evolution of Haskell Programmer, graduate education tends to liberate one from petty concerns about, e.g., the efficiency of hardware-based integers What exactly does this suggest? Is it that after graduation, one gets more interested in abstract ideas so much that he does not think hardware is relevant? Or that hardware is also abstracted and one is more interested in algorithms? I am trying to understand on what grounds the sentence is based.

    Read the article

1 2 3 4 5 6  | Next Page >