Posts

Showing posts from June, 2014

configuration - Netbean 6.9.1 library problem -

configuration - Netbean 6.9.1 library problem - i have upgraded netbeans 6.9.1 netbeans 6.8 , next problem arose not there in netbeans 6.8: i have own project jar (let's name alma.jar) used in several other project. beans alma.jar appears on palette. alma.jar in dist folder of alma project , other projects see it/use it. since alma continuously developed added add together project.. when other project cleaned , rebuilt alma.jar rebuilt. netbeans 6.9.1 clean not working netbeans 6.9.1 locks alma.jar, cannot deleted filesystem (i using windows xp). when first delete alma.jar , after start netbeans 6.9.1 warnings during startup when form open using alma.jar's classes appearing on palette otherwise can clean , build correctly. how avoid deletion of alma.jar before netbeans startup? this not solution workaround: if turn on 'compile on save' setting of project, can avoid of clean , build processes. configuration netbeans netbeans-6.9

gruntjs - creating app using grunt-titanium -

gruntjs - creating app using grunt-titanium - this command created app using titanium cli $ titanium create --name app_name --id com.appname.app --type app --platforms android --url app.com --workspace-dir . --project-dir . i'm trying grunt-titanium. 1. package.json { "name": "my-project", "version": "0.0.1", "devdependencies": { "grunt-titanium": "~0.3.1", "grunt-alloy": "~0.1.0", "grunt-shell": "~1.1.2", "grunt": "~0.4.5" } } my gruntfile.js 'use strict'; var test_app = 'appwithusegrunt', id = 'com.grunt.myapp', url = 'app.com', target_platform = 'android'; module.exports = function (grunt) { grunt.initconfig({ pkg: grunt.file.readjson('package.json'), titanium: { all: { ...

c# - seting universal spawn prefab -

c# - seting universal spawn prefab - we've been banging our heads one, in theory, having public static object hold prefab spawned should have solved this, script gets static variable when static keyword not there, still objects individual variables, while when add together static keyword, script's variable disappears. doing wrong? exact definition: public static object prefab; i still new unity, offer personal research / findings. hate explicitly have object public properties exposed can "stick" object prefab in scene. if trying build scheme / game components dynamically, knowing / when add together discretion. liked approach of having static available can go @ time needed "thing". i found using "resources" allow load prefab via code without need of having scene object drag controls to, such master list. in default "assets" folder, create folder "resources" (not sure if case-sensitive). anyhow, set ot...

ubuntu - gnuplot line for every distinct value in one column -

ubuntu - gnuplot line for every distinct value in one column - i have next info tcm* / tem* different instances. first column time in seconds. measure cpu usage, ram usage , amount of ram in mb in column 3-5. want plot cpu usage every instance in graph. the graph should have first column (seconds) x-axis , 3rd y-axis. sec value should treated that: every distinct value there should 1 line in graph. graph have 9 lines. how can that? 0 tcm1 10.5 2.9 29900 0 tcm2 5.3 3.0 30380 0 tem1 10.5 2.9 29816 0 tem2 15.8 2.9 29792 0 tem3 5.3 2.9 29752 0 tem4 5.3 2.7 27908 0 tem5 15.8 2.7 27752 0 tem6 26.3 2.9 29716 0 tem7 10.5 2.7 27728 1 tcm1 5.2 2.9 29900 1 tcm2 10.5 3.0 30380 1 tem1 5.2 2.9 29816 1 tem2 10.5 2.9 29792 1 tem3 10.5 2.9 29752 1 tem4 10.5 2.7 27908 1 tem5 5.2 2.7 27752 1 ...

java - Application with auto update and MongoDB replica set -

java - Application with auto update and MongoDB replica set - i'm in process of providing our applications of high availability capability. our applications have auto update feature (using mongeez) ensures construction of databases/collections/documents on right format application version. the problem i'm having hard time, on how resolve replication , versioning problem. i'll utilize next illustration improve explain problem. i need update application x application x2.0 on both servers without downtime, following: stop application xa install 2.0 version on server a launch application x2.0a application x2.0a automatically updates mongodb 2.0 format since using mongodb replica set, automatically propagates changes in mongodb instances problem!!!... application xb still running version 1.0 it's using 2.0 version of databases/collections/documents structure how can solve issue? doing wrong in previous "workflow"? let's suppose:...

Some different Dynamic sitemap for urls generated by search terms -

Some different Dynamic sitemap for urls generated by search terms - please see url https://www.practo.com/hyderabad/endocrinologist here term "endocrinologist" search term in website generating dynamic url above , "hyderabad" city name. i want know how create sitemap this, have seen in sitemap have urls beingness generated search terms in sitemap. doing manually? search dynamically-generated

android - Get an show Location in the Upper screen -

android - Get an show Location in the Upper screen - the target: screen upper part show current location. other (main) part, interact main activity. when main activity start should begin somehow getting , display location , then, go on , intercat user while location shown in upper part. what best way: develop service location set location in layout? phone call other activity location while both activities share same layout ? thanks danny android layout service location

xml - XSL get single value from attribute -

xml - XSL get single value from attribute - this input xml: <ns2:resources> <ns2:resource path="/root1/path/"> <ns2:resource path="/function1/param"> .... </ns2:resource> <ns2:resource path="/function2/param"> .... </ns2:resource> <ns2:resource path="/function3/param"> .... </ns2:resource> </ns2:resource> <ns2:resource path="/root1/path2/"> <ns2:resource path="/function1/param"> .... </ns2:resource> <ns2:resource path="/function2/param"> .... </ns2:resource> <ns2:resource path="/function3/param"> .... </ns2:resource> </ns2:resource> <ns2:resource path="/root2/pathn/"> <ns2:resource path=...

html5 - Javascript (jQuery) limit mouse movement speed inside an element -

html5 - Javascript (jQuery) limit mouse movement speed inside an element - the task draw curve ob canvas. problem if mouse moved fast, coordinates skipped , not captured. (html5/js canvas capturing mouse coords when moves fast - previous post..) is there cross-browser way limit mouse speed within element (div, canvas, etc.)? i assume "limiting mouse speed" mean enable capturing high volume of mouse events more detailed information, or resolution, of mouse path. the browser work @ high-level when comes mouse events. scheme capture mouse events, browser many other tasks such pushing events, bubbling them etc. , capture current mouse position when can. to compensate need utilize sort of tricks such splines. possible workaround i don't intend create broad reply become out of scope go through steps , scenarios need spline approach (interpolation, knee-breaks require relative angle tracking, smoothing etc.). however, there new api called pointer lock...

node.js - Moongoose sort by parseFloat(String) -

node.js - Moongoose sort by parseFloat(String) - i want sort query result float value . value stored in mongodb type string ,can parse string float , sort dynamically? complex sort. the next parts of schema , sort code: schema: var scenicspotschema = new schema({ ... detail_info: { ... overall_rating: string, ... }, }); sort function: scenicspot.find({'name': new regexp(req.query.keyword)}, ) .sort('-detail_info.overall_rating') .skip(pagesize * pagenumber) .limit(pagesize) .exec(function (err, scenicspots) { if (err) { callback(err); } else { callback(null, scenicspots); } }); any kind of help , advice appreciated. :) .sort mongoose not back upwards converting info type. see: http://mongoosejs.com/docs/api.html#query_query-sort it take column names , order. there 2 path acheive goal:...

