Posts

Draw multiple line in jqplot using json Data -

iam trying draw multiple line in jqplot using json data have doubt on jqplot, using json data plot chart in jqplot.i have 2 sets of json data this var jsondata1 = {"priceticks": [{"price":5.5,"tickdate":"jan"}, {"price":6.8,"tickdate":"mar"}, {"price":1.9,"tickdate":"june"}, {"price":7.1,"tickdate":"dec"}]}; var jsondata2 = {"priceticks": [{"price":1.5,"tickdate":"jan"}, {"price":2.8,"tickdate":"feb"}, {"price":3.9,"tickdate":"apr"}, {"price":9.1,"tickdate":"dec"}]}; suppose have javas...

oracle - Creat view with a avg column -

i need create view view uos_vu_student_average, 1 of column requries average grade, sql: create view uos_vu_student_average select student.first_name, student.last_name, student_module.grade student, student_module student_id<120000001 how avg grade in sql? you have use "group by" mathematical function avg ( [ | distinct ] expression ) for example .. select id, avg(salary) tablename group filedname

jdbc error java class trying to connect to linux mysql server -

my error! dbconnection2.java:38: unreported exception java.lang.instantiationexception; must caught or declared thrown class.forname("com.mysql.jdbc.driver").newinstance(); problem: .newinstance(); my code: import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.lang.*; import java.util.*; import java.sql.*; import java.util.stringtokenizer; public class dbconnection2 { string url = "jdbc:mysql://<myserver>/<mydatabase>"; java.sql.connection con = null; string query1; statement stmt; public dbconnection2() { try { //***error here***** class.forname("com.mysql.jdbc.driver").newinstance(); //***error here***** } catch(java.lang.classnotfoundexception e) { system.err.println(e.getmessage()); } try { ...

c# - I have php client and i want to pass encrypted email string from PHP client to wcf service , which encryption technique is best? -

i have php client , want pass encrypted email string php client wcf service , encryption technique best ? what best way encrypt/decrypt data in uniform way ? *there other client in future instead of sending home-brewn encryption on plain http , should use standards exist, namely https .

python - Is there a way to manage authentication for web services with Flask? -

i trying use flask in order provide http based web-services android application. have found flask-login easiest way manage authentication seems oriented template based web application. is there solution web-service based authentication? flask-login solution. can add next decorator views: def login_required(): def wrapper(fn): @wraps(fn) def decorated_view(*args, **kwargs): if not current_user.is_authenticated(): abort(401) # return jsonify(status='logged_off') return fn(*args, **kwargs) return decorated_view return wrapper so if user don't authorized view login_required decorator return 401 unauthorized response (or valid response custom message if want).

How do I get a random number to stay fixed with slick? -

i'm beginner in java slick tools. want make game has different coloured cubes randomly placed within area of window. i use 2 for-loops , call random number in render. cubes placed want, problems flicker in colours. guess has how call random number , gets updated fps?! please me!! public void render(gamecontainer gc, statebasedgame sdg, graphics g) throws slickexception { //set background image background = (new image("res/background.png")).getscaledcopy(800, 500); g.drawimage(background, 0, 0); //set gamescape blue = (new image("res/blue.png")).getscaledcopy(20,20); green = (new image("res/green.png")).getscaledcopy(20,20); red = (new image("res/red.png")).getscaledcopy(20,20); int xvalue = 300; int yvalue = 400; (int = 1; < 20; a++) { (int = 1; < 10; i++) { r = rand.nextint(3); if(r==0){g.drawimage(blue,xvalue,yvalue);} else if(...

button - Declare Global Variable inside a Button1_Click -

i tried google abit could'nt find useful. in form1_load have variable dim myvariable string then in button click want myvariable = "hello" problem code tells me myvariable in button_click not declared is. thanks help. move variable field or property in form class. here example code: public class form1 private myvariable private sub form1_load(sender system.object, e system.eventargs) handles mybase.load myvariable = "hello" end sub private sub button1_click(sender system.object, e system.eventargs) handles button1.click messagebox.show(myvariable) end sub end class