Posts

Showing posts from July, 2011

netbeans - no class def found com.sun.management.OperatingSystemMXBean -

i using netbeans ide , java 8 wildfly server. need print total available physical memory of server using com.sun.management.operatingsystemmxbean class (other classes provide memory of runtime) . compiles fine without erros gives no class found error @ runtime. have googled on , tried solutions provided none work.

python - Jython fails to load modules having 'com' as top level namespace -

i have jython module com.xyz.module1 in jython site-packages directory. directory structure below. jython2.7 |---lib |--site-packages |--com |--__init__.py |--xyz |--__init__.py |--module1 |--__init__.py when try import com.xyz.module1 in jython interpretor, importerror thrown ( screenshot ). however, import works fine when rename com.xyz.module1 foo.xyz.module1 . i have read jython doc discourages (but not forbid) use of com top level module namespace. jython library interested in cannot refactored not use com top level namespace. is there other way make import work? i don't think so. there unresolvable conflict here between way python import works , way people name java packages. perhaps overly simplistic, first 'com' encountered during import 1 , 'com', , prevent second 'com' being imported. so, need take different approach when naming jytho

Problems in parsing variables from php to javascript -

scenario: tracking events(add cart, search terms, product views, etc) test e-commerce website(opencart), javascript function written in footer page , these functions called @ button triggers or page loads. problem: while tracking product view event following code added product page, function captureproductview() called footer, , parameters clientid, fname, lname retrieved getclientdetails(); <script> window.onload=function(){ getclientdetails(); captureproductview('<?php echo $product['product_id']; ?>', '<?php echo $product['name']; ?>', '<?php echo $product['price']; ?>', clientid, fname, lname); }; </script> but values php variables $product['product_id'] , $product['name'] , $product['price'] cannot parsed script tag, leaving notice: notice : undefined variable: product in /home/path.../product.tpl on line 29 "

python - PySpark: iterate inside small groups in DataFrame -

i trying understand how can operations inside small groups in pyspark dataframe. suppose have df following schema: root |-- first_id: string (nullable = true) |-- second_id_struct: struct (nullable = true) | |-- s_id: string (nullable = true) | |-- s_id_2: int (nullable = true) |-- depth_from: float (nullable = true) |-- depth_to: float (nullable = true) |-- total_depth: float (nullable = true) so data might this: i to: group data first_id inside each group, order s_id_2 in ascending order append column layer either struct or root dataframe indicate order of s_id_2 in group. for example: first_id | second_id | second_id_order ---------| --------- | --------------- a1 | [b, 10] | 1 ---------| --------- | --------------- a1 | [b, 14] | 2 ---------| --------- | --------------- a1 | [b, 22] | 3 ---------| --------- | --------------- a5 | [a, 1] | 1 ---------| --------- | --------------- a5 | [a, 7] | 2 ---------| ---

java - Why drivers are required for JDBC-ODBC? -

i having little confusion of have studied. have studied drivers software programs required interact external hardware devices printers,mouse,mobiles etc. when connect odbc or jdbc in java,it requires specify drivers. so why need specify drivers since our database( oracle dbc ) software , not hardware. your understanding of driver not correct. driver not hardware external but driver needed special cases of software interaction. in case driver used access filesystem system alone wouldn't able understand. driver used connect database , able interact it. the exact definition is: java database connectivity (jdbc) application programming interface (api) programming language java, defines how client may access database. (taken wikipedia )

c# - Permission issue on server (file i/o write issue) -

there application uploads zip file , extracts in temp folder located under application folder , copies these extracted file different target location , deleted these temporary extracted files temp folder. everything works fine on local machine on iis when place same code on server machine give file i/o permission error ,even though have given full access permission temp , target location folder . can me on this?? here same code string path = server.mappath("~/uploadedzipfiles/" + filename); fileupload1.saveas(path);//saves zip in temporary folder extractzip(filename, targetfolder); //extracts zip folder contains //target folder path you must grant full access permission iis user each folder app need write,delete or edit files. i think aren't well. for more info how add permission , try these: iis_iusrs , iusr permissions in iis8 https://support.gearhost.com/hc/en-us/articles/200342205-how-to-give-write-access-to-files-for-iusr up

