Posts

Showing posts from June, 2012

javascript - AJAX Fill Dropdown based on Dropdown Parent -

Image
im wondering what's wrong script, it's not getting values of cities based on country, please see code: controller: hotel private actionresult fillcity(int countryid) { var cities = db.cities.where(c => c.country_id == countryid); return json(cities, jsonrequestbehavior.allowget); } jquery/ajax <script> function fillcity() { var countryid = $('#country').val(); $.ajax({ url: '@url.action("fillcity")', type: "get", datatype: "json", data: { countryid: countryid }, success: function (cities) { $("#city").html(""); $.each(cities, function (i, city) { $("#city").append( $('<option></option>').val(city.id).html(city.name)); }); } }); } </script> view <div

Having trouble with rake assets:precompile - wrong version of ruby on Windows box -

i'm absolutely flummoxed! i'm trying use rake precompile assets on windows development box. i've done before, seems broken. rake assets:precompile and bundle exec assets:precompile both yield message "your ruby version 2.2.3, gemfile specified 2.1.5" ruby -v shows 'ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32] which ruby shows '/c/ruby22/bin/ruby' even adding ruby '2.2.3' second line of gem file doesn't change anything. any ideas i'm missing? much. ok, feel stupid! i editing wrong gemfile.

android - How to save a string globally? -

