Posts

Showing posts from March, 2010

android - net_scheduler holding wakelock -

i have observed on occasions, net_scheduler keeps acquiring wakelock repeatedly on short durations , prevents android device sleep. from logcat, not able obtain conclusive information why might happening. of gms services active. can suggest when there higher chance occur perspective of gms services. this seems coming gcmnetworkmanager , schedules network-oriented tasks, google play services able batch network operations across system. also if use more advanced scheduling firebase jobdispatcher , internally gcmnetworkmanager used.

Backing up a Wordpress/Azure website -

Image
my website created in wordpress , hosted azure. i read in wordpress documentation need files , database separately. in azure, upgraded pricing plan standard can regularly scheduled backups. in azure, divided "storage" , "database". if have azure backups configured, should still backup hard copy? need backup on wordpress side of things? when use azure website backup feature backup following- 1. web app configurations 2. actual web app file contents(everything that's under site) 3. azure sql or mysql database - optional. i.e. can choose or not. so don't have backup site separately. when schedule backups can either schedule full backup or partial backup using kudu console (if don't want things such static content or log files everyday) these backups stored in azure storage containers , 1 advantage of using backup service have options directly restore website of backups. also, if want take manual backup , store local hard drive o

ruby - Why does passing a method as an argument (&block) not work? -

clock takes block: def clock(&block) hours = time.new.hour puts hours hours.times block.call end end this works, , puts "dong" on screen, based on hours of today: clock puts "dong..." end i'm trying pass dong method: def dong puts "dong..." end to clock block. this: clock(dong) throws error: `clock': wrong number of arguments (1 0) (argumenterror) can explain why first 1 works, second doesn't? have explicitly define code block you're passing, or can reference method code block? because clock(dong) doesn't call clock dong method block, calls result of calling dong method. thus, argument error, because try call method ( clock ) 1 argument, while expected none (except optional block, not count). to use dong method block in invocation, can do: clock(&method(:dong)) method(:dong) give method object representing dong method (instead of calling it), while & conv

mysql - error using copy from in postgresql when value is '2"%' -

i have table 300,000 rows not under control need import. i export data mysql using: mysqldump -u root --password=secret --fields-enclosed-by='\"' -t/tmp apflora_beob then try import each table using example: \copy beob_evab '/users/alex/tmp/beob_evab.txt' (format 'csv', delimiter e'\t', null '\n', escape e'\"', encoding 'utf8'); this works tables, 1 containing 450,000 rows. on 1 error: error: value long type character varying(10) context: copy beob_evab, line 190310, column couv_mousses: "2\% \n \n \n \n \n \n \n \n \n \n 30 \n 15 \n \n \n \n \n \n \n \n \n \n \n \n 0.01 \n \n bachs, dau..." when check field couv_mousses in line 190'310 contains value: 2"% . what have change work? in order achieve correct output "2""%" according @klin (thanks!) have add --fields-escaped-by='"' mysqldump command. becomes: mysqldu

html - Text inside navigation bar automatically moved to the right on other screen sizes -

i've been trying figure out days now. have problem text on navigation bar (this happens other lists between <div> s) behaves weirdly , keeps moving right when @ website on screen other 1 i'm programming on though use percentages. think problem lays in divdoesn't adjust correctly smaller or bigger getting screen. this how looks on laptop , how want on screens of bigger or smaller size said on different screens moves right. i'm new programmer if u see useless code please ignore i'm still learning lot, seems can't figure out. html: <div id="navbar"> <ol id="navbartext"> <a href="buynow.html"><li class="navbarhover" >buy now</li></a> <li>&nbsp;</li> <li class="lijn"></li> <li>&nbsp;</li> <a href="news.html"><li href="news.html" class="navbarhover">news<

android - NPE with retrofit and nested JSON response -

i using retrofit 1.9 , i'm having trouble getting values nested json response. here response { "access_token": "83ebeabdec09f6670863766f792ead24d61fe3f9", "athlete": { "id": 227615, "resource_state": 3, ... } } i have class handle response: public class authresponse { string accesstoken; stravaathlete stravaathlete; public authresponse(string accesstoken, stravaathlete stravaathlete) { this.accesstoken = accesstoken; this.stravaathlete = stravaathlete; } public string getaccesstoken() { return accesstoken; } public stravaathlete getstravaathlete() { return stravaathlete; } } and class nested json object: public class stravaathlete { string id; public stravaathlete(string id) { this.id = id; } public string getid() { return id; } } unfortunately whenever call authresponse.getstravaathlete().geti

javascript - How can I move all my CSS box shadows back under div -

Image
so have 3d - paper effect on div, has been created multiple box-shadow properties. don't know how animate them when hover div, slide under. thinking css animations or jquery/javascript. fine. html: <div class = "project"> <p>our own js library <br /> <br /> still working on <br /> <span class = "platforms"> <i class = "fa fa-cogs fa-3x" id = "swing"></i> </span> </p> </div> css .project { background-color: rgb(230, 230, 230); min-height: 300px; color: #007fff; padding: 1%; box-shadow: 4px 4px #fff, 5px 5px #ccc, 9px 9px #fff, 10px 10px #ccc, 14px 14px #fff; } result: you can transition css property. this: transition: box-shadow 1s; followed box-shadow want on :hover . maybe this: box-shadow: 0 0 #fff, 0 0 #ccc, 0 0 #fff, 0 0 #ccc, 0 0 #fff;

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -

hello, guys. i'm trying retrieve data oracle database, nothing appears on screen. here userslist.jsp <%@page contenttype="text/html" pageencoding="utf-8"%> <!doctype html> <html> <head> <title>spring mvc hello world</title> </head> <body> <h2>all users in system</h2> <table border="1"> <tr> <th>user id</th> <th>login</th> </tr> <c:foreach items="${users}" var="user"> <tr> <td>${user.userid}</td> <td>${user.login}</td> </tr> </c:foreach> </table> </body> </html> it seems ok. , here spring controller userscontroller.java package com.controller; import com.database.users; import com.service.usersmanager; import java.util.list; impo

JQuery - Datatable search using dd/mm/yyyy -

i have datatable have date fields. since in australia, have set date format dd/mm/yyyy using date-uk.js formatting fine. however, when go search field , type in date using dd/mm/yyyy, not give right results. have enter date in yyyy-mm-dd format correct information. is there way can modify search correctly search when enter date in dd/mm/yyyy format? you add data way want searchable td : <td data-search="24/01/2016">24/01/2016</td> to sure search data way want... (reference here)

Video processing and hosting with API? -

i looking provider of video hosting , processing api let users upload videos via php them. should possible stream video resized if necessary /video1234/400x600. currently use cloudinary servers slow, market leader in field? have @ https://aviapi.com . it's in beta , gives a full-featured 30 day free trial try. looks new kid on block looks promising. aviapi audio, video , image manipulation , processing api whole lot of features. audio , video, tools aviapi provides extracting video , audio segments, extract video poster / thumbnail, resize video, rotate video. filters provide watermark video, video , audio slow motion / fast forward, mute video, extract audio video. api allows save 1 video , audio format , alter quality of output media. other features added change audio codec, video codec, audio bit rate, video bit rate, audio quality, change volume, set audio channels, change audio sample frequency. images, tools aviapi provides smart compression, smart crop, regu

html - how do I host my webpage in localhost on my Mac? -

Image
i working on webpage & see how renders on iphone's safari browser. rather officially purchasing domain & hosting, because in development stage want view on mobile safari temporarily. so far have enabled web sharing: and when type in ip address in iphone's safari, localhost seems up: i have re-created "sites" folder: so how host current webpage working on localhost, being able access on mobile safari? *note want both html , css files accessed show complete webpage you should consider downloading , installing prepos , you'll able view website in device connected same network. it's easy use , trial version never expires! after installing mac, drag , drop site root folder prepos. there's tab can see http path view in device: tv, tablet, smartphone or device internet access. requirement must connect same network.

Java EXCEPTION_ACCESS_VIOLATION - strictly a JVM issue? Nothing on my part? -

this message not long seems - attached lengthy log report @ end hi all, i running experimental crawler implemented in java. recently, after 36 hours operation, jvm crashed issuing exception access violation log file. read lot file, still little cryptic me. here relevant "stack" version inside generated log file: stack: [0x0000000033270000,0x0000000033370000], sp=0x000000003336f8b0, free space=1022k native frames: (j=compiled java code, j=interpreted, vv=vm code, c=native code) v [jvm.dll+0x138998] v [jvm.dll+0x3f238a] v [jvm.dll+0x3efa30] v [jvm.dll+0x3ecfbe] v [jvm.dll+0x299f7a] c [msvcr100.dll+0x21d9f] c [msvcr100.dll+0x21e3b] c [kernel32.dll+0x159ed] c [ntdll.dll+0x2c541] as can see, @ least log file, error did not start java code, ntdll library, instructions execution reached exception @ jvm [ edit: or maybe other way around? ended ntdll? ]. do not want dismiss "well... i'll reinstall jvm , windows , maybe it'll work" (though i

Can't save compressed file to temporary storage Android -

i have code create temporary file save compressed image file before sending out server. image gets server , saved. problem file 0 kb , i'm sure compression isn't good. looks file isn't getting saved fileoutputstream , after reading documentation , examples, i'm not seeing why not. also, bitmap has 8294400 bytes , saved file has length of 0. that's why think happens while being sent out on fileoutputstream . bitmapdrawable drawable = (bitmapdrawable) profileimage.getdrawable(); bitmap bmap = drawable.getbitmap(); string filename = "tempimage"; file file = null; try {; file = file.createtempfile(filename, null, getapplicationcontext().getcachedir()); } catch (ioexception e) { e.printstacktrace(); } fileoutputstream fout = null; try { fout = new fileoutputstream(file); } catch (filenotfoundexception e) { e.printstacktrace(); } try { fout = openfileoutput(filename, mode_private); bmap.compress(bitmap.compressformat.jpeg,

database - Easy way to store multiple data in Python 3 -

i pretty new python, , far haven't stumbled upon problems, until now. need data structure allows me store multi dimensional data. example, need irc bot store users , modes on channel. this: [name][users][nicklist][modes][topic][etc] [#home][50]['nick1', 'nick2', 'nick3', 'etc'][+nt][topic here][more info] [#otherchan][10]['nick1', 'nick2', 'nick3', 'etc'][+][topic][more info] and need recall , edit information via channel name. been looking lists , arrays have not found convenient way accomplish this. if there better way this, that'd great too. hope i'm explaining myself well. it sounds want use dict object. d = {} d['#home'] = {} d['#home']['users'] = 50 d['#home']['nicklist'] = ['nick 1', 'nick 2'] and on you can retrieve values array print d['#home']['users'] 50

sql server - How large of a SQL string (for mass update) can I realistically use in C# .net4? -

i'm recieving , parsing large text file. in file have numerical id identifying row in table, , field need update. id current location ========================= 1 boston 2 cambridge 3 idaho i thinking of creating single sql command string , firing off using ado.net, of these files i'm going recieve have thousands of lines. doable or there limit i'm not seeing? if may have thousands of lines, composing sql statement not way go. better code-based alternatives include: use sqlbulkcopy insert change data staging table , update target table using staging table source. has excellent batching options (unlike other choices) write stored procedure update accepts xml parameter contains update data. write stored procedure update accepts table-valued parameter contains update data. i have not compared them myself understanding #3 fastest (though #1 plenty fast need).

jsf - /index.xhtml Not Found in ExternalContext as a Resource -

my jsf web application shows following error: /index.xhtml not found in externalcontext resource. my directory structure is: - java resource -- src --- br.com.k19.controle ---- numeroaleatoriobean.java --- resources - javascript resources - build - webcontent -- meta-inf -- web pages --- index.xhtml --- formulario.xhtml -- web-inf where need put /index.xhtml in structure? the webcontent folder represents web content. placed index.xhtml file inside web pages subfolder right url be http://localhost:8080/projectname/web pages/index.xhtml and not http://localhost:8080/projectname/index.xhtml as seemed expect. if want have on context root, rid of web pages folder altogether , move .xhtml files directly inside webcontent folder, in same level meta-inf , web-inf : projectname |-- java resources | `-- src | `-- br.com.k19.controle | `-- numeroaleatoriobean.java |-- resources |-- javascript resources |-- build `-- web

scala - How to build a bundle sbt from source for offline use? -

my goal have sbt jar file dependencies in order create debian package, install on machine without check/install package @ first run. right choice use sbt-assembly build sbt jar dependencies? the sbt binary version doesn't come dependecies , sbt download them @ first run. i don't understand use case, sbt-native-packager .deb format fit?

swift - Set high score as elapsed time in iOS -

the high score in game time based , having trouble setting comparing current score. code far doesn't work: class gamescene: skscene, skphysicscontactdelegate { // initialise value current time var currenttime = nsdate() var besttime = nsdate() override func didmovetoview(view: skview) { super.didmovetoview(view) // set current time 0 seconds var date0 = nsdate(); let timeinterval = floor(date0 .timeintervalsincereferencedate / 60.0) * 60.0 date0 = nsdate(timeintervalsincereferencedate: timeinterval) currenttime = date0 // call start timer nstimer.scheduledtimerwithtimeinterval(0.1, target: self, selector: "printduration:", userinfo: nsdate(), repeats: true) then func printduration(timer: nstimer) { if self.view?.paused == false { guard let userinfo = timer.userinfo else { return } guard let startdate = userinfo as? nsdate else { return } let duration = nsda

Playscape SDK 1.17 android apk crash on start -

unity3d v5.3.2f1 created empty project without scripts, simple scene playscape object on it. 1 - imported playscape sdk 1.17 2 - imported google play sdk 0.9.30 3 - configured playscape , google play. 4 - compile android build 5 - on different android devices apk crash on begin. playscape config log device: https://www.dropbox.com/s/zhwvtsqbkew07ed/terminal%20saved%20output?dl=0 unfortunately, playscape sdk doesn't support google play sdk 0.9.30 now. please use google play sdk 0.9.21 .

git - Installing modules for Perl 6 using Panda but behind a proxy -

seem lost on one. anytime panda, (update/install) following error: could not download module metadata: failed connect: connection timed out. falling curl command. curl failed: spawned process exited unsuccessfully (exit code: -16). falling wget command. wget failed well: spawned process exited unsuccessfully (exit code: -16). sorry, have give up. in block @ c:\rakudo\share\perl6\site\sources\61c4e003fb65304a1a6771d177815a47c2333d7e line 138 in @ h:\.perl6\2016.01.1\precomp\34c40ed80206941c844106c0becebd0bce0e58e3.1454618830.87862\61\61c4e003fb6530 4a1a6771d177815a47c2333d7e line 1 in block @ c:\rakudo\share\perl6\site\sources\61c4e003fb65304a1a6771d177815a47c2333d7e line 134 in @ h:\.perl6\2016.01.1\precomp\34c40ed80206941c844106c0becebd0bce0e58e3.1454618830.87862\61\61c4e003fb6530 4a1a6771d177815a47c2333d7e line 1 in block @ c:\rakudo\share\perl6\site\sources\61c4e003fb65304a1a6771d177815a47c2333d7e line 128 in @ h:\.perl6\2016.01.1\precomp\34c40ed80206941c84

How do I get Atomikos JMS to work with Weblogic -

i using atomikos transactions , weblogic jms. client receiving jmsclientexceptions stating getxaresource can called server. http://docs.oracle.com/cd/e17904_01/web.1111/e13731/jtatximp.htm#i1060046 describes how weblogic work third-party transaction manager. states "you must register weblogic server interposed transaction manager subordinate foreign transaction manager." unable figure out how this. appreciated.

apache - .htaccess how to handle dynamic sub-domain redirect to https and no sub-domain to www -

i have htaccess file gitignored , while upgrading laravel 5.2 deleted old 1 on server. spent hours piecing , i'm struggling recreate it. i need http://domain.com or https://domain.com to goto https://www.domain.com and other wildcard sub-domains such as: http://myname.domain.com to goto https://myname.domain.com so far have this: rewritecond %{https} off rewriterule .* https://%{http_host}%{request_uri} [l,r=301] rewritecond %{http_host} !^www\. rewriterule .* https://www.%{http_host}%{request_uri} [l,r=301] to redirect subdomains , main domain https, can use: rewriteengine on #--redirect subdomain https--# rewritecond %{http_host} ^((?!www\.).+)\.domain.com$ [nc] rewritecond %{https} off rewriterule ^ https://%{http_host}%{request_uri} [nc,r,l] #--redirect maindomain https --# rewritecond %{http_host} ^(www\.)?domain.com$ [nc] rewritecond %{https} off rewriterule ^ https://www.domain.com%{request_uri} [nc,r,l] #--redirect non-www www o

r - Group by combined with matching -

small rep of data set: team1 <- c("atl", "chi", "cle", "det", "gsw", "nop", "bkn","atl", "phi","chi") home.away <- c("vs.", "vs.", "@", "@", "vs.", "@", "vs.","vs.", "@","@") team2 <- c("det", "cle", "chi", "atl", "nop", "gsw", "chi","phi", "atl","bkn") date <- as.date(c("2015-05-14", "2015-05-14", "2015-05-14", "2015-05-14","2015-05-14", "2015-05-14", "2015-05-15","2015-05-15", "2015-05-15","2015-05-15")) pts <- c(94, 97, 95, 106, 111, 95, 100,112,87, 94) df <- data.frame(team1,home.away,team2,pts,date) df team1 home.away team2 pts date

c++ - Find the number of ways the N balls could be placed in the M boxes -

you have n different balls numbered 1 n , , m different boxes numbered 1 m . input: first line of input contains number of test cases t . after that, next t lines contain value of n , m . output: for each test case, print answer. can large, should print modulo 10^9 + 7 . i tried below code, gives error: #include<iostream> #include<cmath> #include<math.h> using namespace std; int main() { unsigned short int t; unsigned long int n,m; cin>>t; (int = 0; < t; i++) { cin>>n>>m; long int res; res= pow(m,n); int c=0; c=pow(10,9); res=res%(c + 7); cout<<res<<endl; } return 0; } you must facing integer overflow problem, that's why must have been getting wrong answer. do following steps fix problem. change unsigned long long long or unsigned long long . ( why ? think). use logarithmic user-defined fun

angularjs - Angular ng-click onsen -

so im new coding , cant seem figure out issue have. <ons-row ng-click="mynavigator.pushpage('{{building.file}}.html')"> so started , {{ building.file }} isn't going url. can me or explain why isnt workking? here complete code <div ng-init="buildings = [ {name:'name1',file:'file1', location:'location1', image:'images/img1.jpg', number:'(123) 400-0000'}, {name:'name2',file:'file2', location:'location2', image:'images/img2.jpg', number:'(123) 400-0000'}, {name:'name3',file:'file3', location:'location3', image:'images/img3.jpg', number:'(123) 400-0000'}, ]"> <!--there {{buildings.length}} restaurants--> <input type="search" ng-model="q" class="search-input" placeholder="search..." /> <br /> <ons-list > <ons-list-item modifi

Magento block reference order -

i created custom extension on magento render block on main content. how choose order displayed? right being displayed below content. there way define after or before block? how see name of blocks render before or after? app/code/local/spacename/infrontpage/block/infrontpage.php <?php class rand_infrontpage_block_infrontpage extends mage_core_block_template{ function getcustombanner() { return 'fernandao custom block'; } } ?> then have: app/code/local/spacename/infrontpage/etc/config.xm<?xml version="1.0"?> <config> <modules> <rand_infrontpage> <version>0.1.0</version> </rand_infrontpage> </modules> <global> <blocks> <infrontpage> <class>rand_infrontpage_block</class> </infrontpage> </blocks> </global> <fronten

Xcode Build error with Unity 3D and Google Cardboard for iOS -

i created simple unity project google cardboard sdk ios downloaded github. working in unity editor, once build file , try run in xcode build failed. disabled bitcode because getting complier error asking me enable/disable it. didn't solve issue. when try build xcode following error instead: undefined symbols architecture armv7: "_sectrustevaluate", referenced from: ___75-[gtmsessionfetcher urlsession:task:didreceivechallenge:completionhandler:]_block_invoke651 in libvrunity.a(gtmsessionfetcher.o) ld: symbol(s) not found architecture armv7 clang: error: linker command failed exit code 1 (use -v see invocation) environment: unity 5.3.2f1 xcode 7.2 (7c68) ios 9.2.1 (iphone 6s plus) google cardboard sdk ios _sectrustevaluate part of security framework on ios , wouldn't loaded when running in unity editor. in xcode project open project view , select tab 'build phases'. towards bottom of view there 'link binary librar

go - Want to choose a random number and not have it picked again until all numbers have gone through -

i'm looking pick random number 1-6 if example 1 picked program want make sure not again used until 2-6 has been picked. want in order have chance go through options instead of having same option 2 or maybe 3 times in row since there 6 options. ideas please? //choose random number recipe rand.seed(time.now().utc().unixnano()) myrand := random(1, 6) fmt.println(myrand) ... function processes it //random number function func random(min, max int) int { return rand.intn(max-min) + min } the part of program uses myrand each run used in if statement , tied recipe picked day //choose random number recipe rand.seed(time.now().utc().unixnano()) myrand := random(1, 6) fmt.println(myrand) //test below of random replacement list := rand.perm(6) i, _ := range list { fmt.printf("%d\n", list[i]+1) } //logic recipe choose if myrand == 1 { fmt.println(1) printrecipeoftheday(recipe1) } else if myrand == 2 { fmt.println(2) printrecipeoftheday(recip

R - ggplot2 change x-axis values to non-log values -

Image
i plotting payment distribution information , aggregated data after scaling log-normal (base-e). histograms turn out great want modify x-axis display non-log equivalents. my current axis displays [0:2.5:10] values alternatively, see values exp(2.5), exp(5), etc. any suggestions on how accomplish this? can add plotting statement scale x-axis values? maybe there's better approach - thoughts? current code: ggplot(plotdata, aes_string(pay, fill = pt)) + geom_histogram(bins = 50) + facet_wrap(~m_p) answered...final plot: not sure if after can change text of x axis labels whatever want using scale_x_continuous. here's without: ggplot(data = cars) + geom_histogram(aes(x = speed), binwidth = 1) here's with: ggplot(data = cars) + geom_histogram(aes(x = speed), binwidth = 1) + scale_x_continuous(breaks=c(5,10,15,20,25), labels=c(exp(5), exp(10), exp(15), exp(20), exp(25)))

uitextfield - Detect edit event on a textField view in iOS -

i have cell array not in cell collection or uitable. how detect edit event on 1 of cells? first of all, set tags textfields. can recognise current textfield. [textfield settag:101]; set delegate each textfield. [textfield setdelegate:self]; and @ last use uitextfield delegate textfielddidbeginediting detecting "edit" - (void)textfielddidbeginediting:(uitextfield *)textfield{ if(textfield.tag == 101){ //do } }

pivot - How to transform SQL Server row data to columns? -

i queried data this member_no cover_version product_id product_name product_type --------- ------------- ---------- -------------------- ------------ 11421 7 4 excellent more e 11421 7 15 comprehensive data d but want shape data this: member_no cover_version product_e_id product_e_name product_d_id product_d_name --------- ------------- ------------ -------------------- ------------ -------------------- 11421 7 4 excellent more 15 comprehensive data i using sql server 2008. should best approach shape data want? assuming you've got product types d , e stated, simple self-join you're after. if want more generic, please expand question. drop table if exists #demo select * #demo (values (11421, 7, 4, 'excellent more', 'e') ,(11421, 7, 15, 'comprehensive data', 'd'))

android - How to show advertisements in my Activity? -

i want put advertisement in application. set advertisement layout size. problem when run application in device, advertisement layout size decrease or increase depending on device height. i have multiple layout in screen gave weight property weight increase or decrease. here, xml layout in set layout advertisement: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/main_background" android:orientation="vertical" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="0.09"> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content"

c# - DataGridView editable cell input overwritten when another cell is updated -

i have datagridview bound through bindingsource datatable , , grid has editable columns user inputs value, , read-only columns programmatically updated in real time (think stock ticker). programmatically updated columns updating value in datatable , value in datagridview updated because of databinding. issue i'm having while user editing 1 cell, if cell updated programmatically text user has inputted in first cell gets overwritten (reset cell's value before edited). this doesn't seem unusual situation me, can't seem work properly. know might doing wrong, or can point me towards example shows how properly? this happening because when underlying value in datatable changes, datagridview.databindingcomplete event gets fired - resetting bindings. my first suggestion capture event , check if editedformattedvalue currentcell different value - if so, set value . worked - until checked first row - ignored logic. the solution find work change how pro

java - Add column to Join table? -

Image
i having trouble adding column existing join table. below how want join table like, missing tenant_id column in join table in actual implementation. below code jpa implementation: @entity @table(name = "label") public class label { @column(name = "tenant_id") private string tenant_id; @column(name = "label_id") private string label_id; @jsonignore @manytomany(targetentity = report.class, cascade = { cascadetype.persist, cascadetype.merge }) @jointable(name = "tagging", joincolumns = @joincolumn(name = "label_id"), inversejoincolumns = @joincolumn(name = "report_id")) private set<report> reports; } @entity @table(name = "report") public class report { @column(name = "tenant_id") private string tenant_id; @column(name = "report_id") private string report_id; @column(name = "created_by") private string created_by;

java - Zuul filter to duplicate traffic -

i use zuul efficiently (asynchronously) route copy of traffic debug service testing. new zuul , looking through existing filter find neat way haven't found example yet. there built-in zuul way "copy" request , forward different host? thanks help! there not built in way copy request.

php - Every new installation I get all old corrupted files of apache -

every new installation old corrupted files old folder not working me. apache2.conf file corrupted when uninstall apache2 using purge & clean command , install new apache2 every time old installed files. apache2 meta-package selects other packages. if installed apache installing package, need run clean automatically selected packages: sudo apt-get autoremove if doesn't work, might have installed 1 of dependents manually. can target apache2- packages space , nuke lot: sudo apt-get remove apache2* for future reference, find out package binary from, can run this: dpkg -s `which apache2` i'd expect come apache2.2-bin also try following command uninstall , remove configuration files. need stop apache service before uninstall. sudo apt-get purge apache2* sudo apt-get --purge remove apache2 apt-get remove apache2-common if have service running not installed (according apt), stop service , reinstall, issue command above.

python - Unable to run ipython notebook or anaconda (conda) commands in terminal -

i trying ipynb running on mac, running trouble. want run ipynb comes anaconda. this question close helping me not sure results checking which python , which python2.7 , which ipython . when type 'ipython' terminal, /bin/bash: /users/me/anaconda/bin/python.app: no such file or directory anaconda isn't located in /users/me/ don't know why bash looking there when i've put /usr/local/bin/anaconda/bin @ front of path (which did after post suggested check path variable). $ anaconda /usr/local/bin/anaconda/bin/anaconda $ python /usr/local/bin/anaconda/bin/python` $ python2.7 /usr/local/bin/anaconda/bin/python2.7 $ ipython /usr/local/bin/anaconda/bin/ipython i tried see if worked, because i'm guessing related problem having: $ conda -h -bash: /usr/local/bin/anaconda/bin/conda: /users/me/anaconda/bin/python: bad interpreter: no such file or directory` from responses i'm getting bash, looks pointing should be, why, when type ipython or cond

wordpress theming - Numeric Pagination on my custom category page -

i have create custom category page template numeric pagination problem not able view 3rd page posts. here code add in function.php function custom_pagination($numpages = '', $pagerange = '', $paged='') { if (empty($pagerange)) { $pagerange = 2; } global $paged; if (empty($paged)) { $paged = 1; } if ($numpages == '') { global $wp_query; $numpages = $wp_query->max_num_pages; if(!$numpages) { $numpages = 1; } } $pagination_args = array( 'base' => get_pagenum_link(1) . '%_%', 'format' => '/page/%#%', 'total' => $numpages, 'current' => $paged, 'show_all' => false, 'end_size' => 1, 'mid_size' => $pagerange, 'prev_next' => true, 'prev_text' => __('prev

Go cgo ldap_init could not determine kind of name for C.ldap_init -

i trying learn , understand cgo. writing program in go connect ad , parse output. tested code in c, working fine expected. relevant part in c is char *ldap_host = "x.x.x.x"; int ldap_port = 389; ldap = ldap_init(ldap_host, ldap_port)) now trying same working in go as //#cgo cflags: -lldap //#include <ldap.h> import "c" func main() { var hostname *string hostname = &os.args[1] ldap_port := 389 ldap := c.ldap_init(*hostname, ldap_port) } but getting following error could not determine kind of name c.ldap_init what doing wrong here? i start getting basics of go , cgo working before adding individual peculiarities of library ldap. starting points, official cgo doc page. https://golang.org/cmd/cgo/ http://blog.golang.org/c-go-cgo https://github.com/golang/go/wiki/cgo starting top: you don't need cflags here, need ldflags linker, , liblber run. #cgo ldflags: -lldap -llber you can't pass

jsf - IntelliJ project errors "/hello.xhtml Not Found in ExternalContext as a Resource" -

my web.xml contains <welcome-file-list> <welcome-file>faces/hello.xhtml</welcome-file> </welcome-file-list> <!-- jsf mapping --> <servlet> <servlet-name>faces servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.xhtml</url-pattern&

Prism/WPF/C#: ModuleInitializeException When Trying to Run Published ClickOnce Application on other Machines. What Causes this issue? -

i working on application using wpf/prism/c#. publishing application via clickonce using visual studios 2015. application runs fine on development machine doesn't open after installation on other machine. from dev machine: win 7 64-bit i can open application fine in visual studios. likewise published clickonce version installs , runs fine. from other machines: win 8 64-bit installs seems succeed thereafter crash on startup , closes immediately. when happens see following message in windows event viewer: application: fileplayer.exe framework version: v4.0.30319 description: process terminated due unhandled exception. exception info: prism.modularity.moduleinitializeexception stack: @ prism.modularity.moduleinitializer.handlemoduleinitializationerror(prism.modularity.moduleinfo, system.string, system.exception) @ prism.modularity.moduleinitializer.initialize(prism.modularity.moduleinfo) @ prism.modularity.modulemanager.loadmodulesthatarereadyforload()

java - Spring MVC Hibernate Specified JDBC Driver oracle.jdbc.pool.OracleDataSource could not be loaded error -

i trying integrate hibernate spring. until dont introduce hibernate code & libraries, works fine. here code, welcome-servlet.xml <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd" xmlns:mvc="http://www.springframework.org/schema/mvc"> <context:annotation-config /&