android - Delete image files from internal storage and arraylist -

Image
basically, i'm saving images in internal storage's directory. i'm showing them in recyclerview using arraylist. there cross button on each image in row layout(see screenshot). need delete image per position not recyclerview internal directory. able remove image recyclerview's arraylist image in directory not gets deleted. // method in activity show images int. storage recyclerview. private void showimages(){ file directory = new file(file_path); file newfile[] = directory.listfiles(); log.e("sammy_arrlistsize_befor"," "+finalimages.size()); if(finalimages!=null )finalimages.clear(); (int i= 0; < newfile.length; i++) { string path = "file://"+newfile[i].getabsolutepath(); finalimages.add(path); log.e("sammy_imagepath"," "+path); } log.e("sammy_arrlistsize_after"," "+finalimage

matlab - Read line delimited by comma and tab -

i read files containing numbers in each line. here example of format- 0,0,0 1 0 0 0 0.02,0.1,0.98 8.77 0.985292 0.112348 0.112348 0.04,0.2,1.96 8.77 0.985292 0.112348 0.224696 as above shown, first 3 numbers separated commas, after rest numbers separated tab in line. result, not possible use dlmread or textscan. there way solve it? thanks! yes should add 2 parameters in function: delimiter %choose delimiter and multipledelimsasone %treat repeated delimiters one option 1: small "trick" can select more 1 delimiter if give structure input: {',',' '} . result = textscan(fileid,'%f %f %f %f %f %f %f','delimiter',{',',' '},'multipledelimsasone',1); option 2: (that should work) this time don't use multipledelimsasone precise delimiter can comma or tab (with \t). result = textscan(fileid,'%f %f %f %f %f %f %f','delimiter',{',','\t

px4 - What's the effective speed range of px4flow optical flow sensor? -

i‘m reading px4flow_paper , talking principle of px4flow optical flow sensor, can't understand sentence says: "a search range of ±4 pixels in combination 16mm focal length lens corresponds ±1.5 meters per second object @ 1 meter distance @ 250 frames per second." my calculation shows 1.5 meters per second corresponds 16 pixels per 1/250 seconds. calculation method follow: ( ( ( (1.5ms/s) / (250f/s) ) / 1m ) * 16mm ) / 6um = 16 pixels did wrong? wish me understanding actual mean of sentence... thanks in advance !

javascript - Google Analytics Track Order not visible and not working on Google Chrome -

