Posts

Showing posts from January, 2015

hadoop - unable to run javac on Cloudera. I am getting a Class not found error -

javac giving me error on cloudera quickstart vm. beginner in java. have been struggling class path , hadoop class path day now. can please? javac -verbose -classpath /usr/lib/hadoop-...client.....jar maxtemperaturemapper.java getting mapper class not found error. kindly help. thanks, ram

android - Delete the application data by setting device administor active -

i want delete application data , trying activating device administrator active . public class appclass extends activity{ ...... case r.id.buttonclear: if (!mdpm.isadminactive(mdeviceadmin)) { intent intent = new intent(devicepolicymanager.action_add_device_admin); intent.putextra(devicepolicymanager.extra_device_admin, mdeviceadmin); intent.putextra(devicepolicymanager.extra_add_explanation, "process remove user installed applications, settings, wallpaper , sound settings. sure want wipe device?"); mparentfragment.startactivityforresult(intent, request_code_enable_admin); system.out.println("\n in device admin cannot security operations "); } else { // device administrator, can security operations system.out.println("\n in device admin can security operations "); mdpm.wipedata(0); ...

java - Hibernate Get Detached Object in Service, alter the ID and persist again -

i have asked this question here , same. im looking different approach. i have java spring mvc application. trying crud on 1 table, employee. i trying object database using hibernate, changes including altering id , , save again. doing in service layer i have following code in serviceimpl public class employeeserviceimpl extends genericmanagerimpl<employee, long> implements employeeservice { @override public void saveold(long key) { employee = (employee) employeedao.get(key); employee.setactive(false); employee.setempkey(null); employeedao.save(employee); } } but getting exception. org.springframework.orm.hibernate4.hibernatesystemexception: identifier of instance of com.table.model.employee altered 4 null; nested exception org.hibernate.hibernateexception: identifier of instance of com.table.model.employee altered 4 null from the question told above , have option use copy constructor, copy values except key , in servi...

Does Rust have syntax for initializing a struct field with an earlier field? -

example code, not compile: pub struct s { pub a: int, pub b: int } impl s { pub fn new(input: int) -> s { s { a: input + 1, b: } } } the b: a bit isn't valid syntax, there way in current rust? [rustc 0.13.0-nightly (eedfc0779 2014-11-25 22:36:59 +0000)] obviously repeat input + 1 or use temporary variable, i'm curious using already-initialized field input field. no, there not that, nor reasonable expect there ever be; rust’s ownership semantics make of little value apply copy types well, references too . the alternatives simple complicating language such feature pretty guaranteed not happen.

c# - Cannot implicitly convert type 'string' to 'Windows.UI.Xaml.Media.Imaging.BitmapImage -

i trying show image stored in local directory inside xaml design. i have path local image. imagepage.xaml <scrollviewer> <listview x:name="viewimage" selectionmode="none" isactiveview="true"> <listview.itemspanel> <itemspaneltemplate> <wrapgrid orientation="horizontal" maximumrowsorcolumns="1" /> </itemspaneltemplate> </listview.itemspanel> <listview.itemtemplate> <datatemplate> <grid x:name="imggrid"> <grid.rowdefinitions> <rowdefinition height="auto" /> <rowdefinition height="auto" /> </grid.rowdefinitions> <stackpanel> <grid height="50" width="50...

java - Unexpected runtime error while computing a text hover-- Eclipse -

i using eclipse indigo, got premgen space erorr, go eclipse.ini file , make memory space 512m, in place of 256. from this, mu eclipse hangs, , behaving unexpectedly. eclipse.ini file is -startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502 -product org.eclipse.epp.package.jee.product --launcher.defaultaction openfile --launcher.xxmaxpermsize 512m -showsplash org.eclipse.platform --launcher.xxmaxpermsize 512m--launcher.defaultaction openfile -vmargs -dosgi.requiredjavaversion=1.5 -xms40m -xmx512m the log file shows thos error. !session 2014-11-26 08:56:15.409 ----------------------------------------------- eclipse.buildid=i20110613-1736 java.version=1.7.0_71 java.vendor=oracle corporation bootloader constants: os=win32, arch=x86, ws=win32, nl=en_us framework arguments: -product org.eclipse.epp.package.jee.product command-line arguments: ...

symfony - Can't post to symfony2 -

i'm using symfony2 , i'm trying post form controller, controller take request everytime... when i'm using restclient, put post request when use $request->getmethod(), answer :/ the source code simple : <?php namespace tc\userbundle\controller; use symfony\bundle\frameworkbundle\controller\controller; use symfony\component\httpfoundation\request; use symfony\component\httpfoundation\response; class usercontroller extends controller { /** * @route("/user/register") * @method({"post"}) */ public function registeraction(request $request) { echo $request->getmethod(); return new response(); } } and when add requirements _method: post : tc_user_register: path: /user/register/ defaults: { _controller: tcuserbundle:user:register } requirements: _method: post i got : no route found "post /user/register" whatever do, symfony2 take request, idea ? thanks ! ...

swift - How do you color/customize the UIImagePickerController's Navigation Bar? -

Image
what correct way color uiimagepickercontroller's nav bar? merely tried see background color i'm getting faded color seen in image below; if view obstructing it. let picker = uiimagepickercontroller() picker.sourcetype = type picker.mediatypes = [kuttypeimage] picker.delegate = self picker.navigationbar.backgroundcolor = uicolor.redcolor() appears have view obscuring redcolor(): (lldb) po picker.navigationbar.subviews 2 values { [0] = 0x00007fe7bb52a890 [1] = 0x00007fe7bb52b670 } correct way create solid color navigation bar? for completeness, i'll add full color customization setup: let imagepicker = uiimagepickercontroller() imagepicker.navigationbar.translucent = false imagepicker.navigationbar.bartintcolor = .bluecolor() // background color imagepicker.navigationbar.tintcolor = .whitecolor() // cancel button ~ uitabbarbutton items imagepicker.navigationbar.titletextattributes = [ nsforegroundcolorattributename : uicolor.whitecolor...

java - Spring MVC mapping with path variable -

i have problem in big application rich context, , spent time understand why isn't mapped. tried create simple project , face same issue :( pom.xml <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.springapp</groupid> <artifactid>testmvc</artifactid> <packaging>war</packaging> <version>1.0-snapshot</version> <name>testmvc</name> <properties> <spring.version>4.1.1.release</spring.version> </properties> <dependencies> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version...

for loop - Looping a list through dictionary values python -

i wondering if it's possible loop list of values example: lst = ['rh', 'cd241', 'c2', 'sczd9', 'rg59l', 'wnt3a'] through values of dictionary example: ref_dict = { '': [''], '6005': ['rh50a', 'cd241', 'slc42a1'], '603': [''], '6000': [''], '8787': ['perrs', 'rgs9l', 'mgc26458'], '41': ['accn2', 'bnac2', 'hbnac2'], '8490': [''], '9628': [''], '5999': ['sczd9'] } to check if individual value in list has value in dictionary, if have value, return me key in value in. example : lst value cd241 in dictionary '6005': ['rh50a, cd241, slc42a1'] , return me key "6005" . from collections import defaultdict lst = ['rh', 'cd241', 'c2', 'sczd9', 'rg59l',...

java - Show a JFrame while waitFor another process to end -

in application when backup button pressed, take time create database backup, need display jframe contains "please wait.." message, , want dispose when backup process completed. following code, never shows jframe, application stuck until process ends. try { waitview wait = new waitview(); wait.setlocationrelativeto(null); wait.setvisible(true); process p = runtime.getruntime().exec("cmd /c mysqlbackup.bat", null, new file("c:\\mysqlbackups")); p.waitfor(); wait.dispose(); messageservice.showmessagedialog(messageservice.backup_successful, "successful", "info"); } catch (exception ex) { ex.printstacktrace(); } wrap code in swingutilities.invokelater() process p = runtime.getruntime().exec("cmd /c mysqlbackup.bat", null, new file("c:\\mysqlbackups")); ...

java - how to know which JTextField is changed in a set of fields -

i working on app reads database , fills table(each row has title, author, publisher. etc) . have set of textfields has information each row(location, copies, price). when select single row, , change fields change reflected perfectly. however, when select multiple rows, , changes 1 filed(e.g price) instead of refelcting field, information on textfields stored in selected rows.this screenshot of program http://i.imgur.com/ymw7iy5.png in summary, problem how determine field user changed? (so can modify attribute object, without overwriting previous ones). this how info table update book in db arraylist<title> books = getall(rowindex); int index=0; for(title b:books){ b.setisbn((string) rectable.getvalueat(rowindex[index], 0)); b.settitle((string) rectable.getvalueat(rowindex[index], 1)); b.setauthor((string) rectable.getvalueat(rowindex[index], 2)); b.setcountry((string) rectable.getvalueat(rowindex[index], 3)); b.set...

php - Can I select multiple cells or a set of ranges in order to style them? -

i know can access range of cells in order format them : $objphpexcel->getactivesheet()->getstyle('b3:b7')->getfill() ->setfilltype(phpexcel_style_fill::fill_solid) ->getstartcolor()->setargb('ffff0000'); now there way, , if yes, how can define multiple cells or set of ranges within getstyle() call? tried $objphpexcel->getactivesheet()->getstyle('b3:b7;c6:c12')->getfill()->... and $objphpexcel->getactivesheet()->getstyle('b3;c9;d2;e6')->getfill()->... but both didn't work , threw error. according mark baker (coordinator of phpoffice suite of open source libraries) , that doesn't work, [you can] [define] 1 range @ time. source: comments above.

undefined method `authenticate_user! Api::PostsController in Devise / Rails 4 -

there following routes in project: root 'home#index' namespace :api, defaults: { format: :json } devise_for :users, controllers: { sessions: "api/sessions" } resources :posts end user model: class user < activerecord::base has_many :posts, dependent: :destroy has_many :comments, dependent: :destroy validates :name, presence: true devise :database_authenticatable, :rememberable end session controller: class api::sessionscontroller < devise::sessionscontroller def create @user = user.find_for_database_authentication(email: params[:user][:email]) if @user && @user.valid_password?(params[:user][:password]) sign_in(@user) else warden.custom_failure! @errors = [ 'invalid email or password' ] render 'api/shared/errors', status: :unauthorized end end end application controller: class applicationcontroller < actioncontroller::base # p...

single sign on - Right design for SiteMinder -

Image
i have give recommendations architecture sso using site minder. have few j2ee applications. these j2ee applications designed work when http headers have information after authentication sso provider. have kept our applications sso provider agnostic. means rely on headers sso provider. worked rsa sso provider. now there architecture proposed siteminder. way request flow is siteminder iis -> apache reverse proxy -> tomcat application -> backend applications. to break down have a) siteminder iis (public facing site) b) apache reverse proxy ( routing) c) tomcat application (for routing , logic site access based on time) d) backend applications the reason bringing new architecture end applications have code site access. site can down time, controlled property file. i find architecture wrong. not understand why apache reverse proxy requried. still go simple architecture flow a) siteminder iis doing routing -> backend applications(accessing common serv...

xslt 2.0 - apply templates select substring-after -

i've below xml line. <toc-title>1. <content-style>short title</content-style></toc-title> here wanted apply templates on substring-after 1. i tried below xslt. <xsl:template match="toc-title/text()" mode="x"> <xsl:analyze-string select="substring-after(.,' ')" regex="([a-z]+)"> <xsl:matching-substring> <xsl:apply-templates select="regex-group(1)" mode="x"/> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string> </xsl:template> <xsl:template match="text()" mode="x"> </xsl:template> but when run throws below error. xslt 2.0 debugging error: error: file:///c:/users/u0138039/desktop/flphk_chap.xsl:239: not node item - item has type xs:...

jquery - Kendo Grid - How to add columns dynamically? -

this question has answer here: how change columns set of kendo grid dynamically 10 answers for grid view have json array of objects filled dynamically. is possible generate columns dynamically posssibility edit values on model , send them in update request? thanks advice or example. same question asked here . first need resolve columns json array , store them in array. create columns , use grid column option set columns dynamically. need kendo datasource showing data. here great example @paritosh how accomplish need. var columns = data; var configuration = { editable: true, sortable: true, scrollable: false, columns: columns //set columns here }; var grid = $("#grid").kendogrid(configuration).data("kendogrid"); kendo.bind($('#example'), viewmodel); //viewmodel data in jsfiddle

c# - How to get entity type in EntityFramework when TPH inheritance model is used -

we use table per hierarchy (tph) store inherited entities in ef6.1 (code first). internally ef uses column discriminator keep type of entity. i can retrieve specific entity types using oftype<>() extension. can check type of entity using is operator. cannot figure out how retrieve entity type itself. have hierarchy of several entities , need retrieve few properties (i don't want load whole entities) need select entity type. current solution below. suboptimal. there way how type in better way? return dbset.where(o => o.id == id) .selectmany(o => o.basetransactions .where(o => !(o x00transaction))) .select(o => new transactioninfodto { transactionid = o.id, amount = o.amount, transactiontype = o x01transaction ? loandetailtransactiontype.x01 : o x02transaction ? loandetailtransactiontype.x02 : o x03transaction ...

java - Authorization using shibboleth sso -

we have integrated shibboleth web sso our application authenticate user, want authorization our application. below process thinking authz. according shibboleth idp, unauthenticated user redirects login.jsp idp once user enters username , password, page going our database , authenticates user valid or not. here want permissions user if authenticated. now again user redirects idp some information along permissions, idp redirects our service provider permissions, no can control authorization users. here came know have deal attribute-resolver.xml , right using principle , transientid in xml. know requierd info(permissions) saml response shibboleth idp. so please tell me, how deal attribute-resolver.xml add our permissions authorization. imp question: what better process authorization using shibboleth? kindly following flow following... authentication flow idp , writing our own sp. 1) below encodesaml request going idp following: public pair<string,string> getsaml...

Sort 2D array in C -

i have array: [105][2500] [110][1800] [105][800] [105][1300] [110][1200] ... and need this: [105][800] [105][1300] [105][2500] [110][1200] [110][1800] ... new edit: that's code now: row nuber of rows, array 2d int array[row][2] ... (i = 0; < row; i++) printf("(%d, %d)\n", array[i][0], array[i][1]); qsort(array, row, 2*sizeof(int), compare); printf("\n sorted: \n"); (i = 0; < row; i++) printf("(%d, %d)\n", array[i][0], array[i][1]); ... compare function: int compare(void const *p_lhs, void const *p_rhs) { int const *lhs = (int const *) p_lhs; int const *rhs = (int const *) p_rhs; // printf("%d %d - %d %d", lhs[0], rhs[0], lhs[1], rhs[1]); if(lhs[0] < rhs[0]) return -1; if(lhs[0] > rhs[0]) return 1; if(lhs[1] < rhs[1]) return -1; if(lhs[1] > rhs[1]) return 1; return 0; } output pritf in compare function: http://i.imgur.com/qpuxepf.png output is: http://i.imgur.com/pzk8k...

c# - Is there a way to use the Windows Form table in a Razor view cshtml? -

i've been wondering there way in razor view use windows table(basically want use different table standard html 1 can filter results automatically table rather using checkboxes or whatsoever that). i'm quite noob asp.net , html question might bit stupid have no clue , i'm having trouble finding information on internet. greetings , in advance, marijn windows forms , asp.net mvc absolutely different technologies. see result of asp.net mvc browser, , browser shows html. answer no, there no way use windows forms table in asp.net mvc. it's not bad. there lot of examples of tables asp.net mvc. try http://www.jtable.org/ . it's not perfect, start.

parse.com - PFProduct data browser - unable to edit -

i created 2 rows in pfproduct class. when try change screenshot or title, showing error: method not allowed . not able edit values in columns once create object? regards aaron this seems bug in parse's servers, , has been reported ( bug report ). working fine couple of days ago. hopefully fix soon.

mysql - Access forbidden when making request to PHP script from Android device -

while trying build first app communicates remote server files trying access php file (with hardcoded data) on local server android app. problem php file returning xml data , not json have put header('content-type: application/json; charset=utf-8') to make sure return json no use. below code of andoroid app , php file. can please ? have put log cat shows bunch of xml tags not data activity code snippet string responsestring; responsestring = com.rrdtech.example.generic.genericutility.getresponse(url_all_products); log.i("inside doinbg=",responsestring); getresponse (url) code below public static string getresponse (string url) { httpentity entity = null; stringbuilder sb = null; try { httpclient httpclient = new defaulthttpclient(); httpget httppost = new httpget(url); log.e("log_tag_htppost", httppost.tostring()); httpresponse response = httpclient.execute(httppost); ...

windows installer - misexec trying to update app that launched msiexec? -

we have updating app our product checks specific network location new msi, , if found, installs it. msi contains replacement update app well. when msi runs update app screen disappears after 3 seconds can see in task manager still running 20 seconds or so. we think installer tries kill using files in msi including update app , causes update app screen disappear. cannot prove if run update app somewhere else , fool thinking running product folder, not screen stay installation completes faster. lots of products have updaters , presume run copy of update app temporary location avoid problem. the issue face lot of our clients have highly constrained environments , there no certainty can copy or run exe location. i had expected find some switches on msiexec deal issue, see none. packaging update app separately 1 option, there else try first?

java - How to bypass null pointer exception?#JPF -

i trying run jpf , encountered following null pointer exception. java.lang.nullpointerexception @ gov.nasa.jpf.vm.threadinfo$stacktraceelement.createjpfstacktraceelement(threadinfo.java:1671) the code corresponds is: int createjpfstacktraceelement() { if (ignore) { return mjienv.null; } else { heap heap = vm.getheap(); classinfo ci = classloaderinfo.getsystemresolvedclassinfo("java.lang.stacktraceelement"); elementinfo ei = heap.newobject(ci, threadinfo.this); ei.setreferencefield("clsname", heap.newstring(clsname, threadinfo.this).getobjectref()); ei.setreferencefield("mthname", heap.newstring(mthname, threadinfo.this).getobjectref()); ei.setreferencefield("filename", heap.newstring(filename, threadinfo.this).getobjectref()); //line 1671 ei.setintfield("line", line); return ei.getobjectref(); } } there 2 ways your code should co...

android - no overlay is shown when clicking the button -

i changed style of button using following style <style name="mybuttonstyle" parent="android:widget.holo.button"> <item name="android:background">@color/bg_color</item> <item name="android:textstyle">bold</item> <item name="android:textsize">22sp</item> </style> the style applied wanted, when click button blue overlay of pressed state no longer shown, how can recover it? you setting custom background button , solid color, without state. blue overlay comes nine-patches of button you should use selector here or better: button drawable generator

sql server - Create mssql connection pool in node.js application -

i refering node-mssql library application in node.js using mssql database connection. mssql-ref . have checked creation pool of connections, found same mysql , not mssql. please give reference can find sample code snippet mssql connection pool node.js. thanks. you find information in page you're referring yourself. it's worth noting documenting not explicit how connection pool created. var connection = new sql.connection(config); the variable connection here connection pool still needs connect... var connection = new sql.connection(config, function(err) { // ... error checks // query var request = new sql.request(connection); // or: var request = connection.request(); request.query('select 1 number', function(err, recordset) { // ... error checks console.dir(recordset); }); }); or using promises omitting callback argument var connection = new sql.connection(config); //connection connection pool connection.connect().then(func...

java - Selenium test log -

i using selenium testing purpose - java webdriver 4. i need store results/status(pass/fail) of selenium test in database or can other way. need check if test case has passed or failed , log result in defect tracking tool via api. please have ever come across scenario please guide me. cant find way test results. thanks! you write own rule extending testwatcher , override failed , succeeded .

How to get the public IP address of localhost using asp.net c#? -

my problem have 127.0.0.1 private ip address of localhost. how can public ip address of localhost using c# asp.net? try code iphostentry host = dns.gethostentry(dns.gethostname()); ipaddress ip= host.addresslist.where(ip => ip.addressfamily == addressfamily.internetwork).firstordefault(); update looking public ip to should use http services http://checkip.dyndns.org check this answer exist in so

c++ - Mistake with loading double precision, floating point values on the registers? -

i'm trying learn operations using intrinsic, when simple loading of double precision values on registers following, gives memory access violation error. i'm sure i'm doing naive error. please identify error is? double a[2] = {10,12}; double * pointer = &a[0]; __m128d v = _mm_load_pd(pointer); thanks! a must 16-bit aligned; depending compiler, have mark __declspec(align(16)) (vc++) or __attribute__((aligned(16))) (gcc).

javascript - find all ":)" that are not surrounded by any character -

i'm trying change ":)" (without quotes) pictures. make match, smiley must surrounded spaces (or @ beginning or end of string). my attempt: /(?:^|\s)\:\)(?:$|\s)/g if smiley (at beginning of string or has white-space before it) , (is @ end of string or has white-space after it); a string works fine: ":) x :) x :)" such string not: ":) :) :) :)" (every second smiley changed). as understand, first smiley matched space after , next smiley neither @ beginning of string or has white-space anymore. i'm new regular expressions , can't figure out how fix logic :) p.s. maybe there shortcut find pattern not surrounded character? ( \b , \b not work that) how regex (?:\s|^):\)(?=\s|$) example : http://regex101.com/r/zy9xa3/2 problem /(?:^|\s)\:\)(?:$|\s)/g the \s after :) consumed regex engine second :) cannot have presceding \s solution use positive ahead the space after not consumed regex. (?=\s|$) ahead ...

How to deploy a Go application to Bluemix? -

i using bluemix run app, can deploy java app bluemix, know how deploy go app bluemix? you can deploy go application bluemix, need supply -b go buildpack url. there sample application can take look: https://github.com/acostry/go-on-bluemix

Auto Updater for Windows Phone 8.1 -

am allowed auto-updater wp8.1 app? if how possible? or, limited app store way of updating app? i have started embrace wp8.1 still newbie. thanks if developed app , yes , have update through store. http://msdn.microsoft.com/en-us/library/windows/apps/gg442301(v=vs.105).aspx for apps have installed store, can enable settings update apps automatically. http://www.windowscentral.com/do-you-automatically-update-your-apps-windows-phone-81

logic - Differences Omron ST and Siemens SCL -

what differences between omron st-language , siemens s7 scl (definition of variables, editor, syntax)? i know both claim standardized iec 61131-3. what omron programming suites there , structured language supported? scl (structured control language) seems siemens' version of structured text. potentially there few differences overall concept , features same. in terms of programming omron plcs , there's sysmac , supports structured text , ladder diagrams.

wrong center of mass x direction calculation (openCV Python) -

Image
i try calculate center of mass of objects in binary image opencv , python. use cv2.findcontours , cv2.moments wrong x direction. has positive offset of few pixels , don't why. think did in opencv doc. here example. green contour found cv2.findcontours. red calculated center of mass. my code is: import cv2 import numpy np img = cv2.imread('c:/users/arno/documents/masterarbeit/matlab/rect2.png', 0) cimg = cv2.cvtcolor(img, cv2.color_gray2bgr) contours = cv2.findcontours(img, cv2.retr_tree, cv2.chain_approx_simple) cnt1 = contours[0] cnt2 = contours[1] cv2.drawcontours(cimg, cnt2, -1, (0, 255, 0), 2) m = cv2.moments(cnt1) cx = int(m['m10']/m['m00']) cy = int(m['m01']/m['m00']) cv2.circle(cimg, (cx, cy), 1, (0, 0, 255), 2) cv2.imshow('center of mass', cimg)

gwt - Play framework 1.2.4 Error while loading DocViewerPlugin -

i've web application based on play 1.2.4 , gwt. works on own computer, not work on one. looks error comes play, use same version of play on both computers... could me error please ? thank much ~ _ _ ~ _ __ | | __ _ _ _| | ~ | '_ \| |/ _' | || |_| ~ | __/|_|\____|\__ (_) ~ |_| |__/ ~ ~ play! 1.2.4, http://www.playframework.org ~ ~ ctrl+c stop ~ java hotspot(tm) 64-bit server vm warning: ignoring option usesplitverifier; sup port removed in 8.0 listening transport dt_socket @ address: 8000 13:43:16,622 info ~ starting c:\appressources\appweb 13:43:16,638 info ~ module crud available (c:\play-1.2.4\modules\crud) 13:43:16,638 info ~ module secure available (c:\play-1.2.4\modules\secure) 13:43:19,696 error ~ @6kb811e5p error loading plugin loadingplugininfo{name='docviewerplugin', index=1000, url=f ile:/c:/play-1.2.4/modules/docviewer/app/play.plugins} oops: classformatexception unexpected error occured caused exception cla...

Cannot add or update a child row: a foreign key constraint fails from php and mysql -

Image
i working php file giving input database. , database giving following error cannot add or update child row: foreign key constraint fails (`amaradmission`.`login`, constraint `fk_login_students1` foreign key (`students_idstudents`) references `students` (`idstudents`) on delete no action on update no action) here php file: <?php header('cache-control: no-cache, must-revalidate'); header('expires: mon, 01 jan 2016 00:00:00 gmt'); header('content-type: application/json'); $host='localhost'; $user='root'; $pass=''; $con=mysql_connect("localhost","root",""); mysql_select_db("amaradmission",$con); $passingyear = $_get['passingyear']; $board= $_get['board']; $gpa = $_get['gpa']; $group = $_get['group']; //$data = array($passingyear, $board,$gpa, $group); //echo json_encode($data); $query="insert hsc(board,passing_year,gpa,...

c++ - Template Class Assignment Operator Overloading -

i'm having little trouble following: i'm writing map abstract data type coursework & i've come across problem whilst trying assign object of class (mapentry - below) array of same type in class mapadt. tells me that: error 1 error c2679: binary '=' : no operator found takes right-hand operand of type 'mapentry *' (or there no acceptable conversion) c:\users\cross_000\documents\visual studio 2013\projects\objectorientedmethodsasignment1\mapadt\mapadt.h 14 so thought write own assignment operator override. i've done in mapentry class definition compiler doesn't seem recognize when try initialize array in constructor on mapadt - below. any appreciated. #pragma once template <class tk, class tc> class mapentry { private: tk key; tc contents; bool ispopulated; public: mapentry() { } mapentry(tk keyinput, tc contentsinput) { key = keyinput; contents = contentsinput; ispopulat...

objective c - MDM iPCU Profile Installation Failed in iOS SDK -

i doing mdm vendor set , having apple enterprise account same.but after completing steps getting issue when try install iphone configuration utility file on iphone.we getting alert saying “profile installation failed” .please suggest suspect may wrong.following steps followed profile creation. for vendor: i created vendor csr on macbook called vendor.csr . email: enterprise account email. common name: company name. saved disk. uploaded vendor.csr file enterprise account , downloaded mdm.cer file account. loaded certificate key chain. exported .p12 file private.p12 file. extracted private key using command : openssl pkcs12 -in private.p12 -nocerts -out key.pem extracted certificate : openssl pkcs12 -in private.p12 -clcerts -nokeys -out cert.pem convert certificate des form : openssl x509 -in cert.pem -inform pem -out mdm.cer -outform des 8.stripped password private key : openssl rsa -in key.pem -out private.key for customer: now created 1 more csr push...

javascript - Why is my JQuery function not being called inside bootstrap html template -

i have started developing websites , facing issues. trying include jquery plugin html thumbnail carousel bar. issue jq function not being called. tried using other plugins facing same issue. here code. thanks <!doctype html> <html> <head> <script src="/media/js/jquery-ui.min.js"></script> <script src="/media/js/css3-mediaqueries.js"></script> <script src="/media/js/fwslider.js"></script> <script type="text/javascript" src="/media/js/jquery1.min.js"></script> <script type="text/javascript"> // junction working jquery(document).ready(function($) { $(".scroll").click(function(event){ event.preventdefault(); $('html,body').animate({scrolltop:$(this.hash).offset().top},1200); }); }); </script> <script src="/media/js/jquery.easydropdown.js...

customization - JPA custom findOne and findAll -

i have table place contain column "state" (it enum can 'active' or 'inactive') i know if there way jpa2 when call placerepository.findall() or placerepository.getone(id) select row in database marked "active" ? something list<place> findbystateactiveonly(); edit: bonus question: i'am @ moment refactoring project able add place (and other entities) in pending state. because have added column "state" have add queries condition "and p.state=my.package.state.active" this; @query("select p place p p.idplace = ?1 , p.state=my.package.state.active") isn't there way tell jpa automatically select me if state active ? thank you! with hibernate, can try annotating entity @where , this @entity @where(clause = "state = 'active'") public class place {...}