Posts

Showing posts from July, 2013

javascript - Automatic Serial Nos in ng-Repeat (Angular) -

Image
i using ng-repeat fill table data in controller (or services). however, need fullfill serial nos in first column automatically. getting static data 1 in columns. html: <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> </head> <body ng-app="myapp" ng-controller="myctrl"> <table> <tr><th>s.no.</th><th>name</th></tr> <tr ng-repeat="x in people"><td>1</td><td>{{x.name}}</td></tr> </table> <script> var app = angular.module('myapp',[]); app.controller('myctrl',function($scope){ $scope.people = [ {name:"peter"}, {name:"lina"}, {name:"roger"} ]; }); </script> </body> </html> output: i want numbers in first column 1, 2, 3, etc. how can achieve ngrepeat ? use $index :

asp.net - Angular 2 import error with RequireJS -

i'm unable import angular2/core due following error: module name "angular2/core" has not been loaded yet context: _. use require([]) this typescript file: import {component, view} "angular2/core"; import {bootstrap} "angular2/platform/browser"; @component({ selector: "menu" }) class menucomponent { isactive(path: string) { return true } } bootstrap(menucomponent); which compiled configuration: { "compileroptions": { "noimplicitany": false, "noemitonerror": true, "removecomments": true, "sourcemap": true, "target": "es5", "module": "commonjs", "outdir": "../wwwroot/js", "experimentaldecorators": true, "emitdecoratormetadata": true }, "exclude": [ "node_modules", "wwwroot" ] } this compiled javascrip

Save textfield's string in an array - Swift -

i creating application that, written string in textfield, saves in array. array showed in tableviewcontroller embedded in mainviewcontroller. situation following. http://i.stack.imgur.com/z5utc.png . want every time tap green "save" button, string wrote in textfield saved , showed in tableview , textfield returns empty, can re-write string, added in array. tableview, in case, shows 2 strings, wrote in same textfield. tried write code 2 viewcontrollers (the mainviewvc , tablevc). mainvc import uikit class mainvc: uiviewcontroller { @iboutlet var txtfield: uitextfield! var embtablevc: tablevc! override func viewdidload() { super.viewdidload() // additional setup after loading view. } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) { if segue.identifier == "embededtablevc" { embtablevc = segue.destinationvie

python - Slice numpy array based on x number of other arrays -