Image
when run code on google chrome not working , not view in page view source , not able track order while code working , visible in page view source on firefox , can track order on google analytics dashboard. so, please suggest me doing wrong. code given below. thanks in advance. **********ecommerce tracking sample code********* <script> (function(i,s,o,g,r,a,m){i[‘googleanalyticsobject’]=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new date();a=s.createelement(o), m=s.getelementsbytagname(o)[0];a.async=1;a.src=g;m.parentnode.insertbefore(a,m) })(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’); ga(‘create’, ‘ua-xxxxxx-12’, ‘auto’); ga(‘require’, ‘ecommerce’, ‘ecommerce.js’); ga(‘ecommerce:addtransaction’, { ‘id’: ‘1234’, // transaction id. required. ‘affiliation’: ‘skinny jeans’, // store name. ‘revenue’: ‘28.8’, // total revenue. ‘shipping’: ‘10.00’, // shipping. ‘tax’: ‘1.89’ // tax. }); ga

python - Scipy hierarchial clustering - clusterize new vector -

i clusterizing bunch of feature vectors using scipy linkage ward method. i want predictive model works in 2 steps: training data clusterized a new vector comes, distance between vector , each cluster computed, new vector assigned "nearest" cluster's label how can compute distances between new vector , precomputed clusters? use euclidean metric? think precomputed clusters have center. can calculate distanc between every center , new vector.

javascript - How to make Vue Routers Page Transition -

i can using vue.js vuerouter. need make page transitions not able to. how can implement code. my code here https://jsbin.com/hopilecona/edit?html,css,js,output please help. page transitions work same normal transitions, can see have wrapped router view in transition, want make sure it's in out-in mode, first page fades out before next fades in: <transition name="fade" mode="out-in"> <router-view></router-view> </transition> now set fade transition need following css: .fade-enter-active, .fade-leave-active { transition: opacity .5s } .fade-enter, .fade-leave-active { opacity: 0 } after it's matter of setting view router normal. here's jsfiddle: https://jsfiddle.net/npe10jot/

asp.net - Web application dynamically adding controls in FormView, columns in GridView and parameters in Store Procedures -

i want make job easier , not time when have additional column add need add column in gridview, formview, stored procedure insert, update, select . possible when add new row in table add dynamically on places in code. example have table this: table (column_id, column_name) (1, 500); (2, 400); (3, 300); (4, 200); (5, 100); what want make these row values (500,400,300,200,100) names of columns in gridview , id names of textboxes in formview. if have add example new row in table: 6, 500 i want new row dynamically added everywhere in code ( gridview, formview, stored procedure insert, update, select ). i more confused , worried adding dynamically new parameter in store procedures, because @ start have declare numbers of parameters sent procedures or there , way make , that. know can send data in 1 parameters , parsing parameter on many parameters have values in parameter don't know practical , reliable. the aim of not have mess every time code when want add or

scala - xgboost4j - spark evaluate requires RDD[(Double, Double)] -

i try use xgboost4j spark 2.0.1 , dataset api. far obtained predictions in following format using model.transform(testdata) predictions.printschema root |-- label: double (nullable = true) |-- features: vector (nullable = true) |-- probabilities: vector (nullable = true) |-- prediction: double (nullable = true) +-----+--------------------+--------------------+----------+ |label| features| probabilities|prediction| +-----+--------------------+--------------------+----------+ | 0.0|[0.0,1.0,0.0,476....|[0.96766251325607...| 0.0| | 0.0|[0.0,1.0,0.0,642....|[0.99599152803421...| 0.0| but generate evaluation metrics. how can map predictions right format? xgboost-4j dmlc on spark-1.6.1 propose similar problem, not work me. val metrics = new binaryclassificationmetrics(predictions.select("prediction", "label").rdd) require rdd[(double, double)] instead of predictions.select("prediction", "label") looks

MySQL csv import is truncating charecters -

i have strange problem. using below code import bunch of csv files mysql database. @echo off setlocal enabledelayedexpansion if /i "%cd%\" neq "%~dp0" pushd "%~dp0" mysql -e "delete software_it.hardware" -u root %%f in ("*.csv") ( set old=%%~dpnxf set new=!old:\=\\! mysql -e "load data local infile '"!new!"' table software_it.hardware columns terminated ',' ignore 1 rows" -u root echo %%~nxf done ) to start off with, csv file coming cmd output. have field called "username" , have observed problem in field, starngely. username has format : trilegal\{username} now, firstly after import, "\" missing , of names have first charecter missing after "\". i guessing wrong because of presence of "\". thought problem table , hence used gui way of importing. gui way imported fine. used same table import using above code , same problem again.

Adding one of my NuGet packages to a project pulls in a bunch of .NET Core assemblies that are not referenced -

Image
i have project built nuget package, .net 4.6.2 class library. when pull project, wants add bunch of references .net core assemblies. project not .net core, , in nuget package manager none of these referenced, nor referenced in references folder. here screenshot: i did find in files them , there no results. project it's trying pull in looks in nuget: note there none of system.xxx references in initial screenshot. the packages.config matches included packages screenshot above - no reference system.xxx libraries. can explain behaviour can fix it?

java - Issue in conflict in stash -

this scenario i did change on file a. i created new file b do stash do change in file a. do commit do use stash call status -> 1 file in conflit didn't file untracked b. it occured in scenario without conflict working ok i using jgit org.eclipse.jgit,3.4.2.201412180340-r code stash @override protected boolean handlepost(requestinfo requestinfo) throws servletexception { jsonobject requestpayload = requestinfo.getjsonrequest(); httpservletrequest request = requestinfo.request; httpservletresponse response = requestinfo.response; repository db = requestinfo.db; string indexmessage = requestpayload.optstring(gitconstants.key_stash_index_message); string workingdirectorymessage = requestpayload.optstring(gitconstants.key_stash_working_directory_message); boolean includeuntracked = requestpayload.optboolean(gitconstants.key_stash_include_untracked, false); try { git git = new git(db); stashcreatecommand stashcreate = git.stashcreate(); stashcreat

sap.m - State of ColumList in SAPUI5 -

i have sapui5 m.columnlist contained inside m.table. supposed click on 1 of item of columnlist takes new page. new page when navigate old page, list scrolls top. wished maintain state clicked , item selected selected previously. getting no idea ho go ahead this.

python - How to Calculate power spectral density using USRP data? -

i wanted plot graph between average power spectral density(in dbm) , frequency (2.4 ghz 2.5 ghz). the basic procedure used earlier power vs freq plot store data generated "usrp_specteum_sense.py" time period , taking average. can calculate psd power used in "usrp_spectrum_sense.py"? there way calculate psd directly usrp data? there other apporch can used calculate psd using usrp desired range of frquency?? ps: found out psd() in matplotlib, can use solve problem?? i wasn't 100% sure whether or not mark question duplicate of retrieve data usrp n210 device ; however, since poster of question confused , question, let's answer in concise way: what sdr device usrp give digital samples. these nothing more or less adc (analog-to-digital converter) makes out of voltages sees. then, numbers subject dsp chain frequency shifting, decimation , appropriate filtering. in other words, discrete complex signal's envelope coming usrp should proport

Ionic building an IOS applicaiton -

i have finished building , compiling android version of application windows laptop. but run on ios, supposed copy application folder mac computer , run "ionic run ios"? follow these steps. check whether ionic installed in mac typing ionic -v . if ionic installed, type following commands: ionic platform add ios . ionic build ios . if ionic not installed yet, first install node.js in mac. then install cordova , ionic using command: npm install -g cordova ionic once done installation, use above commands adding platform , build. then able see xcode file in platform folder ios. then can ask ios developer generate ipa file ios build.

java - Load lazy objects only when needed -

i using hibernate 4.3 .now scenario in app have 1 parent table contains foreign key referenced address table.address having @manytoone(fetch = fetchtype.lazy) in parent dto.now want is case 1) need fetch data parent table when user of type parent login don't want load address in case. case 2) when parent goes edit his/her personal information need load parent along address i tried fallowing code servlet gsonbuilder builder = new gsonbuilder(); builder.registertypeadapterfactory(hibernateproxytypeadapter.factory); gson gson = new gson(); int parentid = integer.parseint(request.getparameter("parentid")); return gson.tojson(api.getparentdetails(parentid)); getparentdetails() method public hashmap getparentdetails(int parentid) throws exception { parent parentdetails; responsehashmap = util.getinitialhashmap(); try { session.gettransaction().begin(); query q = session.createquery(&q

python - having trouble with mysql migration (can't multiply sequence by non-int of type 'tuple') -

i havnig troulble migrating..i first tried python manage.py migrate qablog and didn't work. tried python manage.py migrate qablog --fake-initial and didn't work too.. googled again , people talking changing settings.py changed things changing use_tz false .. python manage.py makemigrations qablog worked though...can me this? .. python version: 3.4.4 mysql server version: 5.7 django version: 1.10.3 the error log below: c:\inetpub\wwwroot\test>python manage.py migrate qablog --fake-initial operations perform: apply migrations: qablog running migrations: applying contenttypes.0001_initial... faked applying auth.0001_initial... ok applying qablog.0001_initial... ok traceback (most recent call last): file "manage.py", line 22, in <module> execute_from_command_line(sys.argv) file "c:\python34\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line utility.execute() fi

ruby - Nginx multiple hosts with Rails -

i have 2 apps in ruby on rails. + passenger. @ /var/www/app1 , /var/www/app2 . want use prefix in url determine 1 wanna hit. so let's http://example.com/app1/users?order=id goes app1 , http://example.com/app2/items goes app2. how can achieve this? tried solve using proxy did success. update: here tries. not sure doing right. location ~ ^/app1 { rewrite /app1(.*) /$1 break; proxy_pass http://127.0.0.1:9111; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; proxy_set_header x-forwarded-proto $scheme; proxy_redirect off; } location ~ ^/app2 { rewrite /app2(.*) /$1 break; proxy_pass http://localhost:9112; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; proxy_set_header x-forwarded-proto $scheme; } server { listen 9112; listen [::]:9112; error_log /usr/local/var/log/nginx/error.log; # self signed certs generated ssl-cert packa

javascript - Change text with CSS -

i'm trying change text script generated 3rd party. <select class="crm-webform-input" name="lead_uf_crm_1478349480" id="lead_uf_crm_1478349480" style=""> <option value="" style="">not selected</option> <option value="54">mere end 30.000 kr.</option> </select> i'm trying change value "not selected". my code here : (site in danish) i can't control script, css. anyone knows how can change text? maybe using :before :after or smth? you can't. css allows style page (colors, font size, etc.) only.

javascript - Best way to build JSON with JS -

this question has answer here: convert js object json string 19 answers i've got questionnaire page on website using bootstrap/jquery. have 2 forms: person , business , each of has lot of checkboxes, input elements , etc. on backend side await json file parse after user form completed. what best practices build json file according following situation. should pure js script in end of page or there better way it? for easy use , backward compatibility can use http://malsup.com/jquery/form/ or pick data 1 one inputs have , build object want send server, @ end send using jquery or convert json , want using: var jsonstr = json.stringify(myobjectfromforminputs);

javascript - Uploading image in ipad is too slow -

i'm trying upload image ipad camera takes 15 - 20 seconds uploaded, in personal computer takes 1 - 2 seconds same picture load, here code: <input id="idrightside" style="display: none;" name="file" multiple="true" type="file" label="select file aaa" id="uploader" onchange='angular.element(this).scope().uploadimage(this.files, "rightside")' accept="image/*" /> <img ng-src="/imagesxp/{{image}}" />

sql - disable one parameter in ssrs depending on value of another parameter in Microsoft SSRS report -

Image
i have parameter ssidname have values. i hve parameter graphview contains 2 values 1.network specific , 2. wifi/ip specific. i have created dataset naming "getipsssid" fetch ip values present ssid(from parameter ssid name) database. below query dataset "getipsssid" select iporserialnum table ssid in (@ssidname) this dataset "getipsssid" query values(iporserialnum) used parameter "networkip/serialnums" i want query grey out "networkwifiip's" if value entered "graphview=networkspecific" if change query of dataset "getipsssid" as select [wifi_address] + '/' + [serialnumber] "iporserialnum" act_validation_test.dbo.meterfarminventory ssid in (@ssidname) , (@graphview) = 'network specific' it not working. the parameter networkip/serialnum not greyed out. any welcome

Graphhopper: ClassCastException when calculating path with CH Astar/Dikstra Bi -

using wgs84 coordinates can write graph , index disk . in java project read graph , index disk. works fine following code. flagencoder encoder = new carflagencoder(); encodingmanager em = new encodingmanager(encoder); graphbuilder gb = new graphbuilder(em). setlocation(testdir). setstore(true). setchgraph(new fastestweighting(encoder)); // load , use graph graphhopperstorage graph = gb.load(); // load index locationindex index = new locationindextree(graph.getbasegraph(), graph.getdirectory()); if (!index.loadexisting()) throw new illegalstateexception("location index cannot loaded!"); algorithmoptions algoopts = algorithmoptions.start().algorithm(parameters.algorithms.astar_bi). traversalmode(traversalmode.node_based). weighting(new fastestweighting(encoder)). build(); preparecontractionhierarchies pch = new preparecontractionhierarchies(graph.getdirectory(), graph, graph.getgraph(chgraphimpl.class), new fastestweighting(encoder), traversalmode.nod

hibernate - Jpa join fetch sub query -

@query("select p project p join fetch p.notes n order n.date p.id=?1)") project getprojectforemployee(long id); i want select project specific id. p.notes list of notes(onetomany). so, p.notes must order date. thank you

angularjs - Why does this regex work in angular 1 and not in angular 2? -

why regex in angular 1, given as: ng-pattern="/(([\u0030-\u0039\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01bf].*){2,})|^[\u0030-\u0039\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01bf]{1}$/" validates correctly ..ba but translated angular 2 code not. validators.pattern("/(([\u0030-\u0039\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01bf].*){2,})|^[\u0030-\u0039\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01bf]{1}$/") ... having slashes removed: validators.pattern("(([\u0030-\u0039\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01bf].*){2,})|^[\u0030-\u0039\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u01bf]{1}$") i appreciate help.

java - Problems opening PDF from assets -

i have problem when trying open pdf (a.pdf) assets folder. thi java code: package com.tischer.alessandro.ecocardiochecklist; import android.content.context; import android.content.intent; import android.content.res.assetmanager; import android.net.uri; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.util.log; import java.io.file; import java.io.ioexception; import java.io.inputstream; import java.io.outputstream; public class bibliografia extends appcompatactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_bibliografia); assetmanager assetmanager = getassets(); inputstream in = null; outputstream out = null; file file = new file(getfilesdir(), "a.pdf"); try { in = assetmanager.open("a.pdf"); out = openfileoutput(file.getname(), c

java - Get data from table(html) except div tag by jsoup -

i have html code: <table width="100%" cellpadding="5" cellspacing="2" class="zebra"> <tr> <td colspan="5"> <div class="paginator"> <a href="http://some_link">2</a>&nbsp; </div> </td> </tr> <tr> <td><a href="//i_need_only_this_link">some_value</a></td> </tr> <tr> <td><a href="//i_need_only_this_link1">some_value</a></td> </tr> <tr> <td colspan="2"> <div class="paginator"> <a href="http://some_link">2</a>&nbsp; </div> </td> </tr> </table> i use jsoup. how can links except links in div tag? try this, doesn't work. element contains links. org.jsoup.nodes.elements tabl

javascript - Angularjs How to show hidden data from the selected row in a listBox? -

i got this: a table, data of more students...the content id, name, lastname , from.....now added new class project...its called bankaccount the students can have 0 or more accounts... and added them in data-binding process students... now want select student, , show (if any) accounts in listbox on same page...so far have code: the table students... <table border="1" name="tablestud" arrow-selector> <tbody> <tr> <td>id</td> <td>first name</td> <td>last name</td> <td>from</td> </tr> <tr ng-repeat="student in result" ng-class="{'selected':$index == selectedrow}" ng-click="setselected(student,$index)"> <td>{{ student.id }}</td> <td>{{ student.firstn

python - How to run a single test case in nose2 -

i'd run single test contained in subclass of unittest.testcase using nose2 following how run specific test in nose2 , doesn't seem work me. i'm using following example script, i've named mickey_mouse_test.py : import unittest class testmickeymouse(unittest.testcase): def test_1plus1is2(self): self.asserttrue(1+1 == 2) def test_to_uppercase(self): self.assertequal("hello".upper(), "hello") if __name__ == "__main__": unittest.main() if run nose2 mickey_mouse_test in same directory, runs tests in module: kurt@kurt-thinkpad:~/documents/scratch$ nose2 mickey_mouse_test .. ---------------------------------------------------------------------- ran 2 tests in 0.001s ok however, if try run test_to_uppercase error: kurt@kurt-thinkpad:~/documents/scratch$ nose2 mickey_mouse_test.test_to_uppercase e ====================================================================== error: mickey_mouse_test.test_to_u

Vertical scrollbar for frame in Tkinter, Python -

my aim have scrollbar stays @ right-side of full-screen window, allowing user scroll , down through various different widgets (such labels & buttons). other answers i've seen on site, i've come conclusion scrollbar has assigned canvas in order function properly, have tried include in code have not had success with. the below code shows simplified version of i've managed accomplish far: from tkinter import * root = tk() root.state("zoomed") root.title("vertical scrollbar") frame = frame(root) canvas = canvas(frame) label(canvas, text = "test text 1\ntest text 2\ntest text 3\ntest text 4\ntest text 5\ntest text 6\ntest text 7\ntest text 8\ntest text 9", font = "-size 100").pack() scrollbar = scrollbar(frame) scrollbar.pack(side = right, fill = y) canvas.configure(yscrollcommand = scrollbar.set) canvas.pack() frame.pack() root.mainloop() i'm facing 2 issues when running code: one scrollbar inactive, , doesn't allo

mysql - Create EER Model from an existing DB but with the relations done - Workbench -

i'm trying import existing db mysqlq workbench. can this. it's works perfectly. process import tables without relations between them. how can import the db , create eer model relations between them? relationships visual expression of foreign keys. if db tables use foreign keys (actually: storage engine supporting foreign keys) automatically shown in diagram. should clear condition true innodb storage engine.

xaml - Why would Xamarin Forms Activity Indicator not be rendered on iOS? -

i using xamarin forms 2.3.2.127 development of mobile application. i have activity indicator sits within stacklayout, in turn contained within grid row. the activity indicator renders on android, not render on ios. the controls xaml follows: <activityindicator widthrequest="50" color="red" heightrequest="50" verticaloptions="center" isvisible="true" isrunning="true"/> there no bindings applied @ present, , there have been no changes underlying control using customrenderers. any ideas on causing issue, or if there common bugs? has occured before in other projects , rectified without changes randomly. i had same problem & not visible during operation, m using mvvm binding, solved invoking mainthread xaml <activityindicator isvisible="{binding pbvisibility}" isrunning="{binding pbrunning}" color="black" /> viewmodel device.begininvokeonmainthread (()

c# - Not able to find the image by Server.MapPath() -

below code using image not coming, have checked path , correct. system.web.httpcontext.current.server.mappath(@"\images\myapp.png"); may know reason this? try code string root = system.web.httpcontext.current.server.mappath("~/images"); string rootpath = string.format("{0}\\{1}", root, "myapp.png"); add ~ , put bars /

html - Sticky footer with variable height in bootstrap -

Image
i trying sticky footer custom height on website , proving far more difficult had anticipated. here screen shot of footer @ moment: the footer covering contact form because have explicitly set height of 419 px. on page content shorter screen footer sticks bottom fine... because have explicitly set height. here css , html: html { position: relative; min-height: 100%; } body { background: #ffffff; } body > .container { padding-bottom: 100px; } /* footer */ footer { position: absolute; bottom: 0; width: 100%; /* set fixed height of footer here */ height: 419px; background-color: #222; } <!-- latest compiled , minified css --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-bvyiisifek1dgmjrakycuhahrg32omucww7on3rydg4va+pmstsz/k68vbdejh4u" crossorigin="anonymous"> <!doctype htm

Add a dialog box on application start up in c# / Xaml -

an application need fetch email id , password before starting application. need information processing, application build using xaml/c# ? how can achieve using custom dialog box ? thank by default, type "app" autogenerated in new wpf applications (derived application) set startup object (see application properties). may ... a) replace object own type instantiating app , calling app.run() after credentials have been provided. sure declare entry method [stathread]. [stathread] public static int main() { myoperations(); var app = new app(); app.run(); } b) override onstartup in app.xaml.cs: protected override void onstartup(startupeventargs e) { base.onstartup(e); myoperations(); } edit: may have missed point. if aim show wpf window before showing main one, can use option b), may have modify application.current.shutdownmode before showing login mask, or else program terminate after closing it. so, conten

Throw '&' String Url on Oracle stored procedure -

i want call url oracle stored procedure. /* formatted on 11/10/2016 19:04:58 (qp5 v5.185.11230.41888) */ declare req utl_http.req; resp utl_http.resp; value varchar2 (1024); begin req := utl_http.begin_request ('http://11.123.33.32:8002/cool/value?car=ferrari&home=california'); utl_http.set_header (req, 'user-agent', 'mozilla/4.0'); resp := utl_http.get_response (req); loop utl_http.read_line (resp, value, true); dbms_output.put_line (value); end loop; utl_http.end_response (resp); exception when utl_http.end_of_body utl_http.end_response (resp); end; / but cannot read '&' string on oracle, how supposed call url in stored procedure ? you use url encoding . url encoding replaces unsafe ascii characters % followed 2 hexadecimal digits. can replace & equivalent 'safe' version %26 . thus, url become 'http://11.123.33.32:8002/cool/value?car=ferrari%

activerecord - Rails - Has Many multiple nested association -

let's have 3 models: a, b, c. class has_many :bs end class b has_many :cs end what easiest way declare association in can access c's has through b? can call a_object.c_objects . dumb question, i'm kinda stuck. thanks! if have established associations a has many b, , b has_many c then set up. thing adding following code (no database changes needed): class has_many cs, through: :bs end and use a_object.c_objects .