milil 24 Newbie Poster

I didn't work with NetBeans I use Eclipse so i never look at service tab...
Do you work with Glassfish Derby local database? If you don't work with it you can't see it because you just have .jar who connects on database he can't se where it is... It can be in different country...
But if you use Derby you should see under Glassfish...

milil 24 Newbie Poster

Hmm that is tricky one, because you don't know how much variable need to be assigned, you can build it like compailer, with toknes and grammar but that is complicated. You can try to add new method who goes through input find first "=" and then assign values to some array, when you need to calculate (+,-,*,...) you can just grab values from array and calculate whatever you need...

milil 24 Newbie Poster

Why do you need to see it? Maybe you program terminates after executing that code so you can't see it if your program is not working. If you are connected try to execute some query to se is it working or not...

milil 24 Newbie Poster

Hmm first of all you biggest problem is that you don't have qualified people. I just take a look on Java forum, they can't give proper answer because they don't know it. Try to find "expert" for every "topic" and make him admin for that special area, when I see that someone answer me in 5-10 minute on my question and that answer did help me, I'll be back for sure...

milil 24 Newbie Poster

That error is when you make Jasper Report, I think that when you create Jasper file you didn't go in options and set proper language, for default it is groovy so you need to set Java, so you need to change it and then you can crate file who will work for Java. If you are working in iReport...

milil 24 Newbie Poster

I will do it in different way, use split(" ") method to split the input in array so you get something like this {"8","+","33","+","1345","-","137"} then u can use "switch" with "for" and say someting like this:
case number:
case "-" do...
case "+" do...
case "/" do...
etc...

milil 24 Newbie Poster

I think that you must add all that values in SQL Querry not just:

pstmt.setString(1,"NAME");
pstmt.setString(2,"USN");

Because you have someting like this:
email = ;
What is values for email? Try to put all values in pstmt.

milil 24 Newbie Poster

You can use JSTL tag library.
Import it:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

and then you can call "if" method from taglib:

<c:choose>
    <c:when test="${ok}">
        ...
    </c:when>
    <c:otherwise>
        ...
    </c:otherwise>
</c:choose>

You have much more examples on this link.

milil 24 Newbie Poster

There is a problem with mail.jar for Java. I have the same problem and I found solution, for android you need different mail.jar. You can read it all on this link.

milil 24 Newbie Poster

Hmm there is a good example of 3 different algorithms for sorting.
You can learn about that algorithms on this link.

milil 24 Newbie Poster

Does anyone know the answer to this last question and i have another one...
In which text "code" my program is writing in file when I download a code from a web page? Is it ASC11 or some other? Because when i want to find some code from web page in my file the text is changed...

milil 24 Newbie Poster

You have nice tutorial on youtube... http://www.youtube.com/watch?v=O9tXHmIVP7w

milil 24 Newbie Poster

I need a crtitical information from code, that code is a link but link is splited in two half by Ex: 'ss=\"passiveName\" href=\"http:\/\/www.example.com\/profile.php?id=0000000000\" data-hovercard=\"\/ajax\/hoverc'
So i need a program who will go from tag to tag Ex: tag1 'ss=\"passiveName\" href=\"http:\/\/' tag2 '\' and tag3 in this ex: '\" data-hovercard=\"\/ajax\/hoverc'
And then write this in new file 'www.example.com/profile.php?id=0000000000' or program who just extract ID of a file... but that program must continue to looking for new link's between tags...

And nobody didn't answer me is it possible that my program:

filehandle = p.cevapi()
myFile = open('kod1.txt','w')
for lines in filehandle:
    
    myFile.write(lines)
   
myFile.close()

'p.cevapi' is return of the function so the code of page is in there, my question is: is it possible that my program goes just to 72 000 char but in source code that line have 150 000...?

milil 24 Newbie Poster
false;}" title="Search"><span class="hidden_elem">Search</span></button></span></span></div></div></div><input type="hidden" name="init" id="init" value="quick" /><input type="hidden" name="tas" class="search_sid_input" value="search_preload" /><input type="hidden" name="search_first_focus" id="search_first_focus" value="" /><

all that is from 1 line 1/50 of a line...

so how i will find 'eload" /><i' in this string if you are writing code pls. write how to open file properly... Thanks...

milil 24 Newbie Poster

When I use pyTony's method it look like this:

def between(left,right,s):
    before,_,a = s.partition(left)
    a,_,after = a.partition(right)
    return a

myFile = open('kod1.txt')
for lines in myFile.readlines():
     
    s = myFile.readline()
    print between('<script type="text/ja','" src="http://s',s)
  
myFile.close()

and then it just print 50 empty lines... I use that 'tags' from the kod1.txt

but when i use snippsat's method it look like this:

import re

myFile = open('kod1.txt')
for lines in myFile.readlines():
    
    s = myFile.readline()
r = re.findall(r'\<script type="text/javascript"(\d.*)src.php/v1/yP/r/jMx', s)
print(r)

and it just print this [] i replace 'tags' with something else no work...

milil 24 Newbie Poster

Hello friends i am new on DaniWeb and new in Python...
I have a few problems so i need help...
I have a text document with a code from some web page, how can i extract some string between a two different strings in line and then that stings write in a new file after all that program must continue to search more strings in that same line...
i have 50 lines with 150 000 chr Ex: (',...3627s-/a<<*g12-5<d/ajqjh5i1/*//*,.,.,-,')

EX: " (a,b){var c=encodeURIComponent,d=["//www.google.com/gen_204?atyp=i&zx=",(new Da "
How can i extract just '204?atyp=i&zx'

My string is always between 'google.com/gen_' and '="' in this example so i need a help to write a code that open a file, read from it, extract exact string between two strings in a line write him in a new file and then continue to search in that line and rest of the lines in file...
And is it possible that my program can't see all 150 000 chr in one line on web page because when he write it on new file it has just 72 775 something like that in a single line...
So is it possible to write a program who open's a file, read it, input first string, input second string and write string between this two in a new file...
So if you can write any part of the code and I would be very grateful to you...
Thanks