I am having a table with nvarchar feild in which values are entered like 1 4 8 25 I want a sql query to find the missing sequence of number in the above series... Thanks in advance...

Member Avatar
Member Avatar
+0 forum 5

I'm trying to code a program that categorized a series to be one of the following for example: 1. "demo" ; "abc" - are both hard ascending series. 2. "aabc" ; "aa" ; "zz" - are an ascending series. 3. "zzabcd" - is a non-ordered series. I wrote the following: ‪ #include‬ <stdio.h> int main() { int c1,c2; int ascend=0; int descend=0; int fixed = 0; c1=getchar(); c2=getchar(); putchar(c1); while ((c1!= EOF) || (c2!=EOF)) } putchar(c2(; if (c1<c2( ascend=1; else if (c1>c2( descend=1; else if (c1==c2( fixed =1; c1=c2; c2=getchar(); { printf("\n%d\n%d\n%d" ,ascend,descend,fixed); can someone help me arrange it and …

Member Avatar
Member Avatar
+0 forum 1

I suppose to write a Java program using array and method follows: It reads a sequence of strings, each on a separate line, and stores them in an array, let call it input1, with one string per cell, in the order they were read. The sequence ends with an empty line: one with a String of length 0. Same thing with 2nd sequence.Then prints the 1st sequence and 2nd sequence. And then create an array that contains all of the elements of the above two arrays. Merging is done by alternating between the arrays: that is, the first cell of …

Member Avatar
Member Avatar
+0 forum 1

The expected outcome dosent agree with result. Following is the code snippet. int a,c; a=10; c=0; c=(--a)+(--a); printf("C: %d", c); printf("\nValue of a: %d", a); I expected C to be 17 i.e (9+8), but it comes out to be 16. And a becomes 8 as expected. When expression is changed to like this. c=(--a); c=c+(--a); Then it works fine. Someone please point out where is loophole in my knowledge. Thanx.

Member Avatar
Member Avatar
+0 forum 6

var pattern =/^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;

Member Avatar
Member Avatar
+0 forum 1

Hi, I am new to C#. Please help me to solve this problem. Given an "**input.txt**", I want to obtain the "**output.txt**" as below: **input.txt** 5,5 A(,)= 4.6; B(,)= 0.1; C(,)= 0.2; D(,)= 1.6; E(,)= 245; F(,)= 3.3; 5,15 A(,)= 6.3; B(,)= 0.9; C(,)= 0.2; D(,)= 1.6; E(,)= 242; F(,)= 2.9; 5,25 A(,)= 7.3; B(,)= 0.2; C(,)= 0.3; D(,)= 1.5; E(,)= 238; F(,)= 1.9 **output.txt** A(5,5)= 4.6; B(5,5)= 0.1; C(5,5)= 0.2; D(5,5)= 1.6; E(5,5)= 245; F(5,5)= 3.3; A(5,15)= 6.3; B(5,15)= 0.9; C(5,15)= 0.2; D(5,15)= 1.6; E(5,15)= 242; F(5,15)= 2.9; A(5,25)= 7.3; B(5,25)= 0.2; C(5,25)= 0.3; D(5,25)= 1.5; E(5,25)= 238; F(5,25)= …

Member Avatar
Member Avatar
+0 forum 7

implement a generic fn mapf with prototype template<class Sequence c , class UnaryFunction) Sequence mapf(Sequence c , UnaryFunction f) for ex if c is a seq containing the seq (3,2,7,6,8) and f is the fn that returns twice it integer agument. then container returned by mafc(c,f) is a list containing the seq(6,4,14,12,8). Any hint/idea to solve it.

Member Avatar
Member Avatar
+0 forum 3

I got a string `\x3Cb\x3EHello, World\x3C\x2Fb\x3E` as a webresponse..i think it means `<b>Hello, World</b>` but i don't know how to unescape that sequence into java string..could anyone please help me with this?? Thank you.

Member Avatar
Member Avatar
+0 forum 21

I have an array of checkbox that is populated with data from mysql database through a query. I can submit the value of the checked checkbox into a table from a database. But I want it to be saved according to the sequence the checkbox was checked by the user. How can I achieve this? Any help will be appreciated. Thanks a lot!

Member Avatar
Member Avatar
+0 forum 8

Assuming i have $a='1024,1025,0000|1020,0000|'; $b='1024,1025,0000,1020,0000,'; i want replace commas (,) in $b with (|) so that $b is equal to $a like this $b='1024,1025,0000|1020,0000|'; if i use $ob=str_replace("0000,","0000|",$b); echo $ob; output works : 1024,1025,0000|1020,0000| But, how to make it with PHP where did i put that this refers to the $a and what if it does not always 0000, with other purposes may be i want replace character referring to another character sequence in the array, so that $b is equal to $a, other sample : eg : $a='1024,1025,1234|1020,0000|'; $b='1024,1025,1234,1020,0000,'; output: $b='1024,1025,1234|1020,0000|'; thanks to your help. regards,

Member Avatar
Member Avatar
+0 forum 6

just wrote a snippet that return true if whole image sequnce exist else returns false, import os def sequenceExists(seqPath,firstFrame,lastFrame,sep=None): """ Checks if sequence exist on disk. seqPath = image sequence path example: J:/Footages/33x01_02a/33x01_02a.%04d.sgi where %04d can be any number like 0001, 231 but not KFd001 string change buildPath at line 20 to customize for compatibility frstFrame = First frame as string lastFrame = Last frame as string """ builPath = "" fnSep = sep or "." seqPathLst = seqPath.split(fnSep) frmNumLen = len(firstFrame) for each in range(int(firstFrame),int(lastFrame)+1): newLen = frmNumLen - len(str(each)) numFmt = newLen* "0" + str(each) buildPath = seqPathLst[0] …

Member Avatar
+0 forum 0

I read the following points related to side effects in gnu c manual it is necessary for the following points to hold true between two sequence points: 1.an object may have its stored value modified at most once by the evaluation of an expression 2.the prior value of the object shall be read only to determine the value to be stored. I am not able to understand the 2 point ..Can someone please explain it with an example..it would be very helpful...

Member Avatar
Member Avatar
+0 forum 1

What would be the best way (or any way) to print out a pattern, that may cut off at any point dependant on the x & y length? for example, if i wanted a pattern 4 up (y = 4) and 14 across (x = 14) I would need it to print: m//m//m//m//m/ m//m//m//m//m/ m//m//m//m//m/ m//m//m//m//m/ I'm thinking a nested for loop so: for(i=1; i<y; i++){ //then another thing inside so that would make 4 lines total, but with the pattern printing along the x axis… but how?? Thanks in advance for any help given. Michael

Member Avatar
Member Avatar
+0 forum 8

Good afternoon everyone. I need to write out a simple validation. It needs to validate only if a user enters certain keywords. Here what I have so far: if(!preg_match("Indiana, Ohio", $state)) { $errors .= "You have entered the wrong state."; } What would be the correct preg_match function to only validate for Indiana and Ohio?

Member Avatar
Member Avatar
+0 forum 3

hi does anyone know any tool that will getnerage code when the sequence dragram is there? apppreciate a reply, thanks

Member Avatar
Member Avatar
+0 forum 3

**PLEASE HELP ME. THIS CODE WILL RETRIEVE THE SEQUENCE YOU MADE. AND WILL OUTPUT IN THE TEXBOX IN THE NEXT FORM. BUT MY PROBLEM IS THAT IT DOES NOT RETRIEVE/GIVE THE GENERATED SEQUENCE. FOR SHORT NO OUTPUT T__T . PLEASE HELP.** Public Sub getJO() Dim oradb As String = "Provider=OraOLEDB.Oracle; Data Source=TRAVELMATE-PC/XE;User Id=cj;Password=me;" Dim cn As New OleDbConnection Dim cm As New OleDbCommand Try cn.ConnectionString = ConfigurationManager.ConnectionStrings("mysys.My.MySettings.ConnectionString").ConnectionString() Dim conn As New OleDb.OleDbConnection(oradb) cn.Open() cm.Connection = cn cm.CommandText = "select ID_SEQ.currval from dual" cm.CommandType = CommandType.Text Dim dr As OleDbDataReader = cm.ExecuteReader() If dr.Read() Then Form4.TextBox1.Text = dr.Item(0).ToString End If Catch …

Member Avatar
Member Avatar
+0 forum 4