i want ask if possible store string globally me call in other activity? example string email in code, want save globally can call other activity. i tried using intent carry data not seem work code. private void checklogin(final string email, final string password) { // tag used cancel request string tag_string_req = "req_login"; pdialog.setmessage("logging in ..."); showdialog(); stringrequest strreq = new stringrequest(method.post, appconfig.url_register, new response.listener<string>() { @override public void onresponse(string response) { log.d(tag, "login response: " + response.tostring()); hidedialog(); try { jsonobject jobj = new jsonobject(response); boolean error = jobj.getboolean("error"); // check error node in json

Operator point (.) in java -

i have program made in java (not mine) , i'm trying understand it. there don't understand. this part of code : moduleazote m1 = new moduleazote(); result r1 = new result(); m1.resultsimulationhtml = r1; what don't unserstand : m1.resultsimulationhtml . in moduleazote class, there no attribut , no method resultsimulationhtml . appears twice in class. don't know is. if can explain me type of element operator point(.) refers, helpful ! despite fact instance variables private (in order hide them within class), classes have variables protected or public modifiers. inheriting class means subclass has variables of superclass. if able access variable outside class in declared, either protected or public . most ides provide way view variable comes from, including modifiers may have. additionally, javadocs may source of information.

loops - How to show if date is invalid in javascript -

this tried far still nothing changed. don't start maybe professional can me through this. validation purposes. code: $(function(){ var len = $('#groupcontainer > div').length; var arr = []; for(var i=0; < len; i++){ var number = $('#number_' + [i + 1]); var date = $('#date_' + [i + 1]); var count = + 1; var message =""; console.log(number) var = number.map(function(){ return this.value; }); var b = date.map(function(){ return this.value; }); var newobj = {number: a[0], date: b[0]} arr.push(newobj); } var messages={}; var message=""; for(var c = 0; c < arr.length; c++) { var groupmessage=false; for(var d in arr[c]) { if(arr[c].hasownproperty(d)) { if(arr[c][d] == "") { if(messages[d]==undefined) { messages[d]={groups:[]}; }

plsql - Why will my PL/SQL Coding not work, when trying to create 5 tables and insert 5 samples into each table? -

create table phone_customer( customer_id int not null, first_name varchar2(20) not null, last_name varchar2(20) not null, e_mail varchar2(20) not null, address varchar2(20) not null, first_name varchar (20) not null, city varchar (20) not null, state char (2) not null, age int not null, zip int not null, phone varchar(30) constraint phone_customer_pk primary key (customer_id) ); create table phone_order( order_id int not null, customer_id int not null, item_id int not null, shipping_method_id int not null, shipping_status_id int not null, quantity int not null, shipping_date date, total_due decimal(18,2) credit_card_number char(16) credit_card_expiration varchar2(5) constraint phone_order_pk primary key (order_id), constraint fk_customer_id foreign key(customer_id) references customer(customer_id), constraint fk_item_id foreign key(item_id) references item(item_id), constraint fk_ship

android - How to add icon into option menu? -

Image
i try add icon option menu in app. add icon attribute items icons don't show. <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" > <item android:id="@+id/exit" android:icon="@drawable/abc_ic_go" android:title="@string/exit"/> <item android:id="@+id/about_us" android:title="@string/about_us"/> <item android:id="@+id/help" android:icon="@drawable/abc_ic_go" android:title="@string/help"/> <item android:id="@+id/setting" android:icon="@drawable/abc_ic_go" android:title="@string/setting"/> <item android:id="@+id/search_collection" android:icon="@drawable/search" android:title="@string/search&q

r - How to output the label of points in scatterplot to bash console -

i have simple r-script: args <- commandargs(true) inp <- read.csv(args[1],sep="\t",header=false,stringsasfactors=false) firstcol <- inp$v2 secondcol <- inp$v3 pdf(args[2]) plot(firstcol,secondcol,xlab="#",ylab="maxlength") dev.off() i run bash script generate basic plot. now want use x11() plot directly window , not pdf. what want appear label (in inp$v1 ) of every dot on console when hovering on point or klicking onto it. how do? the identify function lets click on points , returns index value points clicked on used subset vector of labels. for identification when hovering (instead of clicking) can @ htkidentify function in teachingdemos package. edit here example using identify may more want (i tested on windows, not unix/x11): x <- runif(26) y <- rnorm(26) plot(x,y) while(length(tmp <- identify(x,y, plot=false, n=1))) { cat(letters[tmp],'\n') } the plot=false tells identify not put

caching - SharePoint 2010 performance -

i want enhance performance intranet site. every page access takes @ least 6 seconds complete. enabling developer dashboard, notice same operation conducted more 10 times , total lasts 5s. operation "cachedobjectfactory: caching page @ xxxx" or "caching web @ xxx". thought related our custom masterpage. using v4.master, behavior same. more site collection contains subsites, more slow. checked output cache correctly enabled , configured on site collection. tried backup/restore site colleciton on different content database...but no more luck here. it's not related unhealthy sql database. set superuser , superread accounts of site collection account has full control in user policy on hosting web app. still no change. however, installed sp2 (sp1 installed). , hurray! 6s access times become 3s....still slow...u_u' new fresh idea welcome ! screenshot here : https://www.dropbox.com/s/fzis3ofg158h64v/rpst3.png?dl=0

How can I implement Samsung Zirconia license check with Android Studio? -

i have followed samsung zirconia instructions on implementing license checker app. however, when running app, crashed , receive following log message. 10-09 21:13:56.754 1107-1127/? e/androidruntime: java.lang.unsatisfiedlinkerror: dalvik.system.pathclassloader[dexpathlist[[zip file "/data/app/com.apps.ips.teacheraidepro2-1/base.apk"],nativelibrarydirectories=[/vendor/lib, /system/lib]]] couldn't find "libnativeinterface.so" the problem seems besides zirconia.jar file needs in /libs folder, there 3 additional files called libnativeinterface.so need in individual subfolders within libs directory. apparently works fine in eclipse, not working android studio. i find hard believe users working android studio cannot use zirconia protect paid apps. if has advice, please help. ok, managed answer own questions, that's piecing other topics on site. basically needed create folder called jnilibs in /source/main folder of app structure, , copy

mysql - How to connect to remote DB in local phpMyAdmin (WAMP)? -

i'm using wamp server mysql version : 5.6.17 . there way connect remote db local phpmyadmin? i have credentials remote database, can not find way how add connection in local panel. i found on new related config file , or called pma , couldn't found more details it. in config.inc.php under phpmyadmin folder, change value of $cfg['servers'][$i]['host'] 'localhost' ip address of remote db. see http://docs.phpmyadmin.net/en/latest/config.html#cfg_servers_host details.

webstorm - How to create jsdoc types from json schemas -

i have tons of json schema node.js project. can use them in way for: accessing them jsdoc types ".js" code files increase webstorm intellisense accuracy or creating jsdoc type definitions automatically ? the closest have seen suggest vscode's support json schema regard editing json files. i expect given have started support json schema, worth logging issue them regarding extending capabilities of such support. if did , let me know support it!

regression - Python Statsmodels QuantReg Intercept -

problem setup in statsmodels quantile regression problem, least absolute deviation summary output shows intercept. in example, using formula from __future__ import print_function import patsy import numpy np import pandas pd import statsmodels.api sm import statsmodels.formula.api smf import matplotlib.pyplot plt statsmodels.regression.quantile_regression import quantreg data = sm.datasets.engel.load_pandas().data mod = smf.quantreg('foodexp ~ income', data) res = mod.fit(q=.5) print(res.summary()) quantreg regression results ============================================================================== dep. variable: foodexp pseudo r-squared: 0.6206 model: quantreg bandwidth: 64.51 method: least squares sparsity: 209.3 date: fri, 09 oct 2015 no. observations: 235 ti

android - How to save a data retrieved from database into a string? -

is possible save data retrieved database string? for case want save tag_name data database string. can same way done textview? // display product data in edittext txtwelcome.settext(product.getstring(tag_name)); string name = (product.getstring(tag_name)); its absolutely possible,as product.getstring(tag_name) returns string either empty or value,you can store in string. and can store value db string using .tostring() extension

image processing - im newbie in matlab. so i need help. im try do this coding but have this error -

Image
i = imread('data1.jpg') [p3, p4] = size(i); q1 = 50; % size of crop box i3_start = floor((p3-q1)/2); % or round instead of floor; using neither gives warning i3_stop = i3_start + q1; i4_start = floor((p4-q1)/2); i4_stop = i4_start + q1; = i(i3_start:i3_stop, i4_start:i4_stop, :); figure ,imshow(i); i have run code , error " index exceeds matrix dimensions. error in ==> croptry @ 10 = i(i3_start:i3_stop, i4_start:i4_stop, :);" can me fix error? want crop image @ center the error due way call functin size . if matrix i in load image tri-dimensional (n x m x k), have call size way: [p3, p4, p5] = size(i) that is, adding additional parameter (in case "p5"). if call size as: [p3, p4] = size(i) p4 set product of second , third dimension of matrix i updated code i = imread('pdb_img_1.jpg'); % modified call "size" % [p3, p4] = size(i) [p3, p4, p5] = size(i) % increased size of "crop box" q1

How can I find and replace all occurrencies of a character in vim? -

i have strange character in text, how can find of occurrences , replace character? i know if need same thing word can use * , :%s//replacement/g replace occurrences, is there similar characters? yank character register ( a in case): "ayl start substitute command :%s/ use <c-r> a paste register command line. finish command , execute: :%s/<char>/<new-char>/g

amazon web services - AWS S3 - 403 forbidden reading file - Boto Python -

i can create file using boto: s3 = boto.connect_s3(aws_access_key_id='xxxx', aws_secret_access_key='xxx') pb = s3.get_bucket(b_path) k = key(pb) k.name = f_path k.set_contents_from_string(content) when try read same file get: boto.exception.s3responseerror: s3responseerror: 403 forbidden if go s3 web inteface, , set permissions read/write everyone, can access file. ps: when create file, owner user not mine. problem? if third party credentials used upload object your bucket then, default, bucket owner not have ownership of object (the third party does). all can bucket owner in case list object , delete (which allowed because paying storage in bucket). in particular, cannot read or modify object's acl , cannot object (unless owner explicitly grants read permission or makes object public). to have control on object, need uploader supply canned acl gives full control. uploader can supplying acl='bucket-owner-full-control' when calling

c# - Defining a table rather than a range as a PivotTable 'cacheSource' -

i building tool automate creation of excel workbook contains table , associated pivottable. table structure on 1 sheet, data pulled database using tool @ later point. pivottable on second sheet using table previous sheet source. i using epplus facilitate building tool running problems specifying cachesource . using following create range , pivottable: var datarange = dataworksheet.cells[dataworksheet.dimension.address.tostring()]; var pivottable = pivotworksheet.pivottables.add(pivotworksheet.cells["b3"], datarange, name); this sets cachesource to: <x:cachesource type="worksheet" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <x:worksheetsource ref="a1:x2" sheet="dataworksheet" /> or within excel, data source set to: dataworksheet!$a$1:$x$2 this works fine if table size never changes, number of rows dynamic, finding when data refreshed, data read initial range specified. what wan

Open a new view with NavigationView (android) -

Image
i'm beginner android world. created first project testing, use androidstudio , while creating project decided select , use "navigation drawer activity". default android studio creates relativelayout called content_main , when project starts appears in first view. how application looks now: and navigationview this how project looks like: and method switch 1 view other: public boolean onnavigationitemselected(menuitem item) { drawer.closedrawers(); switch (item.getitemid()){ case r.id.nav_main: setcontentview(r.layout.content_main); return true; case r.id.nav_stickers: setcontentview(r.layout.content_stickers); return true; default: toast.maketext(getapplicationcontext(),"something went wrong",toast.length_short).show(); return true; } } i when user click on mainview button in navigationview appear mainview (content_main) , if user cli

javascript - $("header").load('header.html') not loading -

i tried looking answer simple question. tried use answers posted still errors , header not being shown. i have code snippet : <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#header').load('partial/header.html'); }); </script> and html body have div : <div id='header'></div> i getting error cannot load file "partial/header.html" message "cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource." any welcome are sure? build new page of "header.html", copy code, can page , add div of "header".

php - How to paginate with codeigniter 3.0.1 -

i trying create pagination using codeigniter. displays links fine, when click links shows 404 error. how solve this? controller example.php class example extends ci_controller { public function __construct() { parent::__construct(); $this->load->model('donor_model'); $this->load->library('pagination'); $this->load->helper('url'); $this->load->library('form_validation'); } public function get_details() { $config['base_url'] = base_url('info'); $config['total_rows'] = $this->donor_model->count(); $config['per_page'] = 10; $config['uri_segment'] = 3; $choice = $config['total_rows']/$config['per_page']; $config['num_links'] = round($choice); $this->pagination->initialize($config); $page =($this->uri->segment(3)) ? $this->uri->segment(3) : 0; $data['data'] = $th

python - numpy filter points within bounding box -

Image
i have list of 2d points [(x1,y1),(x2,y2),...,(xn,yn)] in numpy, how list of points within bounding box specified corners ((bx1,by1),(bx2,by2)) ? if c++ use ogc "within" specification in boost geometry filter list. right i'm dealing list of indexes nxn 2d numpy array, expect should 1-2 lines of code numpy. using combination of all , logical_and , <= operator, 1 can express main idea in 1 line. import random import numpy np matplotlib import pyplot points = [(random.random(), random.random()) in range(100)] bx1, bx2 = sorted([random.random(), random.random()]) by1, by2 = sorted([random.random(), random.random()]) pts = np.array(points) ll = np.array([bx1, by1]) # lower-left ur = np.array([bx2, by2]) # upper-right inidx = np.all(np.logical_and(ll <= pts, pts <= ur), axis=1) inbox = pts[inidx] outbox = pts[np.logical_not(inidx)] # drawing rect = np.array([[bx1, by1], [bx1, by2], [bx2, by2], [bx2, by1], [bx1, by1]]) pyplot.plot(inbox[:,

android - Too many attribute references warning. Possible causes? -

i developed aplication , noticed lot of " many attribute references" warnings in logcat. w/resourcetype﹕ many attribute references, stopped at: 0x######## i use support.v7.23.1.0 design library. define styles this: <style name="apptheme.description.textview" parent="@android:style/widget.textview"> <item name="android:textcolor">@color/textcolorsecondary</item> <item name="android:textcolorprimary">@color/textcolorsecondary</item> <item name="android:textsize">@dimen/textsizeitemdescription</item> </style> application theme: <!-- base application theme. --> <style name="apptheme" parent="theme.appcompat.light.noactionbar"> <!-- customize theme here. --> <item name="android:textcolorhighlight">@color/colorprimarylight</item> <item name="colorprimary">@

Number formatting does not take into account locale settings. Consider using String.format instead android studio -

here question , solution regarding problem.. em trying pass textview value between different activities, , em getting problem. when execute code, app crashes on opening studentactivity, shows correct result..here code loginactivity.java int = integer.parseint(textview.gettext().tostring()); intent = new intent(loginactivity.this, studentactivity.class); i.putextra("level", a); startactivity(i); studentactivity.java textview.settext(integer.tostring(getintent().getextras().getint("level"))); in studentactivity, integer.tostring(getintent().getextras().getint("level")) => line says number formatting not take account locale settings. consider using string.format instead.please suggest code.. truely appreciated!! regarding warning : "number formatting not take account locale settings. consider using string.format instead android studio", this lint warning called "textview internationalizatio

c# - change active directory password in sharepoint webpart -

i want change active directory password in web part in sharepoint when change password, stored account password in sharepoint not change , error: this operation can performed on computer joined server farm users have permissions in sql server read configuration database. connect server server farm, use sharepoint products configuration wizard, located on start menu in microsoft sharepoint 2010 products. this code change password: public void changepassword(string usrdomain, string username, string oldpassword, string newpassword) { using (principalcontext ctx = new principalcontext(contexttype.domain, usrdomain, username, oldpassword)) { userprincipal user = new userprincipal(ctx); user = userprincipal.findbyidentity(ctx, username); user.changepassword(oldpassword, newpassword); user.save(); } } assuming ad server "in sharepoint farm", have run code account. solution impersonate ad

asynchronous - Arduino - Tone without delay -

i'm trying play tone while changing on lcd display. i've searched around , tried protothreads, seems delay still blocks program. i've tried removing delay altogether, skipped except last note. there way play tone without using delay? (millis perhaps?) sample tone sequence: //beats per minute #define bpm 250 //constants, try not touch, touch anyways. #define q 60000/bpm //quarter note #define w 4*q //whole note #define h 2*q //half note #define e q/2 //eigth note #define s q/4 //sixteenth note void tonefunction() { tone(tonepin,c5,q); delay(1+w); tone(tonepin,c5,q); delay(1+w); tone(tonepin,c5,q); delay(1+w); tone(tonepin,c6,w); } you can set timer , put note changing logic interrupt service routine (isr). each x milliseconds, timer reset , interrupt main loop. isr run , pick next note , call tone function. after exiting isr, program continues point interrupted. i have attached

java - api's used to get data from user pc's in lab monitoring software -

i want monitor labs computer administrators computer. sort of api's can use make kind of product or data clients computer admin computer. it depends on many things, i.e.: what kind of data want collect the os of computers want monitor the permissions have run commands or install software on computers one of popular tools monitoring nagios , , it's open source project. supports multiple protocols , flexible/configurable. afaik protocols involve invoking sort of remote command on monitored system via ssh (nrpe) or http. however, there many other tools (cacti, zabbix, op5...), either free or commercial. find 1 fulfills requirements. on other hand if want monitor network equipment, snmp protocol of choice.

javascript - Detecting an html attribute's value with a userscript? -

i trying make myself personal user script, need detect html attribute's value. example: <div id="a">stuff</div> <div id="b" value="false"></div> how create if statement in script, triggers if "value" attribute of element b turns true? element = document.getelementbyid("b"); if(element != null) { if (element.value == "true") { // } }

compilation - iOS9, bitcode in enterprise app -

please confirm: bitcode intermediate representation of compiled program. apps upload itunes connect contain bitcode compiled , linked on app store. from bitcode (ios, watchos) . it app store compiles , links apps, how enterprise app? i ios9 feature user download required slices device updating app least file size. bitcode enabled default in xcode 7, enterprise app, upload app updates our enterprise server , our client users download our server via links. no app store in process. is ok enterprise app bitcode enabled? if so, own compile & link duty? it absolutely fine if app contains bitcode if not distribute on appstore, app becomes bigger - contains slices object code and bitcode each cpu architecture (more details on topic can found here: bitcode demystified ). i'd recommend disable bitcode since there no appstore phase in distribution model , nobody can take care of it. if still want achieve goal (smaller app size), can emulate app thinning on

printing and exporting Highcharts with logo -

i want add logo when printing , exporting highcharts only. tried exporting , works fine no hope printing. http://jsfiddle.net/andrew_safwat/zt5qlwe1/ $(function () { // create chart $('#container').highcharts({ chart: { events: { load: function () { if(this.options.chart.forexport) { this.renderer.image('http://highsoft.com/images/media/highsoft-solutions-143px.png', 80, 40, 143, 57) .add(); } } } }, series: [{ animation: false, data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); }); any ideas please?

android - Animate RecyclerView onLoad -

i have been looking long time android recyclerview onload animation until have not found helpful. what want have animation when recyclerview loads , displays cells animated. want have animation when recyclerview loads , not when cells loaded viewholder. because when cells loaded viewholder recyclerview animates cells while scrolling , on... don't want no animation while scrolling anymore. and guys know effect implement standard animation effect tableview of ios supports. have found tutorial done do. last example mean. so solutions have found similar one has idea? or way animate cells "not android standard like"? kind regards well 1 way make sure animating entire recyclerview when activity / fragment ready , displayed on screen. instead of animating each individual item in recyclerview, set animation on recyclerview whole "fly" in example, animating translatey element of recyclerview.

Transform the relationship data with weight into a Matrix in python -

input data format that: data.txt col1 col2 weight b 1 c 2 d 0 b c 3 b d 0 c d 0 i want output data format that: result.txt b c d 0 1 2 0 b 1 0 3 0 c 2 3 0 0 d 0 0 0 0 i use pandas in way import pandas pd # read data .csv file df = pd.read_csv('yourdata.csv') # pivot table mat = pd.pivot_table(df,index='col1',columns='col2',values='weight') # rebuild index index = mat.index.union(mat.columns) # build new full matrix , fill nan values 0 mat = mat.reindex(index=index, columns=index).fillna(0) # make matrix symmetric m = mat + mat.t this returns: b c d 0 1 2 0 b 1 0 3 0 c 2 3 0 0 d 0 0 0 0 edit: instead of pivot_table() can use: mat = df.pivot(index='col1',columns='col2',values='weight')

github - what does this git code that I use for merging my branch with master branch actually do? -

i'm new , understand of how i'm using it, when want merge master , add changes don't what's going on. this flow: first edits , commit them my-branch. do git checkout master git pull origin master git checkout my-branch git merge master so think in first line git checkout master i'm switching master branch. i'm not entirely sure means. think means if commit @ point change master directly. know files stay in same shape , maintain of edits. then, have no idea second line git pull origin master in third line git checkout my-branch i'm switching my-branch (again, not entirely sure of implications). then, finally, merge two. git merge master i have no idea unmerged files are, when initiate pull request on git website see nice diff. i'm bit confused why i'm initiating on website "pull request" because seems more commit. git checkout master this switches master branch. changes committed in my-branch ,

sql - Subtotaling with Ranges and Limited Compatibility -

on sql server 2008 r2, trying create stored procedure give user subtotals of commodities based on inputted range. appreciate assistance. however, ran problem in query displays commodities being calculated user ends values exceed inputted range. i'll include sample data on bottom have tried. here's example (that took out columns in clarity in example): table as can tell, range between 2000 , 10000, commodity 998-32 going exceed 10000 in subtotals still displays since each po no individually less 10000. here sample data: drop table ##mytable; create table ##mytable( commodity varchar(15) not null ,po_no integer not null ,line_no integer not null ,po_line_description varchar(82) ,commodity_description varchar(60) not null ,fiscal_year integer not null ,vendor_id integer not null ,vendor_name varchar(20) not null ,quantity integer not null ,unit_cost

access vba - Rearranging the tab order of fields in a sub form in data sheet view -

this ongoing problem, , i'm hoping there property i'm missing. scenario: have form contains subforms. default view property subforms set datasheet. (the main form set single form). due changes in i'm tracking, want include field wasn't part of original record source. so, changed record source (a query) , added field subform. new field added end of datasheet view default. here problem - when i drag column new location on subform (in form view or layout view), not stay put. have made change using form view , layout view, , i've changed tab index property for field proper number.  new position never stays on first, or second, third , fourth try. have tried saving in form view, layout view , design view, have drag column new position , try save again . goes on until access saves change. drag, save, didn't take; drag, save, didn't take; drag... what i'd know - how rearrange columns on form set "datasheet" default view property, , make stic

Is Qml Calendar component going crazy? -

before open bug qt project, i'd ask if i'm doing wrong or qml calendar going crazy. it follows code can used test it: import qtquick 2.5 import qtquick.window 2.0 import qtquick.controls 1.4 import qtquick.controls.styles 1.4 import qtquick.layouts 1.1 window { visible: true width: 1024 height: 768 columnlayout { anchors.fill: parent anchors.margins: 8 calendar { id: calendar layout.fillwidth: true layout.fillheight: true weeknumbersvisible: true selecteddate: new date("2015/01/01") framevisible: true focus: true onvisiblemonthchanged: visiblemonthchangedref.currdate = visibleyear+"/"+visiblemonth onvisibleyearchanged: visibleyearchangedref.currdate = visibleyear+"/"+visiblemonth } label { id: visiblemonthchangedref layout.fillwidth: true

mule - URI params in mulerequester -

i worked mulerequester , used "connector" , "selector" in uri params shown below. <mulerequester:request config-ref="mule_requester" resource="wmq://reply.queue?connector=wmqconnector&amp;selector=jmscorrelationid%3d'#[sessionvars.mycorrelationid]'" doc:name="mule requester" timeout="120000"/> is there list of acceptable uri params mulerequester? couldn't find in documentation. help. it depends on transport. here info on how construct mule endpoint uris. here 3 common ones: connector - name of existing connector use endpoint uri. transformers - defines comma-separated list of transformers configure on endpoint. address - explicitly sets endpoint address specified value , ignores other info in uri. jms have selector , http have method example. here reference: http://www.mulesoft.org/documentation-3.2/display/mule2user/mule+endpoint+uris

powershell - ForEach Item in variable - get it's value -

i have script has 3 textboxes in user can put in information. after put in information, stored in variable this: $v = $test.text $t = $test2.text $w = $test3.text $vtw = $v, $t, $w foreach ($item in $vtw) {write-host "hello"} how can write-host put out value of each variable in $vtw ? at moment output hello hello hello i want 1 (actually value of those) $test.text $test2.test $test3.text i tried this, didn't work. suggestions? $v = $test.text $t = $test2.text $w = $test3.text $vtw = $v, $t, $w foreach ($item in $vtw) {write-host $item} you're joining strings $vtw = $v, $t, $w you should creating array: classified "@" $vtw = @($v,$t,$w)

Javascript seconds to minutes and seconds -

this common problem i'm not sure how solve it. code below works fine. var mind = time % (60 * 60); var minutes = math.floor(mind / 60); var secd = mind % 60; var seconds = math.ceil(secd); however, when 1 hour or 3600 seconds returns 0 minutes , 0 seconds. how can avoid returns minutes? thanks you’re doing wrong. number of full minutes, divide number of total seconds 60 (60 seconds/minute): var minutes = math.floor(time / 60); and remaining seconds, multiply full minutes 60 , subtract total seconds: var seconds = time - minutes * 60; now if want full hours too, divide number of total seconds 3600 (60 minutes/hour · 60 seconds/minute) first, calculate remaining seconds: var hours = math.floor(time / 3600); time = time - hours * 3600; then calculate full minutes , remaining seconds. bonus: use following code pretty-print time (suggested dru) function str_pad_left(string,pad,length) { return (new array(length+1).join(pad)+string).slice(-length

java - trying to write to read and write to a text file in eclipse -

i trying write , read text file name students having kinds of hassles new android programming trying out first time. have looked @ code here , there try , figure out doing wrong cant find 1 specific thing help, question has been asked couple of times, sorry asking again. please see different .xml , .java files below. actual question able write data textfile , main screen click on textfield take edit screen, edit specific field , save text file (this has not been done yet still struggling figure out why writing , reading textfile not working, hope poor attempt @ coding shed light on matter. please don't crucify me bad coding super new android /////////////////////////////add screen.java/////////////////////////////// public class addnew extends activity { private static final string newline = system.getproperty("line.separator"); textview txttext; edittext modules; edittext types; @override protected void oncreate(bundle savedinstancestate){ super.oncreate(sav