i trying make current code dynamic. meaning should able adjust regardless of number of array inputs of user. current code: main1 = numpy.array([1,2,3,4]) array1 = numpy.array(['a','b','c','b']) my_list1 = ['a','b'] array2 = numpy.array(['cat','dog','bird','cat']) my_list2 = ['cat'] result_array = main1[np.in1d(array1, my_list1) , np.in1d(array2, my_list2)] the desired result of printing out result_array is: array([1, 4]) this because of intersection of a , cat & b , cat . my goal able n number of array1 , array2 ... , n number of my_list1 , my_list2 ... thanks in advance! version more 2 arrays, using logical_and.reduce : array3 = numpy.array(['cat3','dog3','bird3','cat3']) my_list3 = ['cat3'] my_arrays = [array1, array2, array3] my_lists = [my_list1, my_list2, my_list3] res1 = main1[numpy.logical_and.reduce(tuple(np.in1d(

seo - Using noindex and nofollow to avoid duplicate content penalization -

scenario : i own website original content. support categories use creative commons licensed contents, is, of course, duplicate content. question : if want avoid penalization duplicate content , statements true? i should mention original author fair human being. i must use meta noindex avoid robots fetching content. i must use cannonical url metion original content , it's author. i don't need use nofollow meta along noindex, because has other purposes. i don't have use rel="nofollow" on incoming links inside site point duplicate content, because won't indexed anyways, given noindex meta tag. i did research , got it. not sure this, , understand before applying @ all. thank you. in order avoid penalization duplicate content, can of course use meta noindex , rel="nofollow". here syntax: <meta name="robots" content="noindex, nofollow"> this tells robots not index content of page, and/or not scan

bluetooth - gatt.disconnect() is initiated host but not by the app -

Image
i've been breaking head issue.... i send gatt.write command remote device, getting response , not because gatt disconnects @ times app! (when using nrf app writing value doesnt disconnect) when exploring issue wireshark using btsnoop_hci.log see host initiating disconnect, app not sending!!! went on debugger on every possible disconnect. i'm attaching log output:

c# - WPF fixed rows are resizing -

Image
i'm new in wpf , try creat specific usercontrol display data single product. used grid inside usercontrol. create 5 columns , 3 rows. want ot make 4 columns fixed (image, green-clored, blue-colored , column controls) , last column (orange-colored) fill availabel space. here xaml , few screenshots: <grid margin="0,0,0,5" background="#ffdcd9d9" > <grid.columndefinitions> <columndefinition width="80" /> <columndefinition width="70" /> <columndefinition width="70" /> <columndefinition width="70" /> <columndefinition width="*" /> </grid.columndefinitions> <grid.rowdefinitions> <rowdefinition height="auto" /> <rowdefinition height="auto" /> <rowdefinition height="auto" /> <rowdefinition height="auto" /> </g

How can I make a UIView to appear on all my app Screens as long as it is visible iOS objective-c -

Image
i building music application want view show on screens in objective-c ios app, above tab bars (all screens of tab items) when app playing song or song paused. similar iphone/ipad music app shown in image below: you can add view directly uitabbarcontroller 's view. [self.tabbarcontroller.view addsubview:musicplayerview]; this way visible in tabs. just addition, better approach subclass uitabbarcontroller , initialize / add musicplayerview in custom class.

angularjs - check field labels are visible and contain the correct text with Protractor -

i'm trying verify field labels visible. i.e. id, date, amount + description. how can check each < dt > in < dl > the contained in following < dl > element css class rec-details. <dl class="dl-horizontal rec-details"> <dt> id </dt> <dd class="ng-binding"> 1 </dd> <dt> date </dt> <dd class="ng-binding"> 28/01/2015 </dd> <dt> amount (£) </dt> <dd class="ng-binding"> -7.24 </dd> <dt> description </dt> <dd class="ng-binding"> 12345 </dd> so need check within element (with css class rec-details) id, date, amount + description there? how can done protractor? thanks in case, following should work. var recdetails = element(by.css('.rec-details')); var data = recdetails.all(by.css('dd')); var id = data.get(0).gettext().then(function(idtext) { return parseint(idtext);

linux - Negate a command return value condition in bash -

i tried negate following condition: if pgrep "$name" >> /dev/null; # stuff fi at first tried syntax, can found in thread . if ! [[ pgrep "$name" >> /dev/null ]]; # stuff fi while syntax perfect if want compare variables , literals, in case fail following error: watchdog: line 58: conditional binary operator expected watchdog: line 58: syntax error near `"$name"' watchdog: line 58: ` if ! [[ pgrep "$name" >> /dev/null ]]; then' simply use ! to check if failed: if ! pgrep "$name" >> /dev/null; # stuff fi

MySQL GROUP_CONCAT getting data from 2 tables and linking table -

i trying use mysql group_concat aggregate data 2 tables linked linking table. display useful data rather ids. if following query: select pid, group_concat(vid) bs_prod_vars group pid i correctly following: pid group_concat(vid) --------------------------------------- 1 1,2,3,4,5,6 2 9,10,11,4,12,8,6,1,2,5,3,7 3 2,13,3,1,11,4,6,10,9,5,12,8,7 4 2,6,5,3,4,1 5 1,11,3,12,5,9,10,6,8,4,13,2,7 8 14 if this: select p.name, group_concat(v.name) bs_products p, bs_variations v, bs_prod_vars pv pv.pid = p.id , pv.vid = v.id group p.name i 2 rows follows: name group_concat(v.name) ------------------------------------------------------------- test product pre-2012 test product b 2008 - 2010,2002 - 2012,from 2011,2002... what doing wrong second query?

c++ - Prevent templated member function from being instantiated for a given type -

i have templated matrix class explicitly instantiate various pod types , custom class types. of member functions don't make sense few of such custom types. example: matrix<int> loadfile(....); // makes sense matrix<my_custom_class> loadfile(...); //this doesn't make sense in context of custom class can prevent instantiation of loadfile function (which member function) matrix objects of select types? far have avoided issue making loadfile friend function , explicitly controlling instantiation. want know if can when loadfile member function of matrix . the first question whether need control this. happens if call member function on matrix stores my_custom_class ? can provide support in class (or template) member function work? if want inhibit use of member functions particular type, can use specialization block particular instantiation: template <typename t> struct test { void foo() {} }; template <> inline void test<int>:

xml - Combining text values together using XSL -

i have xml file. snippet: <?xml version="1.0" encoding="utf-8"?> <assignmenthistory> <w20160104> <studentitems> <item> <name counsel="13">name 1</name> <type>type 1</type> </item> </studentitems> </w20160104> i wanting create xsl script works xml file. however, refers above external xml file using method: <xsl:variable name="myxml" select "document('history.xml')"/> in main xml file, in 'meeting' node has content: <meetingdate day="7" dayshort="thu" dayfull="thursday" month="1" monthshort="jan" monthfull="january" year="2016"/> what want do, combine @day, @month , @year attributes end "wyyyymmdd" can locate: /assignmenthistory/wyyyymmdd so can include values node in myxml in final output.

html - C# - Place generated QR code on Windows Form Application -

Image
i'm working c# windows form application, , want place pre-generated qr code onto form take user website on form in 'picturebox' or similar. having used website generate qr code, has given me unique barcode image , piece of code looks this: <script type="text/javascript" src="http://www.qrjumps.com/script/embed.js"></script> <script type="text/javascript"> tracker('8713921'); </script> this html reference javascript on other side of source link. possible include somewhere in code c# application? have never used these particular languages before. if can't done in type of application, there alternative way qr code onto c# windows form work in same way? thanks in advance, mark just save image: now can add image winforms application. bitmap image = new bitmap(@"myimagepath", true); // make picturebox , add picturebox1.image = image; this easiest possibility.

Animate a plot of a matrix with python? -

Image
i have written lot of code python, new plotting. i have list of matrices, , want plot of them (in sense of matrix plot, see figure), , join plots in animation. can provide working example of how done in python? haven't found in web.

sql server - relationship many to many -

i want create database relationship many many. have error sql71516 :: referenced table '[dbo].[bookauthors]' contains no primary or candidate keys match referencing column list in foreign key. if referenced column computed column, should persisted. sql71516 :: referenced table '[dbo].[bookauthors]' contains no primary or candidate keys match referencing column list in foreign key. if referenced column computed column, should persisted. how fix this? create table [dbo].[bookauthors] ( [book] int not null, [author] int not null, primary key clustered ([book] asc,[author] asc) ); create table [dbo].[books] ( [id] int not null, [title] nvarchar (max) null, [price] money null, [category] int null, primary key clustered ([id] asc), foreign key ([id]) references [dbo].[bookauthors] ([book]) ); create table [dbo].[authors] ( [id] int not null, [name] nch

geode - GemFire : CacheLoader : Getting data from external database -

cacheloader : use case one of main use case gemfire used is, used fast running cache holds recent data (example last 1 month) , remaining data sits in back-end database. mean gemfire data 1 month old overflowed database after 1 month. when user looking data beyond 1 month, need go database , data. cache loader suitable doing operation on cache misses , gets data database. regarding cache loader beleive cache misses triggered when operation on key , if key missing. what not understand when data gets overflowed back-end, beleieve no reference exist in gemfire. user may not know key - operation on key, might need execute oql query on other fields other key. how cache miss triggered when don't know key? then how cache loader fits overall solution? geode not invoke cacheloader during query operation. from geode documentation : the loader called on cache misses during operations , , populates cache new entry value in addition returning value calling thread.

javascript - D3 Force Directed Graph Redraw with Less Edges -

Image
i trying add threshold force directed graph, include edges between vertices that above threshold store in map. slider partly working, , edges removed. however, after edges removed, graph stops animating, , there error in console when calling force.start(). need add unique ids? in jsfiddle linked, not that, , slider works no problems. thanks! there multiple answers on stackoverflow similar questions, , have used them fix obvious errors (such d3.js: "cannot read property 'weight' of undefined" when manually defining both nodes , links force layout ), down one. using example: http://jsfiddle.net/simonraper/tdhgx/?utm_source=website&utm_medium=embed&utm_campaign=tdhgx website: http://www.coppelia.io/2014/07/an-a-to-z-of-extra-features-for-the-d3-force-layout/ i send relevant js. function draw(occurence) { var ratio = window.devicepixelratio || 1; var width = math.min(700,0.8*$(window).width()), height = 700; var c

c# - Protect SQLite database used by EntityFramework Core Application -

i'm trying use entityframework core 1.0 (new name entityframework 7) manage sqlite database in c# desktop application. i read official documentation , test-application works. my question is: possibile password-protect database? i know there lot of way it, exists .net class system.data.sqlite allow that, how using efcore 1? i can't understand if possible. thanks help, enrico ef core uses microsoft.data.sqlite, not support encryption out-of-box. see https://github.com/aspnet/microsoft.data.sqlite/issues/184 . add encryption using sqlite extensions.

c# - FluentValidation Validate Method throwing an excepion -

Image
i'm having issues using fluentvalidation library. i have small model ` [fluentvalidation.attributes.validator(typeof(personvalidator))] public class personmodel { public string name { get; set; } public nullable<short> type { get; set; } } ` have validator class public class personvalidator : abstractvalidator<personmodel> { public personvalidator() { rulefor(x => x.name) .length(1, 5) .withlocalizedmessage(() => basevalidationresource.lengthvalidationmessage, 1, 5); } } and have controller public actionresult index() { var model = new personmodel(); model.name = "john doe"; var validator = new personvalidator(); var results = validator.validate(model); var error = getmodelerrors(); return view(model); } so far good, issue when progam executing , gets line ; var results = validator.validate(model); throws systemformatexce

Multiple instances of simple chat with Node.js, Websocket - Socket.IO and Redis -

i trying create simple chat app node.js , websocket using socket.io. inspired myself german tutorial , single backend instance works well. i have 2 instances of server in backend, should sync chat messages between each other , store chat history in redis. client should display last 10 messages current channel, when new chat-room joined. i tried apply solution stackoverflow page issues. first websocket connection 'ws://localhost:8080/socket.io/?eio=3&transport=websocket&sid=leqgvy0cvk9yaszbaaaa' failed: connection closed before receiving handshake response error in console. , second, both clients receiving 'payload' messages in 1-sec interval. not understand how redis-sync mechanism works , not yet know how display chat history. here code far: var conf = require('./config.json'); var cluster = require('cluster'); var os = require('os'); if (cluster.ismaster) { // create http server, not use listen // way, have so

android - Adding a listener to a button inside a custom alertdialog crashes my app -

i have in application button allows me open custom alertdialog. alert dialog gets content xml file: have in button (called filterbutton), radio button , slider bar. programatically, there 2 more buttons added (ok, cancel). when open dialog alert, content displayed no events created far. (so no problem opening alertdialog , displaying content) now, want add listener "filterbutton". always, declared button (button filterbutton;), setonclicklistener way (in oncreate) : filterbutton = (button) findviewbyid(r.id.filter_button); filterbutton.setonclicklistener(filter_listener); then define listener : onclicklistener filter_listener = new onclicklistener() { @override public void onclick(view v) { // showpopupmenu(v); } }; i commented out method inside make sure problem doesn't come method. , since did this, when try run app crashes when try open activity button opening alertdialog is. when take off these few lines, works again. don't under

c# - Is Azure Service Bus message pump really event-driven? -

so we've been looking azure service bus , we're bit confused whether should use infinite loop poll queue/subscription or whether should use onmessage callback/message pump functionality. going execute fewer operations , cost less? ideally want event-driven system aren't wasting operations , it's nicer approach. my question is, using onmessage defined "processes message in event-driven message pump" event-driven? if take @ page (queueclient.onmessage): https://msdn.microsoft.com/library/azure/microsoft.servicebus.messaging.queueclient.onmessage.aspx you'll notice remark @ bottom states wrapper around infinite loop calling receive() method. doesn't sound event-driven me. now if @ page (subscriptionclient.onmessage): https://msdn.microsoft.com/en-us/library/azure/dn130336.aspx , remark not present. same topics/subscriptions , queues or event-driven subscriptions not queues? why saying it's event-driven when it's not? fact remark on

Tibco Ems start up error -

Image
i trying start ems server (version-5.0) in unix getting below error , tracing logs dont see data in log file printing same logs. -bash-3.2$ /tibco/installs/ems/5.0/bin/tibemsd -config /tibco/installs/ems/5.0/bin/tibemsd-db.conf tibco enterprise message service. copyright 2003-2008 tibco software inc. rights reserved. version 5.0.0 v28 4/29/2008 2016-01-28 03:28:38.531 process started '/tibco/installs/ems/5.0/bin/tibemsd'. 2016-01-28 03:28:38.532 process id: 21959 2016-01-28 03:28:38.532 hostname: lxtibqaapp3 2016-01-28 03:28:38.532 hostname ip address: 10.32.12.146 2016-01-28 03:28:38.532 detected ip interface: 127.0.0.1 (lo) 2016-01-28 03:28:38.532 detected ip interface: 10.32.12.146 (bond0) 2016-01-28 03:28:38.532 detected ip interface: 10.35.3.22 (bond1) 2016-01-28 03:28:38.532 reading configuration '/tibco/installs/ems/5.0/bin/tibemsd-db.conf'. 2016-01-28 03:28:38.533 logging file '/tibco/installs/ems/5.0/logs/ems_qaapp3.log' 2016-01-28 03:28:3

How to update the values for import functionality in Rails? -

i having import.rb file maps different headers , stores database through csv/xls upload. in there fields new fields building directly. example, name , website stored directly in companies table alt_email , alt_email2 stored in email table type customers. (number of records stored @ time). here company has_many emails. this rb file: def import name = fetch_value(row, "customer name", :string) website = fetch_value(row, "website", :string) cust_alt_email = fetch_value(row, "customer alternate email1", :string) cust_alt_email2 = fetch_value(row, "customer alternate email2", :string) customer_name = fetch_value(row, "customer name", :string) company = customer_name ? customer_name.strip.chomp.squeeze(" ") : "" if company.present? customer = company.new customer.name = company customer.website = website if cust_alt_email.present? customer.emails.build(email: cust_alt_email)

MS Access - Identify highest 3 values across columns -

i have table containing data following: id team1 team2 team3 team4 team5 team6 1 5 0 1 2 3 1 3 1 4 0 2 4 1 5 0 0 4 2 1 1 6 4 1 1 2 0 0 i want derive 3 new columns data 1st, 2nd , 3rd highest values across columns, so: id team1 team2 team3 team4 team5 team6 top1 top2 top3 1 5 0 1 2 3 1 5 3 2 3 1 4 0 2 4 1 4 4 2 5 0 0 4 2 1 1 4 2 1 6 4 1 1 2 0 0 4 2 1 is possible in access? want rank them equal values ranked incrementally, example: id value rank 3 4 1 3 4 2 3 2 3 3 1 4 3 1 5 i'm open using vba if th

vb.net - I can't assign to a variable named 'CallTypeList' -

an unusual issue turned in vb.net project. getting "object or value not set exception" on line of form: dim calltypelist list(of object) = myorm.recordsettodynamic(sql) the right hand side of unimportant, in general reads database records via 3rd party api, , copies fields dynamic expandoobjects, individually boxed list(of object) - works, don't worry it. i've spend 2 hours looking @ of functional structures, when duplicated line, moved earlier in function , called xcalltypelist, renamed 1 worked. i thought else (active x probably) making execution state uncertain, , continued debugging. it when exchanged xcalltypelist , calltypelist variable names discovered can't assign variable called 'calltypelist'. does know what's going on? web searches suggest there isn't peculiar variable name. i should note i'm using vs2013 community, have installed vs2015 professional, i've yet start using (not sure if makes difference). thanks

asp.net - Getting User Id in Web Api handler when using Cachecow -

i have mvc web api project , logging requests , responses using messagehandler. when api request comes in, bearer token in header lets asp.net thing , authenticates user. message handler therefore knows user , write log file. now, speed things i'm caching cachecow. i've added cachecow handler after messagehandler , when second request comes in, caching point of view works fine. controller code never hit , response returned cache. however, messagehandler not have value user.identity cannot tell made request. i need log requests , identify made them when code in controllers not hit. i think 1 workaround force api requests pass bearer token , user id in header. way can check user id claim , use log made request. protected override async task outgoingmessageasync(string correlationid, string requestinfo, byte[] message, string responsetimemilliseconds) { await task.run(() => debug.writeline(string.format("{0} - response

sql server - DTEXEC.exe for running an SSIS 2013 package -

Image
i have sql server 2012, visual studio 2013 , i'm trying run .dtsx via command line using dtexec. if use: dtexec.exe /file "c:\myfolder\sub folder \the ssis package .dtsx" return: couldn't load package because of error 0xc0010014. occurs when cpackage:: load xml fails. if, use: "c:\program files (x86)\microsoft sql server\120\dts\binn\dtexec.exe" /file "c:\myfolder\sub folder \the ssis package .dtsx" i can see part of task running, since it's warning me trimming 2 columns in task have (the same warning getting in ssis, worked). warning: 2016-01-28 13:41:49.53 code: 0x802092a7 source: data flow task ole db destination [99] description: truncation may occur due inserting data data flow column "issuer_other_name" length of 124 database column "issuer_other_name" length of 68. after that, getting: error: 2016-01-28 13:41:49.68 code: 0xc000f427 source: execute process ta

composer php - Doctrine ODM with symfony 3.0.* -

i'm trying install dotrine odm bundle composer returns your requirements not resolved installable set of packages. my composer.json file looks : "require": { "php": ">=5.5.9", "symfony/symfony": "3.0.*", "doctrine/orm": "^2.5", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-cache-bundle": "^1.2", "symfony/swiftmailer-bundle": "^2.3", "symfony/monolog-bundle": "^2.8", "sensio/distribution-bundle": "^5.0", "sensio/framework-extra-bundle": "^3.0.2", "incenteev/composer-parameter-handler": "^2.0", "doctrine/mongodb-odm": "~1.0", "doctrine/mongodb-odm-bundle": "~3.0" }, according full composer error message ( see below ), doctrine odm needs symfony2.8.2 max version.

Is it possible to add arrows heads on poly line using Android maps V2 -

how draw poly line arrow head(it indicates direction) using android maps v2 api. in android maps documentation option not available.is possible add arrows on polyline? try link below hope may you!! polylines googlemap map; // ... map. polyline line = map.addpolyline(new polylineoptions() .add(new latlng(51.5, -0.1), new latlng(40.7, -74.0)) .width(5) .color(color.red)); example

javascript - Bootstrap Collapsible Panel not collapsing -

i trying make collapsible panel, when pressed, nothing happens. here css files using: // loads of css styling files needed view pages display correctly. bundles.add(new stylebundle("~/content/css").include( "~/content/bootstrap.css", "~/content/jasny-bootstrap.css", "~/content/pagedlist.css", "~/content/bootstrap-datetimepicker.css", "~/content/site.css")); here of js files using: // loads of javascript files needed view pages function // correctly. bundles.add(new scriptbundle("~/bundles/bootstrap").include( "~/scripts/moment.js", "~/scripts/moment-with-locales.js", "~/scripts/jquery-2.1.4.min.js", "~/scripts/bootstrap.js", "~/scripts/jasny-bootstrap.js", "~/scripts/respond.js", "~/scripts/bootstrap-datetimepicker.js"

php - Build in PHPCI takes forever -

i'm setting continues integration , i'm wondering if should take damn long. build running on day in mean time , still it's not finished. it normal laravel app around 20 controllers, little time granted, on day? my config simple in opinion: build_settings: ignore: - "vendor" setup: composer: action: "install" test: php_mess_detector: allow_failures: true php_code_sniffer: standard: "psr2" php_cpd: allow_failures: true php_docblock_checker: allowed_warnings: 10 skip_classes: true php_loc: directory: "src" no errors, (by now) pesky status "pending" when check logs error: 2016/01/28 08:01:32 [error] 6702#0: *4 fastcgi sent in stderr: "php message: php fatal error: class 'phpci\controller' not found in /var/www/vendor/block8/b8framework/b8/application.php on line 93" while reading response header upstream, client: someipaddress, server: green.somedomain.com, r

java - How to scroll a JScrollPane containing JPanels to top when starting program? -

i have problem jscrollpane can't start @ top when program launched. hoping wizard in here might have answers :p here's working code example: public class jscrollpaneexample extends jpanel{ public jscrollpaneexample(int rowcount){ setlayout(new borderlayout()); jscrollpane scrollpane = makescrollpane(rowcount); add(scrollpane, borderlayout.page_start); setpreferredsize(new dimension(300,300)); } private jscrollpane makescrollpane(int rowcount) { jscrollpane scrollpane = new jscrollpane(); jpanel pane = new jpanel(); pane.setlayout(new gridlayout(rowcount, 0)); for(int = 0; < rowcount; i++){ if(i != 4) pane.add(maketestfield("test " + (i+1), "test description: " + (i+1), i)); else { pane.add(maketestfield("this test", "this test see if field line break. " + "this test se

dynamics crm 2011 - ETL Software, can't retrieve owner of a contact -

first question, etl software, map gm contact fields , migrate them mcrm contact entity. field can't owner (the owner creator of contact). i found privileges on entity fields prvassigncontact . is trick remove security, or thing through sdk toolkit started use yesterday? on so, found topic, can update owner id of contact using linq? don't know if useful me , if yes, put code. p:s: have alone... enjoy user-friendly advices! in addition guido's answer, if use impersonation on iorganizationservice, automatically set owner impersonated user.

greasemonkey - Links from ajax request are not requested via ajax -

i have userscript fires ajax call via gm_xmlhttprequest load simple page text , links div named "debug". works well. want, every link in requested document requested via gm_xmlhttprequest. don't know why function not working $('.ajax, .ajaxn').click(function(event) { event.preventdefault(); var href = $(this).attr('href'); gm_xmlhttprequest({ method: "get", url: href, headers: { "content-type": "application/x-www-form-urlencoded" }, onload: function(response) { $('#debug').html(''); $('#debug').append(response.responsetext).fadein(5000); } }); }); the links inside response have class ajaxn, , firebug dom/html panel shows response inserted #debug any hints?

sql - ORA-00907: Missing right parenthesis -

i have code (for example) create table s( id int, y int not null unqiue, x int not null, z varchar(50) not null, k varchar(50), l varchar(50) not null, m int not null, v int not null, c int not null, r varchar(400), constraint s_pk primary key (id)); but ora-00907: missing right parenthesis. made wrong? create table s( id int, y int not null unique, x int not null, z varchar(50) not null, k varchar(50), l varchar(50) not null, m int not null, v int not null, c int not null, r varchar(400), constraint s_pk primary key (id));

c# - how to use an associated file with the exe -

Image
i want know how information file path file if open file this: want info file when open file using program. i have tried use openfiledialog, works, that's slow, , doesn't nice. so, little more clear, mean when open file explorer, or similar. in program.cs can change static void main() static void main(string[] args) in args getting parameters used @ start of program. when connecting .ex exe (set exe default *.ex ), args containing path file, gets double clicked. you take @ msdn article .

Random boolean 2d-array in Java returning always "false" -

i wanted create random boolean 2d-array returns false...a problem operator "&&"? don't it... public static void main(string[] args){ boolean[][] arr = new boolean[5][5]; random r = new random(); boolean row = r.nextboolean(); boolean col = r.nextboolean(); for(int i=0 ; i<arr.length ; i++){ for(int j=0;j<arr[i].length;j++){ arr[i][j] = row && col; system.out.print(arr[i][j]+"\t"); } } i think want create new random boolean each cell in array this: public static void main(string[] args){ boolean[][] arr = new boolean[5][5]; random r = new random(); for(int = 0; < arr.length; i++){ for(int j = 0; j < arr[i].length; j++){ arr[i][j] = r.nextboolean(); system.out.print(arr[i][j]+"\t"); } } }

vb.net - ASP.NET Cannot launch Excel's file on server -

i'm trying open launch excel specifing existing file open. code: protected sub filemanager_selectedfileopened(source object, e filemanagerfileopenedeventargs) try dim fullname string = e.file.fullname system.diagnostics.process.start(fullname) dvfileerror.visible = false catch ex exception dvfileerror.visible = true lblfileerror.text = ex.message end try end sub in e.file.fullname can found file's name path, when launch process should open excel's file. code works on local, when upload on web server not works. "an error occurred in sending command application" . i've created .txt file test if application can access folder take "access denied" error. it strange because if open same excel's file using aspxspreadsheet control of devexpress, file opened. any solutions? your web service can't open executable on client in normal circumstances. there's few exceptions:

winapi - API for monitoring individual files IO performace on Windows -

what windows api can use monitor i/o performance metrics specific file or set of files? performance counters seem offer higher level objects such logicaldisk , physicaldisk. i'm looking windows resource monitor uses under disk->disk activity, i.e read/write bps , response time. i did quick search "perfmon individual files" , didn't see promising. but i'm not sure measuring performance of individual files meaningful. i/o activity coalesced in i/o stack in several places, result being @ different levels os can't distinguish file i/o 1 file versus another. assuming app isn't doing buffering/caching on it's own, first place can in buffering happens in "c" (or similar) runtime libraries. place coalescing occurs in file system (i'm assuming ntfs). i/o file directories can coalesced across multiple files in same directory. i/o can coalesced based on file system's block size. if multiple mft entries share block can read/wr