I am having two file (File A and File B) of sequence. In File A, thousand of sequences are in fasta format (For example:>seq1 GGTGTTTGCGTGGTTTCATGAAGGTTTTACTaTCCCGAGGAGCCTCATTAAATTGGCAAGA CTCATTAAATTGGCAAGAGGTGTTTGCGTGGTTTTGGCAAGAGGTGTTTGCGGGTTTTAAA >seq2 CTCATTAAATTGGCAAGAGGTGTTTGCGTGGTTTTGGCAAGAGGTGTTTGCGGGTTTTAAA TTTGCGTGGTTTCATGAAGGTTTTACTaTCCCGAGGAGCCTCATTAAATTGGCAAAAAAAA In File B, Two differnt things are avilable first is the sequence number i.e. >seq1 and its position number 10-120 similarly others pattern are like >seq1, 8-84 , >seq2 11-45 are avilable. I want to first search sequence file of File B i.e. >seq in File A if it is matched than extract the specific position of sequence i.e. 10-120 and get output in other file with sequence like >seq1 TTGCGTGGTTTCATGAAGGTTTTACTaTCCCGAGGAGCCTCATTAAATTGGCAAGACTCATTAAATTGGCAAGAGGTGTTTGCGTGGTTTTGG. …

Member Avatar
Member Avatar
+0 forum 2

I am generating the sequence 1,3,8,22,60,.... upto 10^9 the term mod of 10^9+7; However my code is giving inaccurate answers for large value of n. The formula I am using is ((1+Q)^(n+1)-(1-Q)^(n+1))/(4*Q) Here Q is sqrt (3) Here is my code.Can someone point out the error in the code or any ways to remove this problem. Any help will be highly appreciated. #include <iostream> #include<stdio.h> #define big long long int #define foo(b) static_cast<big>(b) big ro(long double x) { if(x-(big)x>=0.5) { return x+1; } else return x; } big m=1000000007; long double Q=1.7320508075688772935274463415058723669428052538103806; using namespace std; long double mod(long double a,big …

Member Avatar
Member Avatar
+0 forum 1

I'm writing some while loops but I feel like there is a better way to write them. [CODE]int i=3; while (i<31) { cout << i << " "; i+=3; } //this one is for the first 10 terms of a sequence starting with 3 and adding 3 each time. int i=2; while (i<50000) { cout << i << " "; i*=2; } //this one is the first 15 terms starting at 2 and doubling each one.[/CODE] Is there some way to let the program know how many variables to show without figuring out how far it has to go? Also, …

Member Avatar
Member Avatar
+0 forum 5

I want to figure out how this loop sequence how would the computer execute this loop by going through all the steps in the picture attached.

Member Avatar
Member Avatar
+0 forum 2

This snippet defines a simple decorator to post-process a function's return value through a sequence of filters. As a first application, the decorator can transform a generator function into a function returning a sequence type (list, tuple, dict).

Member Avatar
Member Avatar
+2 forum 1

Hi i need to create about 100 files in a numbered sequence like : file1.txt,file2.txt,file3.txt . so how can i create these files using c#.

Member Avatar
Member Avatar
+0 forum 2

I want to make a Program that takes two inputs one initial number and one final number for example if I input 1 as the beginning number and 13 as the final, I would like the program to output the Fibonacci sequence: 1,1,2,3,5,8,13.. I hope someone understands it.. Pleease i beg yoou dont put the fibonacci pseudo code I know it very well... Just help me out with this particular problem.. pleease

Member Avatar
Member Avatar
-2 forum 3

Another quick code over breakfast inspired by 'spying' the other forums.

Member Avatar
Member Avatar
+1 forum 5

Hi All I have the following XML (which is generated automatically and cannot be modified): [CODE]<ExportQuery> <ELEC01_SOWaitingParts3> <OrderDtl_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></OrderDtl_PartNum> <JobOper_OprSeq><![CDATA[10]]></JobOper_OprSeq> <Part_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></Part_PartNum> <OrderDtl_OrderNum><![CDATA[18432]]></OrderDtl_OrderNum> <OrderHed_OrderNum><![CDATA[18432]]></OrderHed_OrderNum> <JobHead_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></JobHead_PartNum> <JobHead_JobComplete><![CDATA[Yes]]></JobHead_JobComplete> <JobOper_JobNum><![CDATA[018957]]></JobOper_JobNum> <JobOper_OpCode><![CDATA[GB STORE]]></JobOper_OpCode> <JobOper_OpDesc><![CDATA[GET BATCH STORES]]></JobOper_OpDesc> <JobOper_OpComplete><![CDATA[No]]></JobOper_OpComplete> <JobOper_QtyCompleted><![CDATA[0.00]]></JobOper_QtyCompleted> <FalseJobNum><![CDATA[18957]]></FalseJobNum> </ELEC01_SOWaitingParts3> <ELEC01_SOWaitingParts3> <OrderDtl_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></OrderDtl_PartNum> <JobOper_OprSeq><![CDATA[20]]></JobOper_OprSeq> <Part_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></Part_PartNum> <OrderDtl_OrderNum><![CDATA[18432]]></OrderDtl_OrderNum> <OrderHed_OrderNum><![CDATA[18432]]></OrderHed_OrderNum> <JobHead_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></JobHead_PartNum> <JobHead_JobComplete><![CDATA[No]]></JobHead_JobComplete> <JobOper_JobNum><![CDATA[018957]]></JobOper_JobNum> <JobOper_OpCode><![CDATA[BOX]]></JobOper_OpCode> <JobOper_OpDesc><![CDATA[BOX]]></JobOper_OpDesc> <JobOper_OpComplete><![CDATA[No]]></JobOper_OpComplete> <JobOper_QtyCompleted><![CDATA[0.00]]></JobOper_QtyCompleted> <FalseJobNum><![CDATA[18957]]></FalseJobNum> </ELEC01_SOWaitingParts3> <ELEC01_SOWaitingParts3> <OrderDtl_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></OrderDtl_PartNum> <JobOper_OprSeq><![CDATA[30]]></JobOper_OprSeq> <Part_PartNum><![CDATA[UK MUNSTD 20 BOX OF 100]]></Part_PartNum> <OrderDtl_OrderNum><![CDATA[18432]]></OrderDtl_OrderNum> <OrderHed_OrderNum><![CDATA[18432]]></OrderHed_OrderNum> <JobHead_PartNum><![CDATA[UK MUNSTD 20 BOX OF …

Member Avatar
+0 forum 0

Hi guys, How do i extract a sequences from a fasta file by taking the start and end position from a gene predicted file: here the example the file with the orf statistics is my predicted file and for example the start position for the first orf is 65 and the end is 213. and the fasta file i'm going to search those position is the other one my predicted file looks like this >Seq1 [organism=S.burgodofry... orf00001 65 213 +1 2.93 orf00002 799 2328 +1 7.09 orf00003 2331 3437 +3 6.09 orf00004 3457 4044 +1 6.15 >Seq2 [organism=S.burgodofry... orf00001 55 …

Member Avatar
+0 forum 0

This snippet defines a function to merge sorted iterables containing similar items into a single iterable. Items are supposed to be sorted in ascending order. Only one item per iterable is stored at a time.

Member Avatar
Member Avatar
+0 forum 5

I was given a header file and the main files i have to create the implementation file for the header file I am issues trying to find out where I went wrong in my for loops. Can you point me in the right direction The header file [CODE]// FILE: sequence1.h // CLASS PROVIDED: sequence (part of the namespace main_savitch_3) // There is no implementation file provided for this class since it is // an exercise from Section 3.2 of "Data Structures and Other Objects Using C++" // // TYPEDEFS and MEMBER CONSTANTS for the sequence class: // typedef ____ value_type …

Member Avatar
Member Avatar
+0 forum 2

Write an assembly program, `fsm1234.asm`, that prompts the user for a number and checks it against the fsm in the figure 2. Figure 2. `L={1,2,3,4}` All numbers besides 1 must be preceded AND followed by a 1. So every 2,3 and 4 WILL have a 1 before and after it. Here are some valid inputs: `11112131214141411121, 1214131, 131,14121..` the list is endless! NB: 1 is a valid input aswell. In this case the start state is also the final state my code: INCLUDE Irvine16.inc .data Writestring proto crlf proto Readint proto Writeint proto mg byte "Please enter number ",0 numb …

Member Avatar
+0 forum 0

A C code is written: int i=-1 , j=-1 ,k=0 ,l=2 ,m; m=i++ && j++ && k++ || l++; //Line 3 printf("%d%d%d%d%d",i,j,k,l,m); O/p= 00131. I figured out that the Last variable in Line 3 is incremented only if it is preceeded by || else if preceeded by && it is not incremented. But if we take 3 variables the result is just reverse; int i=-1 , j=-1 ,k=0 ,m; m=i++ && j++ && k++; //Line 3 printf("%d%d%d%d",i,j,k,m); O/p:0010. (and abt the value of m ,its totally unpredictable. May be I'm wrong interpreting.PLz Some one tell me the exact functioning going …

Member Avatar
Member Avatar
-5 forum 4

The End.