Search Results

Search found 2761 results on 111 pages for 'sequence generators'.

Page 16/111 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • rake test not copying development postgres db with sequences

    - by Robert Crida
    I am trying to develop a rails application on postgresql using a sequence to increment a field instead of a default ruby approach based on validates_uniqueness_of. This has proved challenging for a number of reasons: 1. This is a migration of an existing table, not a new table or column 2. Using parameter :default = "nextval('seq')" didn't work because it tries to set it in parenthesis 3. Eventually got migration working in 2 steps: change_column :work_commencement_orders, :wco_number_suffix, :integer, :null => false#, :options => "set default nextval('wco_number_suffix_seq')" execute %{ ALTER TABLE work_commencement_orders ALTER COLUMN wco_number_suffix SET DEFAULT nextval('wco_number_suffix_seq'); } Now this would appear to have done the correct thing in the development database and the schema looks like: wco_number_suffix | integer | not null default nextval('wco_number_suffix_seq'::regclass) However, the tests are failing with PGError: ERROR: null value in column "wco_number_suffix" violates not-null constraint : INSERT INTO "work_commencement_orders" ("expense_account_id", "created_at", "process_id", "vo2_issued_on", "wco_template", "updated_at", "notes", "process_type", "vo_number", "vo_issued_on", "vo2_number", "wco_type_id", "created_by", "contractor_id", "old_wco_type", "master_wco_number", "deadline", "updated_by", "detail", "elective_id", "authorization_batch_id", "delivery_lat", "delivery_long", "operational", "state", "issued_on", "delivery_detail") VALUES(226, '2010-05-31 07:02:16.764215', 728, NULL, E'Default', '2010-05-31 07:02:16.764215', NULL, E'Procurement::Process', NULL, NULL, NULL, 226, NULL, 276, NULL, E'MWCO-213', '2010-06-14 07:02:16.756952', NULL, E'Name 4597', 220, NULL, NULL, NULL, 'f', E'pending', NULL, E'728 Test Road; Test Town; 1234; Test Land') RETURNING "id" The explanation can be found when you inspect the schema of the test database: wco_number_suffix | integer | not null So what happened to the default? I tried adding task: template: smmt_ops_development to the database.yml file which has the effect of issuing create database smmt_ops_test template = "smmt_ops_development" encoding = 'utf8' I have verified that if I issue this then it does in fact copy the default nextval. So clearly rails is doing something after that to suppress it again. Any suggestions as to how to fix this? Thanks Robert

    Read the article

  • Best suited tool to document message processing done in C written program

    - by user3494614
    I am relatively new to UML and it's seems to be very vast I have a small program which basically receives messages on socket and then depending upon message ID embedded as first byte of message it processes the buffer. There are around 5 different message ID which it processes and communicates on another socket and has around 8 major functions. So program in short is like this. I am not pasting entire .c file or main function but just giving some bits and pieces of it so that to get idea of program flow. int main(int argc, char** argv) { register_shared_mem(); listen(); while(get_next_message(buffer)) { switch((msg)(buffer)->id) { case TYPE1: process1(); answer(); ..... } } } I want to document this is pictorial way like for Message type 1 it calls this function which calls another and which calls another. Please let me know any open source tool which will allow me to quickly draw such kind of UML or sequence diagram and will also allow me to write brief description of what each function does? Thanks In Advance

    Read the article

  • Is there a single query that can update a "sequence number" across multiple groups?

    - by Drarok
    Given a table like below, is there a single-query way to update the table from this: | id | type_id | created_at | sequence | |----|---------|------------|----------| | 1 | 1 | 2010-04-26 | NULL | | 2 | 1 | 2010-04-27 | NULL | | 3 | 2 | 2010-04-28 | NULL | | 4 | 3 | 2010-04-28 | NULL | To this (note that created_at is used for ordering, and sequence is "grouped" by type_id): | id | type_id | created_at | sequence | |----|---------|------------|----------| | 1 | 1 | 2010-04-26 | 1 | | 2 | 1 | 2010-04-27 | 2 | | 3 | 2 | 2010-04-28 | 1 | | 4 | 3 | 2010-04-28 | 1 | I've seen some code before that used an @ variable like the following, that I thought might work: SET @seq = 0; UPDATE `log` SET `sequence` = @seq := @seq + 1 ORDER BY `created_at`; But that obviously doesn't reset the sequence to 1 for each type_id. If there's no single-query way to do this, what's the most efficient way? Data in this table may be deleted, so I'm planning to run a stored procedure after the user is done editing to re-sequence the table.

    Read the article

  • IOS not saving evaluate rule in access-list

    - by DeeJay1
    Hi. I have a basic firewall set up on an pretty od IOS in form of IPv6 access list exterior-in6 evaluate exterior-reflect sequence 1 permit ipv6 any host [my external address] sequence 10 permit tcp any host [my internal address] eq 22 sequence 11 permit icmp any any sequence 800 permit udp any any range 6881 6889 sequence 900 permit tcp any any range 6881 6889 sequence 901 deny ipv6 any any sequence 1000 IPv6 access list exterior-out6 permit ipv6 [my internal subnet] any reflect exterior-reflect sequence 10 Unfortunately the evaluate exterior-reflect sequence 1 line seems to get lost after each reboot, leaving my internal network without access. Any ideas?

    Read the article

  • LINQ: Single vs. SingleOrDefault

    - by Paulo Morgado
    Like all other LINQ API methods that extract a scalar value from a sequence, Single has a companion SingleOrDefault. The documentation of SingleOrDefault states that it returns a single, specific element of a sequence of values, or a default value if no such element is found, although, in my opinion, it should state that it returns a single, specific element of a sequence of values, or a default value if no such element is found. Nevertheless, what this method does is return the default value of the source type if the sequence is empty or, like Single, throws an exception if the sequence has more than one element. I received several comments to my last post saying that SingleOrDefault could be used to avoid an exception. Well, it only “solves” half of the “problem”. If the sequence has more than one element, an exception will be thrown anyway. In the end, it all comes down to semantics and intent. If it is expected that the sequence may have none or one element, than SingleOrDefault should be used. If it’s not expect that the sequence is empty and the sequence is empty, than it’s an exceptional situation and an exception should be thrown right there. And, in that case, why not use Single instead? In my opinion, when a failure occurs, it’s best to fail fast and early than slow and late. Other methods in the LINQ API that use the same companion pattern are: ElementAt/ElementAtOrDefault, First/FirstOrDefault and Last/LastOrDefault.

    Read the article

  • How many bits for sequence number using Go-Back-N protocol.

    - by Mike
    Hi Everyone, I'm a regular over at Stack Overflow (Software developer) that is trying to get through a networking course. I got a homework problem I'd like to have a sanity check on. Here is what I got. Q: A 3000-km-long T1 trunk is used to transmit 64-byte frames using Go-Back-N protocol. If the propagation speed is 6 microseconds/km, how many bits should the sequence numbers be? My Answer: For this questions what we need to do is lay the base knowledge. What we are trying to find is the size of the largest sequence number we should us using Go-Back-N. To figure this out we need to figure out how many packets can fit into our link at a time and then subtract one from that number. This will ensure that we never have two packets with the same sequence number at the same time in the link. Length of link: 3,000km Speed: 6 microseconds / km Frame size: 64 bytes T1 transmission speed: 1544kb/s (http://ckp.made-it.com/t1234.html) Propagation time = 6 microseconds / km * 3000 km = 18,000 microseconds (18ms). Convert 1544kb to bytes = 1544 * 1024 = 1581056 bytes Transmission time = 64 bytes / 1581056bytes / second = 0.000040479 seconds (0.4ms) So then if we take the 18ms propagation time and divide it by the 0.4ms transmission time we will see that we are going to be able to stuff ( 18 / 0.4) 45 packets into the link at a time. That means that our sequence number should be 2 ^ 45 bits long! Am I going in the right direction with this? Thanks, Mike

    Read the article

  • How can I Unescape and Reescape strings in .net?

    - by firoso
    So here's my situation. I am working on an editor for a communications channel that works over an RS232 serial ASCII terminal. Let's not go into detail for that ;-) To simplify, I need a textbox on a WPF control that can take in text like "Commit\r\n" (which is the .net string "Commit\r\n") and convert it back to "Commit\r\n" as a .net string. I was hoping for a string.Unescape() and string.Escape() method pair, but it doesn't seem to exist. Am I going to have to write my own? or is there a more simple way to do this?

    Read the article

  • Writing to a new line of a file in Objective-C

    - by Kulpreet
    For some strange reason, the \n and \r escape sequences do not seem to be working in my code. I want to write each NSString on a new line of the file, but it just appends it the last string on one line. Here's the code: for (Entry *entry in self.entries) { NSString *path = @"/Users/me/File.txt"; NSString *string = (@"%@\r\n", [entry thisEntry]); NSFileHandle *fh = [NSFileHandle fileHandleForWritingAtPath:path]; [fh seekToEndOfFile]; [fh writeData:[string dataUsingEncoding:NSUnicodeStringEncoding]]; [fh closeFile]; } Am I doing something wrong? Forgive me as I am new to Objective-C.

    Read the article

  • Permutation algorithm without recursion? Java

    - by Andreas Hornig
    Hi, I would like to get all combination of a number without any repetation. Like 0.1.2, 0.2.1, 1.2.0, 1.0.2, 2.0.1, 2.1.0. I tried to find an easy scheme but couldn't find so I drawed a graph/tree for it and this screams to use recursion. But I would like to do it without, if this is possible. So could anyone please help me how to do that? Thank you in advance, Andreas

    Read the article

  • Permutatation algorithm without recursion? Java

    - by Andreas Hornig
    Hi, I would like to get all combination of a number without any repetation. Like 0.1.2, 0.2.1, 1.2.0, 1.0.2, 2.0.1, 2.1.0. I tried to find an easy scheme but couldn't find so I drawed a graph/tree for it and this screams to use recursion. But I would like to do it without, if this is possible. So could anyone please help mw how to do that? Thank you in advance, Andreas

    Read the article

  • How (and where) to get aligned tRNA sequences (and import it into R)

    - by Tal Galili
    (This is a database / R commands question) I wish (for my thesis work), to import tRNA data into R and have it aligned. My questions are: 1) What resources can I use for the data. 2) What commands might help me with the import/alignment. So far, I found two nice repositories that holds such data: http://trnadb.bioinf.uni-leipzig.de/Resulthttp://trnadb.bioinf.uni-leipzig.de/Result http://gtrnadb.ucsc.edu/download.htmlhttp://gtrnadb.ucsc.edu/download.html And also the readFASTA command from Biostrings, that does basic importing of the data into R. My problem still remains with how to handle the alignment of the tRNA. Since I am not from the field, I might be missing a very basic answer (like where I should download the data from, or what command to use). If you might be willing to advice me, that would be most helpful. Many thanks in advance, Tal

    Read the article

  • Changing the x-axis of seqlogo figures in matlab

    - by JudoWill
    I'm making a large number of seqlogos programatically. They are hundreds of columns wide and so running a seqlogo normally creates letters that are too thin to see. I've noticed that I only care about a few of these columns (not necessarily consecutive columns) ... most are noise but some are highly conserved. I use something like this snippet: conserve_cell = seqlogo(wide_seqs, 'displaylogo', false); high_bit_cols = any(conserve_cell{2}>1.0,1); [~, handle] = seqlogo(wide_seqs(:,high_bit_cols )); Although when I do this I lose the information about which columns the data came from. Normally I would just change the x-axis of the seqlogo. However, seqlogo's are some sort of crazy java-based object and calls like: set(handle, 'xticklabel', num2str(find(high_bit_cols))) don't work. Any help would be greatly appreciated. Thanks, Will

    Read the article

  • How to preserve &amp; in <pre><code>

    - by Marcy Sutton
    I am having trouble preserving an ampersand in a code example on my blog, because all HTML entities start with &. Any tips? For example: <pre> <code> $pageTitle = str_replace('&', ' &amp;', $page->attributes()->title); </code> </pre> Renders as: $pageTitle = str_replace('&', '&', $page->attributes()->title);

    Read the article

  • Event Tracking

    - by DRapp
    I want to understand event cycles. I have a form with a grid and textboxes. It has a grid, bound to DataTable, and textboxes bound to same table too. I'm trying to debug something and need to know how to identify ALL events fired in the form to see what may solve an issue for me. Anyhow, unless I explicitly subclass every class on my form, and override / attach to every event to my own event handlers, how can I get / listen to all events being fired during a certain action... Such as changing a "Selected" road in a DataGridView. It obviously updates its own "CurrentRow"... I need to know what / how to maybe FORCE a re-loading of SAME CurrentRow. Reason: during a form level "Edit Mode", and I change the content in another "Textbox" control, and reject changes, I need it to simulate the current "Record" is reloaded to go back to its original values.

    Read the article

  • Escape Quote in C# for javascript consumption

    - by Jason
    I have a ASP.Net web handler that returns results of a query in JSON format public static String dt2JSON(DataTable dt) { String s = "{\"rows\":["; if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { s += "{"; for (int i = 0; i < dr.Table.Columns.Count; i++) { s += "\"" + dr.Table.Columns[i].ToString() + "\":\"" + dr[i].ToString() + "\","; } s = s.Remove(s.Length - 1, 1); s += "},"; } s = s.Remove(s.Length - 1, 1); } s += "]}"; return s; } The problem is that sometimes the data returned has quotes in it and I would need to javascript-escape these so that it can be properly created into a js object. I need a way to find quotes in my data (quotes aren't there every time) and place a "/" character in front of them. Example response text (wrong): {"rows":[{"id":"ABC123","length":"5""}, {"id":"DEF456","length":"1.35""}, {"id":"HIJ789","length":"36.25""}]} I would need to escape the " so my response should be: {"rows":[{"id":"ABC123","length":"5\""}, {"id":"DEF456","length":"1.35\""}, {"id":"HIJ789","length":"36.25\""}]} Also, I'm pretty new to C# (coding in general really) so if something else in my code looks silly let me know.

    Read the article

  • Is there a free (as in beer) Flow chart generator for COBOL Code?

    - by btelles
    Hi I've never read COBOL in my life and have been tasked with rewriting the old COBOL code in a new language. Are there any free or free-to-try software packages out there that will generate a flow chart for a COBOL program? I've looked at "Visustin" and "Code Visual to Flowchart" Visustin blanks out part of the code and does random rotations in the demo version, which causes the demo to be less accurate. I couldn't get Code Visual Flow Chart to work correctly with our code. Know of any other packages I might try?

    Read the article

  • Backslashes in gsub (escaping and backreferencing)

    - by polygenelubricants
    Consider the following snippet: puts 'hello'.gsub(/.+/, '\0 \\0 \\\0 \\\\0') This prints (as seen on ideone.com): hello hello \0 \0 This was very surprising, because I'd expect to see something like this instead: hello \0 \hello \\0 My argument is that \ is an escape character, so you write \\ to get a literal backslash, thus \\0 is a literal backslash \ followed by 0, etc. Obviously this is not how gsub is interpreting it, so can someone explain what's going on? And what do I have to do to get the replacement I want above?

    Read the article

  • Delphi / MySql : Problems escaping strings

    - by mawg
    N00b here, having problems escaping strings. I used the QuotedStr() function - shouldn't that be enough. Unfortunately, the string that I am trying to quote is rather messy, but I will post it here in case anyone wants to paste it into WinMerge or KDiff3, etc. I am trying to store an entire Delphi form into the database, rather than into a .DFM file. It has only one field, a TEdit edit box. The debugger shows the form as text as 'object Form1: TScriptForm'#$D#$A' Left = 0'#$D#$A' Top = 0'#$D#$A' Align = alClient'#$D#$A' BorderStyle = bsNone'#$D#$A' ClientHeight = 517'#$D#$A' ClientWidth = 993'#$D#$A' Color = clBtnFace'#$D#$A' Font.Charset = DEFAULT_CHARSET'#$D#$A' Font.Color = clWindowText'#$D#$A' Font.Height = -11'#$D#$A' Font.Name = 'MS Sans Serif''#$D#$A' Font.Style = []'#$D#$A' OldCreateOrder = False'#$D#$A' SaveProps.Strings = ('#$D#$A' 'Visible=False')'#$D#$A' PixelsPerInch = 96'#$D#$A' TextHeight = 13'#$D#$A' object Edit1: TEdit'#$D#$A' Left = 192'#$D#$A' Top = 64'#$D#$A' Width = 121'#$D#$A' Height = 21'#$D#$A' TabOrder = 8'#$D#$A' end'#$D#$A'end'#$D#$A before calling QuotedStr() and ''object Form1: TScriptForm'#$D#$A' Left = 0'#$D#$A' Top = 0'#$D#$A' Align = alClient'#$D#$A' BorderStyle = bsNone'#$D#$A' ClientHeight = 517'#$D#$A' ClientWidth = 993'#$D#$A' Color = clBtnFace'#$D#$A' Font.Charset = DEFAULT_CHARSET'#$D#$A' Font.Color = clWindowText'#$D#$A' Font.Height = -11'#$D#$A' Font.Name = ''MS Sans Serif'''#$D#$A' Font.Style = []'#$D#$A' OldCreateOrder = False'#$D#$A' SaveProps.Strings = ('#$D#$A' ''Visible=False'')'#$D#$A' PixelsPerInch = 96'#$D#$A' TextHeight = 13'#$D#$A' object Edit1: TEdit'#$D#$A' Left = 192'#$D#$A' Top = 64'#$D#$A' Width = 121'#$D#$A' Height = 21'#$D#$A' TabOrder = 8'#$D#$A' end'#$D#$A'end'#$D#$A''' afterwards. The strange thing is that my complete command 'INSERT INTO designerFormDfm(designerFormDfmText) VALUES ("'object Form1: TScriptForm'#$D#$A' Left = 0'#$D#$A' Top = 0'#$D#$A' Align = alClient'#$D#$A' BorderStyle = bsNone'#$D#$A' ClientHeight = 517'#$D#$A' ClientWidth = 993'#$D#$A' Color = clBtnFace'#$D#$A' Font.Charset = DEFAULT_CHARSET'#$D#$A' Font.Color = clWindowText'#$D#$A' Font.Height = -11'#$D#$A' Font.Name = ''MS Sans Serif'''#$D#$A' Font.Style = []'#$D#$A' OldCreateOrder = False'#$D#$A' SaveProps.Strings = ('#$D#$A' ''Visible=False'')'#$D#$A' PixelsPerInch = 96'#$D#$A' TextHeight = 13'#$D#$A' object Edit1: TEdit'#$D#$A' Left = 192'#$D#$A' Top = 64'#$D#$A' Width = 121'#$D#$A' Height = 21'#$D#$A' TabOrder = 8'#$D#$A' end'#$D#$A'end'#$D#$A''");' executes in a MySql console, but not from Delphi, where I pass that command as parameter command to a function which ADOCommand.CommandText := command; ADOCommand.CommandType := cmdText; ADOCommand.Execute(); I can only assume that I am having problems escpaing sequences which contain single quotes (and QuotedStr() doesn't seem to escape backslahes(?!)) What am I doing that is obviously, glaringly wrong?

    Read the article

  • Ruby -- looking for some sort of "Regexp unescape" method

    - by RubyNoobie
    I have a bunch of strings that appear to have been double-escaped -- eg, I have "\\014\"\\000\"\\016smoothing\"\\011mean\"\\022color\"\\011zero@\\016" but I want "\014"\000"\016smoothing"\011mean"\022color"\011zero@\016" Is there a method I can use to unescape them? I imagine that I could make a regex to remove 1 backslash from every consecutive n backslashes, but I don't have a lot of regex experience and it seems there ought to be a "more elegant" way to do it. For example, when I puts MyString it displays the output I'd like, but I don't know how I might capture that into a variable. Thanks! Edited to add context: I have this class that is being used to marshal / restore some stuff, but when I restore some old strings it spits out a type error which I've determined is because they weren't -- for some inexplicable reason -- stored as base64. They instead appear to be 'double-escaped', when I need them to be 'single-escaped' to get restored. require 'base64' class MarshaledStuff < ActiveRecord::Base validates_presence_of :marshaled_obj def contents obj = self.marshaled_obj return Marshal.restore(Base64.decode64(obj)) end def contents=(newcontents) self.marshaled_obj = Base64.encode64(Marshal.dump(newcontents)) end end

    Read the article

  • Clojure: seq (cons) vs. list (conj)

    - by dbyrne
    I know that cons returns a seq and conj returns a collection. I also know that conj "adds" the item to the optimal end of the collection, and cons always "adds" the item to the front. This example illustrates both of these points: user=> (conj [1 2 3] 4) //returns a collection [1 2 3 4] user=> (cons 4 [1 2 3]) //returns a seq (4 1 2 3) For vectors, maps, and sets these differences make sense to me. However, for lists they seem identical. user=> (conj '(3 2 1) 4) (4 3 2 1) user=> (cons 4 '(3 2 1)) (4 3 2 1) Are there any examples using lists where conj vs. cons exhibit different behaviors, or are they truly interchangeable? Phrased differently, is there an example where a list and a seq cannot be used equivalently?

    Read the article

  • windows C system call with spaces in command

    - by myforwik
    I cannot make system calls with spaces in the names and parameters. For example: system("c:\program files\something\example.exe c:\my files\example.txt"); I have tried escaping in every way I know how, and NOTHING works. I have tried: system("\"c:\program files\something\example.exe\" \"c:\my files\example.txt\""); and system("c:\program^ files\something\example.exe c:\my^ files\example.txt"); Neither work. I still get 'c:\program' is not a recongnised internal or external command This is really driving me mad... I need to call and pass parameters that have spaces in them. I cannot use the short notation for reasons I won't go into. I have tried with ' quotes instead of " quotes, still doesn't work. I have tried putting quotes around the whole thing and quotes around the spaces and that doesn't work. Does anyone know how to do it properly?

    Read the article

  • Consequences of an infinite loop on Google App Engine?

    - by Axidos
    I am not a Google App Engine user. However, I understand you're billed for CPU time and other resources. What are the consequences if you happen to create an infinite loop? Will Google ever terminate it, or will you have to do it yourself manually somehow? I'm a hobbyist developer worried about a small error that might end up costing hundreds.

    Read the article

  • Delphi / MySql : Problems escpaing strings

    - by mawg
    N00b here, having problems escaping strings. I used the QuotedStr() function - shouldn't that be enough. Unfortunately, the string that I am trying to quote is rather messy, but I will post it here in case anyone wants to paste it into WinMerge or KDiff3, etc. I am trying to store an entire Delphi form into the database, rather than into a .DFM file. It has only one field, a TEdit edit box. The debugger shows the form as text as 'object Form1: TScriptForm'#$D#$A' Left = 0'#$D#$A' Top = 0'#$D#$A' Align = alClient'#$D#$A' BorderStyle = bsNone'#$D#$A' ClientHeight = 517'#$D#$A' ClientWidth = 993'#$D#$A' Color = clBtnFace'#$D#$A' Font.Charset = DEFAULT_CHARSET'#$D#$A' Font.Color = clWindowText'#$D#$A' Font.Height = -11'#$D#$A' Font.Name = 'MS Sans Serif''#$D#$A' Font.Style = []'#$D#$A' OldCreateOrder = False'#$D#$A' SaveProps.Strings = ('#$D#$A' 'Visible=False')'#$D#$A' PixelsPerInch = 96'#$D#$A' TextHeight = 13'#$D#$A' object Edit1: TEdit'#$D#$A' Left = 192'#$D#$A' Top = 64'#$D#$A' Width = 121'#$D#$A' Height = 21'#$D#$A' TabOrder = 8'#$D#$A' end'#$D#$A'end'#$D#$A before calling QuotedStr() and ''object Form1: TScriptForm'#$D#$A' Left = 0'#$D#$A' Top = 0'#$D#$A' Align = alClient'#$D#$A' BorderStyle = bsNone'#$D#$A' ClientHeight = 517'#$D#$A' ClientWidth = 993'#$D#$A' Color = clBtnFace'#$D#$A' Font.Charset = DEFAULT_CHARSET'#$D#$A' Font.Color = clWindowText'#$D#$A' Font.Height = -11'#$D#$A' Font.Name = ''MS Sans Serif'''#$D#$A' Font.Style = []'#$D#$A' OldCreateOrder = False'#$D#$A' SaveProps.Strings = ('#$D#$A' ''Visible=False'')'#$D#$A' PixelsPerInch = 96'#$D#$A' TextHeight = 13'#$D#$A' object Edit1: TEdit'#$D#$A' Left = 192'#$D#$A' Top = 64'#$D#$A' Width = 121'#$D#$A' Height = 21'#$D#$A' TabOrder = 8'#$D#$A' end'#$D#$A'end'#$D#$A''' afterwards. The strange thing is that my complete command 'INSERT INTO designerFormDfm(designerFormDfmText) VALUES ("'object Form1: TScriptForm'#$D#$A' Left = 0'#$D#$A' Top = 0'#$D#$A' Align = alClient'#$D#$A' BorderStyle = bsNone'#$D#$A' ClientHeight = 517'#$D#$A' ClientWidth = 993'#$D#$A' Color = clBtnFace'#$D#$A' Font.Charset = DEFAULT_CHARSET'#$D#$A' Font.Color = clWindowText'#$D#$A' Font.Height = -11'#$D#$A' Font.Name = ''MS Sans Serif'''#$D#$A' Font.Style = []'#$D#$A' OldCreateOrder = False'#$D#$A' SaveProps.Strings = ('#$D#$A' ''Visible=False'')'#$D#$A' PixelsPerInch = 96'#$D#$A' TextHeight = 13'#$D#$A' object Edit1: TEdit'#$D#$A' Left = 192'#$D#$A' Top = 64'#$D#$A' Width = 121'#$D#$A' Height = 21'#$D#$A' TabOrder = 8'#$D#$A' end'#$D#$A'end'#$D#$A''");' executes in a MySql console, but not from Delphi, where I pass that command as parameter command to a function which ADOCommand.CommandText := command; ADOCommand.CommandType := cmdText; ADOCommand.Execute(); I can only assume that I am having problems escpaing sequences which contain single quotes (and QuotedStr() doesn't seem to escape backslahes(?!)) What am I doing that is obviously, glaringly wrong?

    Read the article

  • Number of 0/1 colorings of a m X n rectangle which have no monochromatic subrectangles with both dimension greater than 1.

    - by acbruptenda
    A m x n rectangular matrix is give, and each cell is to be filled with 0/1 colour. I have to find number of colorings possible so that there is no monochromatic coloured (same colour) sub-rectangle whose both dimension is greater than 1 (eg - 2x2, 2x3,4x3) I have found a slightly different version of it here But they have said nothing about the algorithm. So, I am looking for an algorithm here !!

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >