Posts

Showing posts from April, 2015

scanf in c and relation input buffer -

i try understand relation between scanf , input buffer. use scanf following format string: int z1,z2; scanf("%d %d", &z1,&z2); and try understand why can enter many possible whitespace (enter, blanks, tabs) after type in number 54 , press enter. as far understand every key press put in input buffer until press enter. so if type in 54 , press enter input buffer contains 3 elements, 2 digits , line break. buffer looks [5][4][\n] now scanf/formatstring evaluated left right. first %d matches 54, 54 stored in z1. because of whitespace in format string line break (\n) caused pressing first enter "consumed". so after evaluation of first %d , whitespace (\n) buffer empty again. now scanf tries evaluate second (and last) %d in format string. because buffer empty scanf waits further user input (user input = reads stdin in case keyboard). so buffer state/action sequence is buffer empty -> call of scanf -> scanf blocks user input --> us

Crystal Report 7 Alternate Row Color -

Image
i'm trying make report using crystal report 7. i'm having trouble when tried make odd detail become white , detail become gray here i've tried i'm waiting answer. thx take @ link, might you. http://victoriayudin.com/2009/03/31/alternating-shading-for-lines-in-crystal-reports/ or try this: if recordnumber mod 2 = 0 crwhite else crsilver.

javascript - Undefined variable passing data using service -

i have declared app , have 1 controller (for demonstration purposes): var module = angular.module("app", []) module.controller("modalctrl", ["$scope", function ($scope, dataservice) { $scope.printentity = function () { console.log(dataservice.getentityarray()); } }]); and service: module.factory("dataservice", function () { var entityarrayservice = [1,2]; return { getentityarray: function () { return entityarrayservice; } }; }); when call $scope.printentity view, i'm told dataservice.getentityarray() undefined. i've loaded service dependency , declared entityarrayservice array outside of return statement. i've looked high , low answer no avail. goal share piece of data between 2 controllers, @ minute can't use 1 controller retrieve data. the service isn't loaded dependency. change line: module.controller("modalctrl", ["$scope"

email - Mail client that can handle large mailboxes (thunderbird) -

so got thunderbird handeling mail. have extensions copying , removing duplicated mails. but got larger mailboxes. have 100k mails or without attachments. and if copy mail server local folders following message: "the xxxx folder full , can not contain incoming messages. delete old or unwanted mail , compact folder make room more messages." i thought old message or message if youre disk formatted in fat32 (can't handle files on 4gb) so limit reaching or can copy these folders server local folders. i googled keep going in cycles , can't find solution.

Python itertools - Combining groupby and recipe tools' grouper -

say have following data: data = [['john', 1], ['ada', 2], ['ada', 3], ['paul', 4], ['paul', 5], ['paul', 6], ['kat', 7], ['kat', 8]] i can group entries person groupby : in [37]: itertools import groupby, izip_longest operator import itemgetter name, g in groupby(data, key=itemgetter(0)): print name, list(g) john [['john', 1]] ada [['ada', 2], ['ada', 3]] paul [['paul', 4], ['paul', 5], ['paul', 6]] kat [['kat', 7], ['kat', 8]] i can group every 2 entries use recipe tools' grouper . copy/paste reference: in [38]: def grouper(iterable, n, fillvalue=none): "collect data fixed-length chunks or blocks" # grouper('abcdefg', 3, 'x') --> abc def gxx args = [iter(iterable)] * n return izip_longest(fillvalue=fillvalue, *args) g in grouper(data, 2): print g (['john', 1], ['ad

javascript - Convert datalist option to json -

i have form , have variables include in json object. created function 1 of form fields datalist variable , can't find way covert json. function: $('#mybtn2').click(function() { var form_server = { "id": json.parse($('#id').val()), "type": "service", "name": $("#name").val(), "msg_types": [6,7,8,9], "billing_id": json.parse($('#billing_id').val()), "billing_name": $("#partner").val(), "ips": [$('#ips').val()], "url": $('#callbackurl').val(), }; var json_server = json.stringify(form_server, null, 2); $('#mybtn2').after('<pre>' + json_server + '</pre>'); }); the html form looks this: <label for="id">id: </label> <input id="id" name="id&

javascript - property access using [] array notation -

i newbie js . reading definite guide , came through this, created player object this var player= { name: 'the player', age: 33, address:'street 32' } var addr = ""; (i = 0; < 4; i++) { addr += player["address" + i] + '\n'; } now book says loop add code reads , concatenates address0, address1, address2, , address3 properties of player object. not working.. to add 1 address property player object like player.address = "some street 32"; if want add 4 "address fields"/ properties player object: var player={ name: 'the player', age: 33 }; (i = 0; < 4; i++) { player["address" + i] = "empty"; } console.log( player ); [object object] {   address0: "empty",   address1: "empty",   address2: "empty",   address3: "empty",   age: 33,   name: "the player" }

javascript - jQuery click event stop working in plugin -

i've been trying add event listeners part of plugin. idea simple, goal slider plugin handles 2 dimensions (horizontally , vertically) so have this <div class="tab-container bg-dark-blue" start-tab="home"> <div class="tab-page" x-index="1" y-index="1" id="home"> <h1>x=1, y=1</h1> </div> <div class="tab-page" x-index="1" y-index="2"> <h1>x=1, y=2</h1> </div> <div class="tab-page" x-index="2" y-index="1"> <h1>x=2, y=1</h1> </div> <div class="tab-page" x-index="2" y-index="2"> <h1>x=2, y=2</h1> </div> </div> where tab-page divs absolutely positioned 100% width , height, , tab-container relatively positioned 100% width , height of browser. var __mymethod

get_identity() of Django REST Framework 2 substitute in version 3? -

in drf2 there get_identity() method, can overridden customize matching serialized data database objects. in new version it's gone, there way same thing?

python - Flawed collision detection between rectangles -

Image
i creating physics-based game pygame in player controls ball. control ball, accelerates in specified direction (holding left arrow adds x pixels per frame movement speed). since ball is... well... ball, , pygame doesn't support ball collision detection, created new class own collision method. method has 2 parts: if ball runs corner of rectangle, or if runs side of rectangle. problem concerns circle-to-side collision. the ball based on rect object, , therefore has pesky corners. cannot use simple colliderect method, otherwise situation above detect collision there should none, , overlap first part of collision detection method. instead, opted use collidepoint between rectangle , midpoints on each side of ball's rectangle. finally, heart of issue. mentioned earlier ball accelerates. when ball accelerates point (even though appears standing still) moves far enough rectangle midpoint on circle detect "collision." problem stems fact (for collision on left side

vector - Adding a new binary operator to Python 3 -

i use operator such 'x' give cross-product of 2 vectors. there way add such operator python 3? you cannot supplement python's set of operators , statements directly in python code. however, can write wrapper uses python's language services write pythonesque dsl includes operators want.

osx - OS X El Capitan deny copy file to Safari directory -

Image
in older os x versions can copy file dragging safari directory picture below shows. doesn't work in el capitan: open console, sudo root use [copy] command copy, show below alert: if want work have disable system integrity protection. the sri feature denies writing system protected folders ( info ): paths , applications protected system integrity protection include: /system /usr /bin /sbin apps pre-installed os x paths , applications third-party apps , installers can write include: /applications /library /usr/local

ios - Text inset for UITextField -

i have seen post text inset uitextfield? , still not able figure out. i want uitextfield has 80.0 tall. want text 40.0 below top of uitextfield , 20.0 tall, leaving 20.0 below text padding. current code is. let textbounds: cgrect = cgrect(x: 0, y: 40, width: self.width, height: 20) self.editingrectforbounds(textbounds) self.textrectforbounds(textbounds) the uitextfield subclassed , believe text has 30.0 padding above , below , 20.0 tall or vertically centered within uitextfield . i have rewritten code use uitextfield subclass: class mytextfield: uitextfield { var textbounds: cgrect = cgrectzero override init(frame: cgrect) { super.init(frame: frame) textbounds = cgrectmake(0, 40, self.frame.width, 20) } required init?(coder adecoder: nscoder) { fatalerror("init(coder:) has not been implemented") } override func textrectforbounds(bounds: cgrect) -> cgrect { return textbounds } ove

jboss - Set infinispan entity cache eviction and expiration policies via cli console -

i need add cli command change infinispan entity settings <invalidation-cache name="entity" mode="sync"> <transaction mode="non_xa"/> <eviction strategy="lru" max-entries="10000"/> <expiration max-idle="100000"/> </invalidation-cache> to <invalidation-cache name="entity" mode="async"> <transaction mode="non_xa"/> <eviction strategy="lru" max-entries="10000"/> <expiration lifespan="100000"/> </invalidation-cache> for have 2 commands removing existing setting , creates new 1 without specify eviction , expiration policies. /profile=full-ha/subsystem=infinispan/cache-container=hibernate/invalidation-cache=entity:remove /profile=full-ha/subsystem=infinispan/cache-container=hibernate/invalidation-cache=entity:add(mode=async) how can specify eviction , expiration policies.

How Can I Change Repeating date to one in excel? -

i have below question: on column a1: a16, have repeated dates. on column b1:b16, have numbers assigned each 1 date on column a. instance, b1 a1, b2 a2 , etc. copy column column c , use data – remove duplicates. now, want have total sum of numbers assigned each exact date on column d (front of column c). have attached example of excel sheet. how can do? 4/4/2015 20000000 4/4/2015 94010000 4/4/2015 9510000 4/9/2015 4/4/2015 50000000 4/13/2015 4/4/2015 14500000 4/14/2015 4/9/2015 200000000 4/19/2015 4/9/2015 200000000 4/27/2015 4/13/2015 672716000 4/14/2015 28448000 4/19/2015 26168000 4/19/2015 26168000 4/19/2015 18568000 4/19/2015 18568000 4/27/2015 41368000 4/27/2015 13500000 4/27/2015 200000000 4/27/2015 52926000 extract unique items , corresponding totals assuming data located follows: dates range b7:b21 , amounts

Django not taking script name header from nginx -

i using django 1.8 way. i trying deploy multiple django app @ same domain/subdomain different urls using script_name header. my nginx config: location /myapp/ { proxy_pass http://127.0.0.1:8000/; proxy_set_header script_name /myapp; } site loading conf request. meta['script_name'] empty when hover links, showing without 'myapp' in url. any help? i able partially resolve following snippet: http://flask.pocoo.org/snippets/35/ location /myapp { proxy_pass http://127.0.0.1:8000; proxy_set_header host $host; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header x-scheme $scheme; proxy_set_header x-script-name /myapp; } then created wsgi.py file in myapp folder with: from django.core.wsgi import get_wsgi_application _application = get_wsgi_application() def application(environ, start_response): script_name = environ.get('http_x_script_name', '') if script_name:

Could not initialize class MongoRepositoryConfigurationExtension - MongoDB with Spring 4.2 -

i trying build app spring 4.2, spring-data-mongodb-1.8.0 , spring-data-commons-1.11.0. following exception thrown @ runtime. kindly help. have been stuck 2 days. thanks help. console log oct 10, 2015 11:56:16 org.apache.catalina.core.applicationcontext log severe: standardwrapper.throwable org.springframework.beans.factory.beandefinitionstoreexception: unexpected exception parsing xml document servletcontext resource [/web-inf/spring-dispatcher-servlet.xml]; nested exception org.springframework.beans.fatalbeanexception: invalid namespacehandler class [org.springframework.data.mongodb.repository.config.mongorepositoryconfignamespacehandler] namespace [http://www.springframework.org/schema/data/mongo]: problem handler class file or dependent class; nested exception java.lang.noclassdeffounderror: not initialize class org.springframework.data.mongodb.repository.config.mongorepositoryconfigurationextension @ org.springframework.beans.factory.xml.xmlbeandefinitionreader.dolo

python argparse named positional arguments? -

is there way make python's argparse.argumentparser treat command line arguments way python functions treat arguments? arguments can passed without name? see example "integers" in documentation . don't include hyphens , argument treated positional argument. >>> parser = argparse.argumentparser() >>> parser.add_argument('first_supplied_argument', help='help') >>> parser.add_argument('second_supplied_argument', help='help') >>> args = parser.parse_args(['1', '2']) namespace(first_supplied_argument='1', second_supplied_argument='2') edit based on comment: are able supply both positional , optional arguments? think still need supply @ least 1 positional argument. parser = argparse.argumentparser() parser.add_argument('--first', help='help') parser.add_argument('first', nargs='?', help='help') parser.add_argument(&

python - Assign unique id to columns pandas data frame -

hello have following dataframe df = b john tom homer bart tom maggie lisa john i assign each name unique id , returns df = b c d john tom 0 1 homer bart 2 3 tom maggie 1 4 lisa john 5 0 what have done following: ll1 = pd.concat([df.a,df.b],ignore_index=true) ll1 = pd.dataframe(ll1) ll1.columns=['a'] nameun = pd.unique(ll1.a.ravel()) llout['c'] = 0 llout['d'] = 0 nn = list(nameun) in range(1,len(llout)): llout.c[i] = nn.index(llout.a[i]) llout.d[i] = nn.index(llout.b[i]) but since have large dataset process slow. here's 1 way. first array of unique names: in [11]: df.values.ravel() out[11]: array(['john', 'tom', 'homer', 'bart', 'tom', 'maggie', 'lisa', 'john'], dtype=object) in [12]: pd.unique(df.values.ravel()) out[12]: array(['john', 'tom', 'homer', 'bart

Transform irregular quadrilateral to rectangle in python matplotlib -

Image
i have data video. vertices of rectangle points of animal tracking inside rectangle. due image deformation, "rectangle" not regular. want transform data in order plot them in matplotlib rectangle. is there easy method? this maze , trancking . decompose 5 quadrilaterals you can use skimage.transform.projectivetransform scikit-image transform coordinates inside quadrilateral local square space [0, 1] × [0, 1]. for more info on how apply linear algebra solve problem, see projectivetransform.estimate or " projective mappings image warping " paul heckbert, 1999. suppose have corners of quadrilateral in clockwise order : bottom_left = [58.6539, 31.512] top_left = [27.8129, 127.462] top_right = [158.03, 248.769] bottom_right = [216.971, 84.2843] we instantiate projectivetransform , ask find projective transformation mapping points inside quadrilateral unit square: from skimage.transform import projectivetransform t = projectivetransfo

How to input string in a Matlab function -

i want write function loads text file , plots content time. have 20 text files want able choose them. my current not working code: textfile generic variable text123.txt actual name of 1 of files want load function []= plottext(textfile) text(1,:)=load('text123.txt') ; t=0:10; plot(t,text) end i appreciate help!! use importdata instead of load appropriate delimiter. assume used tab. filename = 'num.txt'; delimiterin = '\t'; text = importdata(filename,delimiterin) t=1:10; plot(t,text);

visual studio 2013 - Restore database in SQL LocalDB using VB.NET -

i have project developed in vb.net , sql server 2012 localdb (v11) , need backup/restore facility in application. backup part complete stuck @ restore part. query want worked (and working fine in sql editor) alter database [<.mdf file path>] set single_user rollback immediate restore database [<.mdf file path] disk='<.bak file path' and here code in vb.net trying execute sub restorequery(byval que string) mainform.conn.close() con = new sqlconnection("data source=(localdb)\v11.0;database=master;integrated security=true;") if not con.state = connectionstate.open con.open() cmd = new sqlcommand(que, con) cmd.executenonquery() end sub and here approaches tried far using same query above restorequery("alter database [<.mdf file path>] set single_user rollback immediate") restorequery("restore database [<.mdf file path>] disk='<.bak file path>'") and results in error exc

Android Studio create A folder in R.raw -

i want create folder in r.raw classify media source. but when try read folder in r , can't found folder. r.raw.foldername how can solve problem? you can not add folders raw folder or of folders inside res folder. android supports linear list of files within predefined folders under res. asset folder though, can have arbitrary hyarchie of folders because asset folder not considered resources.

javascript - Make an input field use a certain keyboard? Is it even possible? -

i wondering if possible have input field use input method, , if user using different keyboard on computer, think user using keyboard, or convert keystrokes. not sure how else explain it. for example, if have english keyboard activated , press e-x-a-m-p-l-e, show "example". if have, let's say.., greek keyboard activated , typed same thing, show "εχαμπλε". so, how go making input field convert "εχαμπλε" "example"? though have greek keyboard activated still register in english? i don't know if easy or hard, i'm pretty new html/css/javascript, have no idea how difficult this, or if it's possible. tried looking had no results. you want help/force user type in specific language english. so, if he/she tries type in ie. greek shows in english, right? if yes should lots of coding. mean if want convert 5 language english should have keys word "h" in keyboard words in other languages. , have different keyboard la

I lost my data in IBM bluemix, it say that 'restart by ibmadmin' -

i found out last 2 days data on database lost. 'restart ibmadmin' data important our project , have back. please tell me should recover it. this action occurring these days regarding announcement sent @ end of september customers via mail, important upcoming change “stack” underpins apps hosted on ibm bluemix. apps migration needed, informed.

c++11 - Fixed-size array of objects initialization order in C++/MSVC -

i have class definitions in project, resembles this: class { std::map<type> some_map; }; class b { array_of_a[10]; std::map<type> some_map; }; class c { b array_of_b[15]; std::map<type> some_map; }; class d { c array_of_c[5]; std::map<type> some_map; }; class e { d d; }; it compiles in msvc without errors or warnings, when try run program try create on stack object of class e , sometimes (like 50% of runs) weird "access violation writing" exceptions either std::map, or other stl types mutex use inside class e , being thrown during 1 of above classes constructor invocations. i didn't create explicit threads in program, code runs regular main() , non-deterministic nature of bug gives me feeling msvc did behind-the-scenes optimization me, , decided kind of weird non-serialized initialization me. what happening here , doing wrong in code? wrong initialize static-sized arrays of objects contain stl class fields? the problem the

javascript - Webpack load fonts -

i have code in react element: require('../../style/fonts/somethingstrange.ttf') in webpack.config: { test: /\.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/, loader: 'file-loader?name=fonts/[name].[ext]' } problem: no font on webpages... doesn't webpack let me automatically require fonts? have program else load fonts? you have require fonts inside css files, not inside js/jsx files. example: @font-face { font-family: 'somethingstrange'; src: url('../../style/fonts/somethingstrange.ttf'); }

python 2.7 - How can I prevent Tkinter from passing the event object in a binding? Is there any workaround to do this? -

i want bind method event using tkinter, don't need event object passed 'bind'-method. code clarity: from tkinter import * root = tk() def callback(event): print 'clicked!' frame = frame(root, width=100, height=100) frame.bind('<button-1>', callback) frame.pack() root.mainloop() here, argument event in callback unnecessary. there solution or workaround prevent bind-method passing event object? what mean is, can call this: def callback2(): print 'clicked!' in binding? like: frame.bind('<button-2>', callback2) (which not working, because bin passes event, callback2 takes no arguments). you have 3 broad options, see (in order of increasing complexity): use ignored-by-convention variable name _ : def callback2(_): ... wrap callback when bind it: frame.bind('...', lambda event: callback2()) write decorator ignore event parameter you: def no_event(func): @functools.wrap

javascript - How to add custom CSS/JS to Grails 2.4.x layouts/templates? -

grails 2.4.5 here, believe (correct me if i'm wrong) asset-pipeline plugin default/desired method managing css/js resources. i have custom css/js files included on large subset of gsp pages, , wondering how add them: using asset-pipeline plugin; but... in such way can (somehow) reference them grails-app/views/layouts/special.gsp , , reference special.gsp layout inside each desired gsp page. so again, desired functionality is: grails-app/views/layouts/special.gsp: ------------------------------------- <!doctype html> <html> <head> <title><g:layouttitle default="my app!"/></title> <asset:stylesheet src="my-custom.css"/> <g:layouthead/> </head> <body> <g:layoutbody/> <asset:javascript src="my-custom.js"/> </body> </html> and then, in gsp page want use layout, add <meta name="layout" c

java - JUnit error: Class names, 'org.junit.runner.JUnitCore', are only accepted if annotation processing is explicitly requested -

after compiling java file without errors, when try run class test units following command: javac -cp .:junit-4.12.jar:hamcrest-core-1.3.jar org.junit.runner.junitcore nameoftheclass i following error: error: class names, 'org.junit.runner.junitcore,digpowtest, nameoftheclass', accepted if annotation processing explicitly requested any idea? thanks in advance! are missing ".java" filename on complile? i.e. javac -cp .:junit-4.12.jar:hamcrest-core-1.3.jar org.junit.runner.junitcore nameoftheclass.java

Evaluate an integral in matlab -

i want compute following integral: exp(-y^2/(2*a^2))* cosh(y)*log(cosh(y)) from y=0 y = inf i need integral vector of values a ? how can this? as ikavanagh noticed, can not calculate integral using integral because outruns range of floating point values. thus, using symbolic toolbox possibility. %define function: syms y f=exp(-y^2/(2*a^2))* cosh(y)*log(cosh(y)) now can calculate integral: if=int(f,y,0,inf); at least in matlab version, explicit solution not found, warning raised. need 2 steps, substitute intended values, solve using vpa . in case recent matlab versions find explicit solution, use of vpa unnessecary. solution=vpa(subs(if,a,[1,2,3,4]))

php - How to write Subquery in codeigniter active record for this query -

select from_id, (select count(id) user_messages from_id=1223 , status=1) sent_unread, (select count(id) user_messages from_id=1223 , status=2) sent_read user_messages from_id=1223 group from_id how write above select statement in codeigniter active record? this came with: $this->db->select('from_id, (select count(id) user_messages from_id=1223 , status=1) sent_unread, (select count(id) user_messages from_id=1223 , status=2) sent_read'); $this->db->where('from_id', $member_id); $this->db->group_by('from_id'); $this->db->from('user_messages'); $result = $this->db->get(); //echo $this->db->last_query(); return $result->row(); is right method? try <?php $query="from_id, (select count(id) user_messages from_id=1223 , status=1) sent_unread, (select count(id) user_messages from_id=1223 , status=2) sent_read";

java - Android Install app dialog -

i have pretty simple question somehow not able find solution on stackoverflow. i able start downloading of file webview , able listen broadcast after download completes. here relevant code awebview.setdownloadlistener(new downloadlistener() { public void ondownloadstart(string url, string useragent, string contentdisposition, string mimetype, long contentlength) { // intent = new intent(intent.action_view); // i.setdata(uri.parse(url)); // startactivity(i); final string filename = urlutil.guessfilename(url,contentdisposition,mimetype); request request = new request( uri.parse(url)); request.allowscanningbymediascanner(); request.setnotificationvisibility(downloadmanager.request.visibility_visible_notify_completed); request.setdestinationinexternalpubl

php - Notifications with Amazon SES, through Amazon SNS -

my goal quit simple, want configure amazon sns receive amazon ses emails notifications (bounces, complaints, deliveries). so make configuration doc: http://docs.aws.amazon.com/fr_fr/ses/latest/developerguide/configure-sns-notifications.html into amazon ses > domains > notifications > edit configuration created new ses topic , select in sns topic configuration bounces, complaints , deliveries. in amazon sns, selected topic > actions > subscribe topic , put php script url in endpoint input. my php script basic, see if it's working: $postbody = file_get_contents('php://input'); $requete = "insert amazon(json) values('$postbody')"; $db->exec($requete); but script seems never called... sending emails amazon ses right now. what's wrong in configuration ? did missed somethink ? amazon said: "a confirmation message sent subscribed endpoint. once subscription has been confirmed, endpoint receive notifications topic.&

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: javax.swing.JButton -

i need solve error. the window need register beer not openning. i'm creating simple system can register , search beer's aparrently. here code. package cadastro; import java.awt.container; import java.awt.gridlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.io.file; import java.io.ioexception; import javax.swing.jbutton; import javax.swing.jframe; public class entrada extends jframe { private static final long serialversionuid = 42l; private final container container; private final jbutton btcadastrar; private final jbutton btpesquisar; private final jbutton btsair; public entrada() { super("sistema de avaliação de cervejas"); container = getcontentpane(); container.setlayout(new gridlayout(0,1)); gerenciadorbotoes btmanager = new gerenciadorbotoes(); btcadastrar = new jbutton(); btpesquisar = new jbutton(); btsair = new jbutton(); btcadastrar.settext("cadastrar cerve

vb.net - Mysql query returning null value and 0 results -

i have issue driving me crazy! query = "select formula filterprice idcode='" & txtcodigo.text & "' , (filterdata<='" & cant & "')" dim selectcommand new mysqlcommand(query, conexion.conn) priceselected = conversions.tostring(selectcommand.executescalar()) conexion.desconecta() conexion.conn.dispose() but return nothing, hint? this detailed example data retrieval using parameterised queries : dim con new mysqlconnection("data source=<server name>;initial catalog=<db name>; integrated security=true;") dim cmdselectdata new mysqlcommand("select formula filterprice idcode=@idcode , filterdata<=@cant", con) cmdselectdata.parameters.addwithvalue("@idcode", txtcodigo.text) cmdselectdata.parameters.addwithvalue("@cant", cant) if not con.state=connectionstate.open con.open() priceselected=cmdselectdata.executescalar() con.close

jquery - Highcharts matching specific series points (yaxis) with xaxis? -

i have xml contains "dates" in xaxis , data-points spline series. xaxis : contains last 1 year date current date,(only market days) 250 days year. series : 250 points each dates new : (where removed <samples> 0) dates , sample uneven in numbers. able plot data? my xml : <categories> <dates>2014-10-10</dates> ......... <dates>2015-10-10</dates> </categories> <series> <name>apples</name> <data> <sample>67</sample> .... </data> </series> <series> <name>mangoes</name> <data> <sample>10</sample> <sample>67</sample> ....