mysql - Pl/SQL package including yearly salary calculation function -

mysql - Pl/SQL package including yearly salary calculation function - i need help in creating bundle in pl/sql following: bundle containing 1 function , 1 procedure. function calculates yearly salary of particular employee , yearly salary inserted table employee id using procedure. here tried don't know how add together procedure insert values "particular_emp" table create table particular_emp ( salary string not null, emp_id number not null ); create or replace bundle salary create or replace function get_yearly_salary(p_sal in employees.salary%type, p_comm in employees.commission_pct%type) homecoming number begin homecoming (nvl(p_sal, 0) * 12 + (nvl(p_comm, 0) * nvl(p_sal, 0) * 12)); end get_yearly_salary; here how did , working! create or replace bundle empinfo function ysalary(p_empno in number) homecoming number; procedure insertsal (p_empno in number); end empinfo; / create o...

intellij idea - could not get a field value by reflection getter of Topic.id -

intellij idea - could not get a field value by reflection getter of Topic.id - hello have rssfeed maven , jboss know seek add together topics newsfeed error: 14:02:43,526 warn [com.arjuna.ats.arjuna] (default task-10) arjuna012125: twophasecoordinator.beforecompletion - failed synchronizationimple< 0:ffffc0a80185:737c90a9:552bae74:4b, org.hibernate.engine.transaction.synchronization.internal.registeredsynchronization@694357 >: javax.persistence.persistenceexception: org.hibernate.propertyaccessexception: not field value reflection getter of topic.id @ org.hibernate.jpa.spi.abstractentitymanagerimpl.convert(abstractentitymanagerimpl.java:1763) [hibernate-entitymanager-4.3.7.final.jar:4.3.7.final] @ org.hibernate.jpa.spi.abstractentitymanagerimpl.convert(abstractentitymanagerimpl.java:1677) [hibernate-entitymanager-4.3.7.final.jar:4.3.7.final] @ org.hibernate.jpa.spi.abstractentitymanagerimpl.convert(abstractentitymanagerimpl.java:1683) [hibernate-entitymanag...

iphone - myView.frame Vs. self.myView.frame -

iphone - myView.frame Vs. self.myView.frame - i know it's advisable utilize @property accessors, , know it's of import utilize self.myview = x instead of mview = x , but: isn't myview.frame sufficient? atomicelementflippedview.m file in theelements has self.wikipediabutton.frame=buttonframe; . shouldn't leave out self if i'm getting/setting property of ivar , not ivar itself? it [self.wikipediabutton addtarget:...]; . shouldn't leave out self here well? shouldn't phone call function on ivar, not property? i.e., [wikipediabutton addtarget:...]; thanks! matt both work. the main reason using getters within class code changes easy. if decide store info in different fashion or build dynamically on request, there single point of change. views it's not of import most of time, can come handy when replace view finish view hierarchy (your original view beingness maybe part of it). iphone objective-c properties

winforms - VB.NET OpenFileDialog Latency on Win7 -

winforms - VB.NET OpenFileDialog Latency on Win7 - i have winform, vbexpress 2008 single button , code behind illustrate problem: private sub button1_click(byval sender system.object, byval e system.eventargs) handles button1.click openfiledialog1.showdialog() msgbox(openfiledialog1.filename) end sub when select file (in case little pdf's) getting 3 6 sec delay after selecting file until goes on next statement, in case msgbox. if repeat selecting same file sec time, don't delay. but, if exit programme , re-start it, delay 1 time again (one time). after first 1 hangs looks hangs ever 7 9 tries , window says "not responding" few seconds. don't have problem on vista or xp. if select same file on , over, might hang 1st, 2nd , 12th time. close programme seek same again, might 1st, 3rd , 9th time. never same - if running out of resources , clearing cache. i've watched task manager during delay , don't see unusual coming up. hav...

sockets - Java: Reading from ObjectInputStream -

sockets - Java: Reading from ObjectInputStream - i have started learning java. task create file server accepts commands file get, file set , file delete multiple clients using threading. using custom class dataobject serialize , send commands , info may accompany it. client made interactive in sense involves manual user input of various commands. means objectinputstream readobject() function not work in while(true) loop because of eofexception. can server thread pauses @ readobject() until sees next object , resumes while(true) loop? code @ server (runs each thread separately): public void run() { objectinputstream = null; objectoutputstream os = null; try{ = new objectinputstream(clientsocket.getinputstream()); os = new objectoutputstream(clientsocket.getoutputstream()); while (true) { input = (dataobject) is.readobject(); //system.out.println("input has been read"); output = commandprocesso...

iphone - How to use an UIWebView to show small offline html documents? -

iphone - How to use an UIWebView to show small offline html documents? - could ship app html document , display using uiwebview? how hard use? is possible have little frame uiwebview inside, or take whole screen? , can rid of controls, uiwebview works advanced uilabel or uitextview? yes; it's easy; can have little embedded webview; yes, naked web view has no controls. in loadview or viewdidload method: uiwebview *webview = [[uiwebview alloc] initwithframe:cgrectmake(...)]; [self.view addsubview:webview]; nsurl *url = [[nsbundle mainbundle] urlforresource:@"foo" withextension:@"html"]; nsurlrequest *request = [nsurlrequest requestwithurl:url]; [webview loadrequest:request]; [webview release]; this load foo.html file add together project resource. alternatively, can utilize loadhtmlstring:baseurl: if want build html in code. iphone uiwebview

Rich Image Field rendered as HTML in publishing page - SharePoint -

Rich Image Field rendered as HTML in publishing page - SharePoint - i have used sharepoint's rich image field in page layout. when traverse edit mode of publishing page , add together image in image field, image rendered fine. but, 1 time 'check in' page using publishing console , publish page, html markup of image rendered. how resolved? regards, raghuraman.v it might issue custom field definition. create sure have like: <field id="{00000000-0000-0000-0000-000000000000}" name="imagetop" displayname="image on top" type="image" format="image" richtext="true" richtextmode="fullhtml" group="my page layout columns"> </field> sharepoint publishing web-controls

matlab - Error in dsolve when variable is multiplied by a constant (R2011a) -

matlab - Error in dsolve when variable is multiplied by a constant (R2011a) - i trying utilize next code: ode1='d2y1=-1256.4*y1-5*dy1+255.1*y2+182.781'; ode2='d2y2=-151.5*y2-5*dy2+255.1*y1-14.0459'; ci='y1(0)=2,y2(0)=-2,dy1(0)=0,dy2(0)=0'; sol=dsolve(ode1,ode2,ci,'t'); sol.y1 sol.y2 and matlab returns error: ??? error using ==> mupadengine.mupadengine>mupadengine.feval @ 144 mupad error: error: partition 0 [_invert]; during evaluation of 'stdlib::normalnoexpand' error in ==> dsolve>mupaddsolve @ 215 t = feval(symengine,'symobj::dsolve',sys,x,ignoreconstraints); error in ==> dsolve @ 96 sol = mupaddsolve(ignoreconstraints,varargin{1:narg}); error in ==> maglevsol @ 7 sol=dsolve(ode1,ode2,ci,'t'); however, if run this ode1='d2y1=-y1-5*dy1+255.1*y2+182.781'; ode2='d2y2=-y2-5*dy2+255.1*y1-14.0459'; ci='y1(0)=2,y2(0)=-2,dy1(0)=0,dy...

Create linked list with embedded structure from input file in C -

Create linked list with embedded structure from input file in C - i seek create linked list input file in c. node contains construction , think problem is. pointer phone call input info file pnew.stock.szstocknumber. have never called construction embedded in construction , new pointers. error when compiling: cs1713p4.c:107: error: request fellow member ‘stock’ in not construction or union cs1713p4.c:108: error: request fellow member ‘stock’ in not construction or union cs1713p4.c:109: error: request fellow member ‘stock’ in not construction or union cs1713p4.c:110: error: request fellow member ‘stock’ in not construction or union i appreciate help cuz cannot find info online nodes contain structures. thanks! typedef struct node { stock stock; // contains inventory info struct node *pnext; // next node in linked list } node; void getinventory(node **pphead, char *pszinventoryfilename) { char szi...

How do i attach the text to the left in google script? -

How do i attach the text to the left in google script? - when seek utilize google scripts, of text attached right , cannot work that. how prepare , attach text left? i trying usual alt+shift works in regular text fields no help there. if issue sheet setup right left, please see next link fix. right-to-left text editing in google sheets i paste in information, there images icons won't display. alternatively, in google sheets, click help, sheets help. search "right left text editing" you find same info. essentially need go menu, settings, check box next “show right-to-left controls in editor.” setting applied across docs, sheets, , slides. you have refresh sheet , icon alter text orientation google-apps-script

selenium - Can't update chromedriver and seleniumrelease -

selenium - Can't update chromedriver and seleniumrelease - i seek work protractor. followed little tutorial , first thing did: npm install -g protractor this install 2 command line tools, protractor , webdriver-manager. have update webdriver-manager: webdriver-manager update so cmd tries connect https://chromedriver.storage.googleapis.com/2.14/chromedriver_win32.zip , https://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar. give error: c:\program files (x86)\jenkins\workspace\testnew>webdriver-manager update updating selenium standalone downloading https://selenium-release.storage.googleapis.com/2.45/selenium-server -standalone-2.45.0.jar... updating chromedriver downloading https://chromedriver.storage.googleapis.com/2.14/chromedriver_win32. zip... error: got error error: getaddrinfo eai_again https://selenium-release.stor age.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar error: got error error: getaddrinfo ea...

ASP.NET Identity 2,2,0 - Application Cookie not sent when debugging using VS 2013.4 -

ASP.NET Identity 2,2,0 - Application Cookie not sent when debugging using VS 2013.4 - suddently realized not able login application when debugging through vs 2013.4 i utilize asp.net identity 2.2.0. more observation, found applicationcookie not sent browser. i tried revert older commit when know used work. did not help. made me wonder if there other problem. interestingly everyting works expected when using vs 2015. note: using win10 preview. i referred asp.net_sessionid + owin cookies not send browser suggestions mentioned there did not help. asp.net-identity-2 asp.net-mvc-5.2 windows-10 vs-2015-preview vs2013-update-4

r - Line plot using ggplot2 with manual line/fill color independent of group aesthetic -

r - Line plot using ggplot2 with manual line/fill color independent of group aesthetic - i trying plot info 2 separate studies in different colors in line plot using ggplot2. info comes 2 independent studies used within-group design (multiple siblings in same family, each in different treatment groups). thus, i've used "group" aesthetic grouping individuals family and, thus, draw lines between individuals within same family. part works well, want the info collected in 2 separate studies represented in different colors. i've played around bunch, manually changing color, etc. , can't work. i've seen online manually changing line color depends on "group" aesthetic, , need color , grouping independent of each other in case. the info in long format, study factor. used summarysewithin function, comes r-cookbook code plotting means (available here: http://www.cookbook-r.com/graphs/plotting_means_and_error_bars_%28ggplot2%29/) build info f...

VB.NET Update to Excel -

VB.NET Update to Excel - i developing application in visual basic using visual studio 2013. in application attempting utilize oledb update write info out excel spreadsheet treated database. have tried numerous different formats of either syntax error or pretends work nil gets written file. can tell me wrong code: public function writetoexcel(excelpath string, dtuser datatable) dim voffice string = dtuser.rows(0).item("office").tostring dim vdivision string = dtuser.rows(0).item("division").tostring dim vsection string = dtuser.rows(0).item("section").tostring dim vuser string = dtuser.rows(0).item("userid").tostring dim excelconnstring string = "provider=microsoft.ace.oledb.12.0;data source=" & excelpath & ";extended properties='excel 12.0 xml;hdr=yes';" dim batchid long = 0 dim sql string = "update [installationreport$] set office = @uoffice [primary user] = @...

Linux-C: reading from pipe returns first buffer written to it -

Linux-C: reading from pipe returns first buffer written to it - this programme simulates variant of dijkstra's producer/consumer problem. pipeline first created followed kid process using fork(). kid write pipe crudely done randomly generated piece of "stock market ticker information". after waiting child/producer process write information, parent/consumer process read out. the first output correct: produced: fpoo 57.83 +0.43 consumed: fpoo 57.83 +0.43 any output next "consumed: info first read": produced: rjii 71.30 -2.71 consumed: fpoo 57.83 +0.43 i unsure why occurring because tickerinfo changing. why suspect i'm reading pipe incorrectly or perhaps improperly structured forked processes. i have compiled code in g++. takes argument number of seconds want programme run for. #include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <sys/types.h> #include <unistd.h> #include <time.h...

c# - How to pass a composite array from Javascript to WEB API controller HttpPOST? -

c# - How to pass a composite array from Javascript to WEB API controller HttpPOST? - my javascriptcode //insert employee , section record this.insertemployeedepartment = function (employee) { var request = $http({ method: "post", url: "/employee/insertemployeedepartment", contenttype: "application/json", data: json.stringify(employee) }); homecoming request; } employeesapicontroller.cs using system.web.http; namespace employeeservice { [routeprefix("employee")] public class employeesapicontroller : apicontroller { [httppost] [route("insertemployeedepartment")] public employeedepartment insertemployeeanddepartment([frombody]employeedepartment emp) { var xx = emp; } } } employeedepartment.cs using system.collections.generic; namespace test { pu...

python - ocdev won't run: SyntaxError: invalid Syntax -

python - ocdev won't run: SyntaxError: invalid Syntax - i can't ocdev tool run. when seek running receive "syntaxerror: invalid syntax" code. guess maybe wrong python version? since python --version outputs 2.7.3. have python3 installed it's not standard version. installed ocdev using pip-3.2. tried reinstalling multiple times. have python3-jinja2 installed. i'm running debian 7.8. here whole error: traceback (most recent phone call last): file "/usr/local/bin/ocdev", line 9, in <module> load_entry_point('ocdev==0.1.2', 'console_scripts', 'ocdev')() file "/usr/lib/python3/dist-packages/pkg_resources.py", line 337, in load_entry_point homecoming get_distribution(dist).load_entry_point(group, name) file "/usr/lib/python3/dist-packages/pkg_resources.py", line 2280, in load_entry_point homecoming ep.load() file "/usr/lib/python3/dist-packages/pkg_resources.py", ...

Convert Objective-C code to Swift: delegate -

Convert Objective-C code to Swift: delegate - i'm learning function written in objective-c. don't know objective-c language. when i'm converting code swift, got stuck @ delegate functions. the code in .h file is: #import <uikit/uikit.h> @protocol scpopviewdelegate <nsobject> @optional - (void)viewheight:(cgfloat)height; - (void)itempressedwithindex:(nsinteger)index; @end @interface scpopview : uiview @property (nonatomic, weak) id <scpopviewdelegate>delegate; @property (nonatomic, strong) nsarray *itemnames; @end and i'm trying convert code as: protocol popviewdelegate: class { func itempressedwithindex(index: int) func viewheight(height: cgfloat) } but 3 lastly sentences, don’t know how deal them, 1 id , delegate . can help, please? more effort larn swift. give thanks much! the definition of protocol ends first @end statement. the @interface after definition of objective-c class, scpopview. ...

Input in Python -

Input in Python - i have started using python, , got problem non-english (vietnamese in particularly) input. when run code: # -*- coding: unicode-escape -*- s = raw_input() print(s) s = "hiển thị 15 dòng" print(s) and terminal type extracly same string, printed like: hiển thị 15 dòng hi\xe1\xbb\x83n th\xe1\xbb\x8b 15 d\xc3\xb2ng it create differences in when utilize these 2 type of strings in other function found first 1 didn't work sec 1 did. give me hints? give thanks you! the problem using # -*- coding: unicode-escape -*- in source file. causes python escape bytes greater 128 in utf-8 representation \xnn hex escape, turning string 'hi\xe1\xbb\x83n th\xe1\xbb\x8b 15 d\xc3\xb2ng' thus # -*- coding: unicode-escape -*- : s = "hiển thị 15 dòng" will become s = 'hi\\xe1\\xbb\\x83n th\\xe1\\xbb\\x8b 15 d\\xc3\\xb2ng' the cause of course of study using unicode-escape codec coding ; utilize utf-8 i...

sql - NULL comparison, take 2 -

sql - NULL comparison, take 2 - i have subquery, used in section: a.column <> b.column unfortunately, doesn't work, if either a.column or b.column null. so, converted to: ((a.column <> b.column) or ((a.column null) <> (b.column null))) , presuming "table.column null" boolean value , can compare 2 boolean values. but... incorrect syntax near '<'. i don't like ((a.column <> b.column) or ((a.column null) , (b.column not null)) or ((a.column not null) , (b.column null))) how workarounf this? regards, nullif yields null when 2 values equal =) where nullif(a.column, b.column) not null sql sql-server comparison null

Compile a jruby on rails application to a jar? -

Compile a jruby on rails application to a jar? - is there quick way pack jruby on rails application jar? is there ec2 on rails virtual appliance jruby on rails apps? using warbler 1.2.1 can create "executable" war file. gem install warbler warble executable war java -jar myrailsapp.war jar jruby executable-jar jrubyonrails

groovy - Do I have to do something special for command objects to get instantiated in grails? -

groovy - Do I have to do something special for command objects to get instantiated in grails? - i have command object in bundle controller. import in controller. create , homecoming instance of command create action: def create = { def reportcreatecommand = new reportcreatecommand() reportcreatecommand.name = params.name reportcreatecommand.jrxmlfile = params.jrxmlfile homecoming [cmd: reportcreatecommand] } but save action closure doesn't instantiate object of command properties: def save = { reportcreatecommand cmd -> if (cmd.validate()){ def reportinstance = cmd.createreport() reportinstance.save() redirect(action:"show", id:reportinstance.id) } else { render(view:"create", model:[cmd:cmd]) } } apparently cmd null in save closure. command class has 2 properties name , jrxmlfile. know grails should instantiate command object in save method params. have else? i b...

encryption - RAR passwords, why don't rainbow tables work? -

encryption - RAR passwords, why don't rainbow tables work? - i've been looking around encryption , i've seen several implementations of rainbow tables work charm on passwords (say windows). i'm yet see implementation of rainbow attack on rar file. why so. makes rar encryption more secure , immune these sorts of attacks? a rainbow table optimization inverting hash functions: finding password when have hash. although not strictly necessary here, recommend reading what rainbow tables , how used? has explanation clears few mutual misconceptions. there 2 parts rar encryption (or uses password encrypt data). first, encryption key derived password, using key derivation function (kdf). encryption key used encrypt or decrypt data. even if kdf hash function, rainbow table wouldn't help: attacker not have output of kdf. when password used authentication, output of kdf what's stored in database. when password used encryption, output of kdf secret key atta...

RegEx: Repeated identical vowels in a string - Oracle SQL -

RegEx: Repeated identical vowels in a string - Oracle SQL - i need display strings (name of manufacturers) contain 2 or more identical vowels in oracle11g. using regex find this. select manuf_name "manufacturer", regexp_like(manuf_name,'([aeiou])\2') counter manufacturer; for example: regex accepts otterbox abca abca the regex rejects samsung apple i not sure how proceed ahead. i think want this: with mydata ( select 'otterbox' manuf_name dual union select 'apple' dual union select 'samsung' dual ) select * mydata regexp_like(manuf_name, '([aeiou]).*\1', 'i'); i not sure why used \2 backreference instead of \1 -- \2 doesn't refer in regex. also, note wildcard , quantifier .* indicate there can number of character between first occurrence of vowel , second. third, note 'i' parameter indicate case-insensitive search (which think want since regex should match "o...

javascript - Is there a way to limit published fields in Meteor aldeed tabular package -

javascript - Is there a way to limit published fields in Meteor aldeed tabular package - is there way limit info published aldeed tabular datatable? example, if collection has attributes a, b, c, d, attribute c sensitive , hence want prevent beingness published, attributes a, b, d published datatable. checked documentation not find explicit reply this... thank you!! you should remove autopublish package . and should limit field homecoming query, in case on publish function. meteor.publish('datatable',function(){ homecoming data.find({}, { fields: { a: true, b: true, c: false, d: true } }); } and subscribe publish meteor.subscribe('datatable') note: if have collection on /lib folder, sure create subscribe reactive tracker.autorun(function(){ meteor.subscribe('datatable') }) javascript mongodb meteor datatable

c++ - Set visual focus on item in QGraphicsview -

c++ - Set visual focus on item in QGraphicsview - just short question, 1 of know how set visual focus on item, has been placed in qgraphicsview, view centered around item? in particular example, i'm constructing stacklayout, add together qgraphicsrectitems scene, , want, view focuses on latest added item, right remains @ same position , have scroll downwards manually, setfocusitem doesn't seem trick. c++ qt qgraphicsview

Creating an array in Python while conserving line format -

Creating an array in Python while conserving line format - i have file in next format style: unitig_19 <tab> . <tab> part 13221 13240 0.00 + <tab> . <tab> cov2=..... unitig_19 <tab> . <tab> part 13241 13260 0.00 + <tab> . <tab> cov2=..... unitig_19 <tab> . <tab> part 13261 13280 0.00 + <tab> . <tab> cov2=..... and on. how can create array while conserving format , not having info jammed 1 massive line? this: [unitig_19, ., region, 13221, 13240, 0.00, +, ., cov2=.....] [unitig_19, ., region, 13241, 13260, 0.00, +, ., cov2=.....] [unitig_19, ., region, 13261, 13280, 0.00, +, ., cov2=.....] my goal afterwards extract specific pieces each line array. any help appreciated! you can utilize regex re.split function : >>> s="""unitig_19 <tab> . <tab> part 13221 13240 0.00 + <tab> . <tab> cov2= ... unitig_19...

c++ - Sqlite - Count Unique Values based on Column -

c++ - Sqlite - Count Unique Values based on Column - i've got table (c, sqlite). , want count number of unique ports each ip address contacts. id | ip_src | ip_dst | port ----------------------------------- 1 | 192.168.45.3 | ... | 442 2 | 132.43.13.4 | ... | 42 3 | 111.5.34.3 | ... | 80 4 | 54.2.2.1 | ... | 8322 5 | 54.2.2.1 | ... | 8322 6 | 192.168.45.3 | ... | 80 7 | 192.168.45.3 | ... | 23 the result of query should ideally this: 192.168.45.3 = 3 132.43.13.4 = 1 111.5.34.3 = 1 54.2.2.1 = 1 what query this? i've tried: select src_ip, count(distinct port) synpackets; but it's not giving out right result, seems counting first ip address. it's of import unique ports first. therefore, have nest 2 select statements this: select t.ip_src ip_src, count(t.ports) numberports (select distinct ip_src, ports <table>) t grouping t.ip_src; in inner select statement results unique ip_src...

iOS wrong localization -

iOS wrong localization - i have ios application localized in multiple languages. have localizable.strings files english, dutch , dutch (belgium). problem when dutch set device language , kingdom of belgium country, dutch strings used , not dutch-belgium strings. i've added logging create sure right language set on device, , appears correct: nslocale *locale = [nslocale currentlocale]; nsstring *language = [locale displaynameforkey:nslocaleidentifier value:[locale localeidentifier]]; nslog(@"language %@", language); this prints out 2015-04-09 11:49:26.227 mytestapp[222:7459] language nederlands (belgië) but if seek string using nslocalizedstring dutch resource, not dutch kingdom of belgium one. i've tested on iphone 5s running 8.1 , on several 7.1/8.1 simulators , can't work. interesting thing if forcefully set language dutch (belgium) in xcode under edit scheme -> application language, ...

java - Regular expression to parse id -

java - Regular expression to parse id - i'm looking regular look parse id of record in mongodb: {"$oid":"5527b117d3d511091e1735e2"} i'm trying next 1 fails: private static final pattern p = pattern.compile("\\{\"([a-za-z\\d]+)\"\\}"); matcher m = p.matcher("{\"$oid\":\"5527b117d3d511091e1735e2\"}"); if(!m.find()) { throw new illegalargumentexception("the id should within parenthesis , quotes."); } any help ? you need include key part in regex or "\\{\"([a-za-z\\d$]+)\":" because [a-za-z\\d]+ won't match inbetween : , there isn't closing curly brace next key part. final pattern p = pattern.compile("\\{\"([a-za-z\\d$]+)\":\"([^\"]*)\"\\}"); matcher m = p.matcher("{\"$oid\":\"5527b117d3d511091e1735e2\"}"); if(m.find()) { system.out.println("key : ...

osx - pair bluetooth mouse with multiple OS X installs on the same host machine -

osx - pair bluetooth mouse with multiple OS X installs on the same host machine - i have apple magic mouse connected mac pro has both mavericks , yosemite (10.9 , 10.10) software compatibility. have pair mouse each time switch between operating systems. is there way share pairing info between 2 operating systems? i've tried copying com.apple.bluetooth.plist file no luck.. or way mouse remember both operating systems though they're using same bluetooth adapter? osx bluetooth apple magic-mouse

split string c# based on math operator -

split string c# based on math operator - (calculator program)count in 1 step math basic order if there string = "5+2*6/9"(which user input) how number 2 , 6? i've been trying split if there no '+' fail :( here code atm string[] = kalimat.split('*'); string[] a1 = a[0].split('+'); string[] a2 = a1[a1.count() - 1].split('-'); string[] b1 = a[1].split('+'); string[] b2 = b1[0].split('-'); ang1 = a2[a2.count() - 1]; ang2 = b2[0]; angka1 = convert.todouble(ang1); angka2 = convert.todouble(ang2); hasil = angka1 * angka2; any thought guys? if you're input look in form: "[some number]+[first value want return]*[second value want return]" should work you: var reg = new system.text...

Implementing "Gradient Descent Algorithm" in Matlab -

Implementing "Gradient Descent Algorithm" in Matlab - i'm solving programming assignment in machine learning course. in i've implement gradient descent algorithm below i'm using next code in matlab data = load('ex1data1.txt'); % text file conatins 2 values in each row separated commas x = [ones(m, 1), data(:,1)]; theta = zeros(2, 1); iterations = 1500; alpha = 0.01; function [theta, j_history] = gradientdescent(x, y, theta, alpha, num_iters) m = length(y); % number of training examples j_history = zeros(num_iters, 1); iter = 1:num_iters k=1:m; j1=(1/m)*sum((theta(1)+theta(2).*x(k,2))-y(k)) j2=((1/m)*sum((theta(1)+theta(2).*x(k,2))-y(k)))*(x(k,2)) theta(1)=theta(1)-alpha*(j1); theta(2)=theta(2)-alpha*(j2); j_history(iter) = computecost(x, y, theta); end end theta = gradientdescent(x, y, theta, alpha, iterations); on running above code i'm getting error message its clear error message that, result of below expres...

gdi+ - System.Drawing.Image.FromFile does not close the file stream -

gdi+ - System.Drawing.Image.FromFile does not close the file stream - if create image method , seek delete/modify image file error because there stream still using file. how can delete or dispose of stream can work on file? do not utilize method. utilize fromstream instead , this: using filestream = new io.filestream("d:\test.jpg", io.filemode.open) dim x = system.drawing.image.fromstream(filestream) 'do image manipulation...' end using io.file.delete("d:\test.jpg") gdi+ system.drawing

problem in getting gps coordinates in android 2.1(Found Answer) -

problem in getting gps coordinates in android 2.1(Found Answer) - i having problem in getting gps coordinates in 2.1. the code using right working in 1.6 when test same apk in 1.6 device showing null values please help me find way work 2.1 devices also here code. public class gpslocator { private static string provider="gps"; private locationmanager mylocationmanager=null; public gpslocator(context context) { mylocationmanager=(locationmanager)context.getsystemservice(context.location_service); } public void myonresume() { mylocationmanager.requestlocationupdates(provider, 0, 0, onlocationchange); } public void myonpause() { mylocationmanager.removeupdates(onlocationchange); } public double getlatitude() { location loc=mylocationmanager.getlastknownlocation(provider); if (loc==null) { return(0); } return(loc.getlatitude()); } public double getlongitude() { location...

python - ImportError: 'psMat' is not a built-in module -

python - ImportError: 'psMat' is not a built-in module - i'm trying build gregorio's fonts, involves running python script using fontforge bindings. script written python2, i've been unable find python2 fontforge bindings (i'm running arch linux). when run python3, gives importerror: 'psmat' not built-in module which i've never seen before, , can't figure out means. (this opposed to importerror: no module named fontforge when running under python2, know means can't find module (as expected: fontforge bundle installs in /usr/lib/python3.4/site-packages/ .) specifically, script tries to import fontforge, psmat but able load first one, regardless of 1 listed first. the thing i've found seems remotely related this stackoverflow question, far can tell, fontforge.so , psmat.so built python3, suggested beingness able load @ to the lowest degree 1 of them. it turns out script can run with fontforge -script ...

java - In this program we didnot wrote getter and constructor in AccountService class . Then how jdbcTemplate is beeing injected in this class? -

java - In this program we didnot wrote getter and constructor in AccountService class . Then how jdbcTemplate is beeing injected in this class? - bundle sinha.priyank.txn; import org.springframework.jdbc.core.simple.simplejdbcdaosupport; import org.springframework.transaction.annotation.propagation; import org.springframework.transaction.annotation.transactional; // how injecting jdbctemplet in class dont have //any getter/setter , constructor @transactional public class accountservice extends simplejdbcdaosupport { @transactional(propagation=propagation.required,timeout=10) public void deposit(int accountnumber , double amount) { getsimplejdbctemplate().update("update accounts set balance=balance+? account_number=?", amount,accountnumber); getsimplejdbctemplate().update("insert statements (account_number,transaction_amount,transaction_type,id) values(?,?,?,?)", accou...

MySQL set maximum value to 9999 -

MySQL set maximum value to 9999 - how set maximum int value 9999 table structure: id ---int num ---int should not more 9999 value is possible on mysql. thanks in advance. you can set maximum value of column creating trigger. create trigger checks value less 9999. this: create trigger my_trigger before insert on table each row begin if columnname > 9999 phone call `error: cannot insert value`; end if; end mysql

angularjs - Do I need to install bower components each time I create project -

angularjs - Do I need to install bower components each time I create project - do need install bower components each time create angular project in webstorm? i created 2 projects , installed bower components separately each time. believe there must other method this. each project should have own dependencies, isn't it? main thought of frontend bundle managers "setup dependence locally". frontend bit different backend, may read article bower: why front-end needs bundle manager understand why things so. another thought of bower - maintain in vcs(git, etc) bower.json. when man team download project, should thing - create bower install , bower download dependencies project (he didn't want know other projects) there no point install deps 1 time project, cause frontend, not backend. one of best practice frontend - concat .js , .css files 1 huge javascript file (and 1 css). in mutual way when this, should specify project js dirs. belive these ...

linux - Laravel installation in composer fails -

linux - Laravel installation in composer fails - when seek install laravel in composer, throwing error. my command in terminal is: composer create-project laravel and error is: [composer\downloader\transportexception] "https://packagist.org/packages.json" file not downloaded: ssl operation failed code 1. openssl error messages: error:14090086:ssl routines:ssl3_get_server_certificate:certificate verify failed failed enable crypto failed open stream: operation failed note: have installed composer able see list of commands if type composer in terminal. linux ubuntu laravel composer-php

IDL batch processing: fully automatic input selection -

IDL batch processing: fully automatic input selection - i need process modis ocean level 2 info , obtained external plugin envi https://github.com/dawhite/epoc/releases. now, want batch process hundreds of images modified code next code. code running fine, have select input file every time. can please help me create programme automatic? appreciate , lot help! pro ocl2convert dir = 'c:\modis\' cd, dir ; batch processing of level 2 ocean chlorophyll info files=file_search('*.l2_lac_oc.x.hdf', count=numfiles) ; command search files in directory end ; specified 1 counter=0 ; counter tells idl file beingness read-starts @ 0 while (counter lt numfiles) begin ; command tells idl start loop , finish when counter ; equal number of files name specified name=files(counter) openr, 1, name proj = envi_proj_create(/utm, zone=40, datum='wgs-84') ps = [1000.0d,1000.0d] no_bowtie = 0 ;same not setting keyword no_msg = 1 ;same set...

search - How can I exclude scores that equal 0 in a Solr function query and maintain the actual score? -

search - How can I exclude scores that equal 0 in a Solr function query and maintain the actual score? - my goal round score grouping similar items , sort field (let's utilize cost example). i'm able accomplish next query: /select?deftype=func&q=rint(product(query({!v=the search term}),100))&fl=score,price&sort=score%20desc,price however, query returns every document indexed in solr. how can filter query items score of 0 excluded? i've tried adding {!frange l=1} query kind of worked... made of scores equal 1. isn't because need show relevant results first. thanks in advance help. alex i spent hours trying filter out values relevance score of 0. couldn't find straight forwards way this. ended accomplishing workaround assigns query function local param. phone call local param in both query ( "q=" ) , filter query ( "fq=" ). example let's have query like: q={!func}sum(*your arguments*) ...

matlab - Huffman coding for jpeg compression -

matlab - Huffman coding for jpeg compression - i m working on jpeg compression m using huffman coding , decoding,i dnt want utilize inbuilt function (huffmandict,huffmanencdo,huffmandeco) instead of inbuilt function coding can use.here encoded out of runlength coding. head=0; pos=0; s_=size(encoded); i=1:s_(2) if (pos~=0) s=size(head); f=0; k=1; while (f==0 && k<=s(2)) if (encoded(i)==head(k)) f=1; end; k=k+1; end; else f=0; end; if (f==0) pos=pos+1; head(pos)=encoded(i); end; end; %compute probability symbols% s_h=size(head); count(1:s_h(2))=0; i=1:s_h(2) j=1:s_(2) if (encoded(j)==head(i)) count(i)=count(i)+1; end; end; end; count=count./s_(2); %sort accordng maximum number% i=1:s_h(2)-1 j=i+1:s_h(2) if (count(j)>count(i)) t1=count(i); count(i)=count(j); count(j)=t1; t1=head(i); head(i)=head(j); head(j)=t1; ...

vb.net - An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in System.Data.dll -

vb.net - An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in System.Data.dll - i create project vb.net export info excels. error unhandled exception of type 'system.data.odbc.odbcexception' occurred in system.data.dll i connect database postgresql utilize postgresql odbc driver (psqlodbc). mainform.vb imports system.io imports system.data imports system.data.odbc public class mainform private function getdemodataset() dataset dim mycon new odbc.odbcconnection mycon.connectionstring = "driver={postgresql unicode};database=tscon;server=192.168.3.60;port=5432;uid=postgres;sslmode=disable;readonly=0;protocol=7.4;user id=postgres;password=1234;" dim da odbc.odbcdataadapter dim dt new datatable() dim str2 string mycon.open() str2 = "select * entity_tbl" dim ds new dataset da = new odbc.odbcdataadapter(str2, mycon) da.fill(ds) ds.tables(0).tablename = "customer0"...