Posts

Showing posts from July, 2015

java - Simplify boolean expression -

this question has answer here: boolean checking in if() 10 answers i have bit of code , eclipse telling me boolean expressions can simplified. knightturn == true && occupied ==true and knightturn == true both boolean knightturn , boolean occupied set false earlier in code. boolean knightturn=false boolean occupied=false @tags({"passed"}) public void passed () { final int x = 50; if (knightturn == true && occupied == true) { (int i=0; i<x; i++) { standknight.moveavatar(i, 0); avatareditor.refresh(); i++; } occupied = false; } } @tags({"failed"}) public void failed () { final int x = 35; if (knightturn == true) { (int i=0; i<x; i++) { standknight.moveavatar(i, i/2); avatareditor.refr...

html - divs not floating as expected -

i have containing div 3 boxes inside of it. i'm trying them display on same line each other. i've used floats try achieve appear messed up. i know common problem , have looked through here find looking none of solutions seemed work expected. here's jsfiddle <div class="aboutcol1"> <div class="aboutbox1"> <div id="aboutbox-image1"> </div> </div> <div class="aboutbox2"> <div id="aboutbox-image2"> </div> </div> <div class="aboutbox3"> <div id="aboutbox-image3"> </div> </div> </div> you have forgotten put float rule div class aboutbox2 try fiddle , see if float issue. fiddle

Which optimization technique I need to get started with to study Evolutionary Algorithms? -

i starting graduate course names " evolutionary algorithms ". which optimization technique need started study evolutionary algorithms? is mathematical optimization, or, other type of optimization? here, there types listed:

sql server - t-sql 2012 update foreign key value in primary table -

in special request run, need update locker , lock tables in sql server 2012 database, have following 2 table definitiions: create table [dbo].[locker]( [lockerid] [int] identity(1,1) not null, [schoolid] [int] not null, [number] [varchar](10) not null, [lockid] [int] null constraint [pk_locker] primary key nonclustered ( [lockerid] asc )with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on, fillfactor = 97) on [primary] ) on [primary] create table [dbo].[lock]( [lockid] [int] identity(1,1) not null, [schoolid] [int] not null, [comboseq] [tinyint] not null constraint [pk_lock] primary key nonclustered ( [lockid] asc ) the locker table main table , lock table secondary table. need add 500 new locker numbers user has given me place in locker table , uniquely defined lockerid . need add 500 new rows correspsonding lock table uniquely defined in lock table , identified lockid . since l...

javascript - Firebase: Get userdata obj and bring back the user profile without page refresh? -

it's been 2 days i'm trying achieve need refresh page if want user profile db. there way without page refresh? need use sort of jquery ajax achieve it? possible? here 2 method, they're working need page refresh before bring user profile. function authdatacallback(authdata) { if (authdata) { var fb = new firebase('https://blistering-torch-8000.firebaseio.com/users/public/'); fb.child(authdata.uid).on('value', function(data) { var mydata = data.val(); var datestring = mydata.date.split(' ').slice(0, 4).join(' '); $('.profile').append('<li>username: ' + mydata.username + '</li>'); $('.profile').append('<li>joined: ' + datestring + '</li>'); }); var fb = new firebase('https://blistering-torch-8000.firebaseio.com/users/private/'); fb.child(authdata.uid).on('value', function(data) { var mydata = data....

java ee - org.hibernate.MappingException: Unknown entity: domain.ShoppingCart$Proxy$_$$_WeldClientProxy -

Image
i'm getting weird error, i'm not able debug. i'll obliged if can go through details , suggest me friends. i'm using jboss server 7.1. web app working fine modules. when i'm done products in cart, , "checkout", cause exception. i provided required information, please if need else let me know. i'd appreciate kind responses. lot viewing request. libraries included in project ( except jboss own included libraries ) hibernateutil.java public static sessionfactory getsessionfactory() { try{ configuration conf=new configuration(); conf.configure("/com/webshop/hb/config/mycfg-mysql.xml"); sessionfactory =conf.buildsessionfactory(); }catch(exception e){ e.printstacktrace(); } return sessionfactory; } shoppingcart.java package domain; import java.text.dateformat; import java.text.simpledateformat; import java.util.calendar; import java....

lowercase - Javascript to make a text field have capital first letter and rest lower case -

i using form software has limited editing capabilities, allows add java script. use php this, in case have use javascript, have little experience with. essentially on landing page, have form in people can submit. first name last name email etc. the problem - mail merge submissions, , when people enter name bob smith or bob smith , not bob smith, makes unprofessional when send them email. add javascript landing page when form submits, converts strings in first_name text field , last_name text field have first letter capitalized, , rest lower case. problem not think can edit form properties, if @ possible javascript go @ top of page, , dont have edit text field properties activate it...any appreciated. thanks here javascript gist building human-readable names created need plus little extra. i wont try explain , instead, here examples: //dan macdonald -> dan macdonald [call true] //dan mcdonald -> dan mcdonald [call true] //paz y miño -> paz y miño [ca...

android - How does Ionic/Cordova generate hash key? -

i'm working on adding facebook api integration ionic/cordova , trying find debug hash key generated app when do: ionic build android i know generates new .keystore file @ /userhomedir/.android/debug.keystore. what set alias , password ? , how can retrieve hash key after cordova has created app. don't see hash key being printed anywhere during build process. i need generated hash key give facebook api use sign on sdk it seems cordova use ~/android/debug.keystore password android to : keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 with password : android

powershell - azure recovery services notifications -

i have set microsoft azure backup protect windows servers under recovery services. know can setup retention schedules , schedules via local gui , powershell does know of way have azure send email notifications of successful and/or failed backups through service. of servers local , not azure vms. last section in article. should allow emails azure protect jobs (yes, i'm calling azure protect, , wish ms - azure backup whole different product, , combine classic/arm, , nigh impossible find right information) seems way. i'm sure ms have feature implemented eventually. ps c:\> $actionemail = new-azurermalertruleemail -customemail contoso@microsoft.com ps c:\> add-azurermlogalertrule -name backupfailedalert -location "east us" -resourcegroup recoveryservices-dp2rcxugws3mljf4lkpi3a3omj2di4srjk6hijh22hfihzvvelrq-east-us -operationname microsoft.backup/backupvault/backup -status failed -targetresourceid /subscriptions/86eeac34-eth9a-4de3-84db-7a27d121967...

excel - UDF to make a kind of Substitute Array-Function -

i'm trying make function not substitute 1 text another, substitute set of values range lateral set of values. i have this: public function substituterange(rangewithtext range, twocolumnmatrix range) string dim text string text = "/" & rangewithtext.value & "/" 'as example st this: "/" & "1/2/3/4/5/6/7/8" & "/" = "/1/2/3/4/5/6/7/8/" dim searchforrange range set searchforrange = twocolumnmatrix.columns(1) 'let "a1:a4" /2/ /3/ /4/ /5/ in each cell dim replacewithrange range set replacewithrange = twocolumnmatrix.columns(2) 'let "b1:b4" /9/ /10/ /11/ /12/ in each cell dim integer substituterange = text = 1 searchforrange.rows.count '4 rows substituterange = application.worksheetfunction.substitute(substituterange, _ searchforrange.item(i), replacewithrange.item(i)) next end function but return "#value!" error, can me ? expected example "/1/9/10/11...

Mysql php select Columns after selecting from dropdown -

i need thing regarding mysql , php. i have following dropdown: <select> <option value="volvo">volvo</option> <option value="saab">saab</option> <option value="mercedes">mercedes</option> <option value="audi">audi</option> </select> and database car models. i need echo select database based on value selected dropdown. so if user in website selects volvo recieve selection mysql database following info: volvo s30 volvo s60 volvo s90 etc. edit the select : select imagename, imageurl pics carmaker=volvo but don`t know how make select conditioned users selected option. i try give quick help. first have set name attribute @ html select. <select name="type"> <option value="1">volvo</option> <option value="2">saab</option> <option value="3">mercedes</option> ...

how to install mssql module on centos server 6.7 -

how install mssql client module on centos server 6.7. trying install mssql client , going through process described in article http://www.geekyboy.com/archives/37/comment-page-1#comment-188819 but stuck on "yum install php-devel" . not find package. i followed post regarding same topic mentioned have remove php* yum.conf exclude mentioned might cause problem if have whm/cpanel. https://unix.stackexchange.com/questions/82478/cannot-install-php-packages-in-centos i have whm/cpanel on server , trying figure out how proceed installing mssql can please try following command. wget http://ibiblio.org/pub/linux/alpha/freetds/stable/freetds-stable.tgz tar zfvx freetds-stable.tgz cd freetds-*; ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld; make ; make install add compile flag freetds /var/cpanel/easy/apache/rawopts/all_php5 echo "--with-mssql=/usr/local/freetds" >> /var/cpanel/easy/ap...

javascript - get value from radio button once checked to tally up final score -

i making multiple choice quiz radio buttons , want value form radio button once checked , give final score @ end. example "1 out of 5 correct". blockquote > > $(document).ready(function() { > var counter = 0; > var score = 0; > > > var quizquestions = [{ > question: "in year america founded ?", > choices: ["1775", "1776", "1801", "1492"], > answer: 1 > }, { > question: "who did not sign declaration of independence ?", > choices: ["george wasington", "ben franklin", "john hancock", "thomas jefferson"], > answer: 0 > }, { > question: "who president serve more 2 terms?", > choices: ["george washington", "woodrow wilson", "franklin delano roosevelt", ...

Can I link a Node.js C++ extension against Node's internal OpenSSL implementation? -

i have node extension written in c++ needs link against openssl. see node has tls module implemented using openssl. can link extension against node copy of openssl in binding.gyp file? it turns out exact scenario covered in node-gyp documentation . basically, there directories openssl headers included node.js source distribution , can added node-gyp include path list. on linux, actual linking unnecessary because symbols made available extension node runtime when loaded. on windows, not work, , extension needs explicitly compile , link against external copy of openssl installed separately.

My own javascript class and addeventlistener template not working -

so here experimenting native javascript. trying achieve, failed create sort of shortcut scenarios want add event listener div class. here trying say: if user clicked on class show alert. why doesnt code work? function click(red){ var source = document.getelementsbyclassname(red); (i = 0; < source.length; i++) { source[i].addeventlistener('click', err, false); } function err() { var x = 0; } } if (click('red')) { alert('rrr'); } http://jsfiddle.net/y66wh26k/3/ i use document.queryselectorall instead of document.getelementsbyclassname because more versatile. but main issue click function wasn't returning anything, if(click('red')) never execute. well, callback event listener being added wasn't doing anything. i've done made callback argument, passed addeventlistener . function click(selector, callback){ var source = document.queryselectorall(selector); ...

How Actually start(); works in Java Threading -

here example code: public class hellorunnable implements runnable { @override public void run() { system.out.println("run entered"); } public static void main(string args[]) { thread obj=new thread(new hellorunnable()); obj.start(); system.out.println("abc"); } } output: abc run entered why abc before run()'s code? even create 3 threads. still abc print first; obj.start(); obj1.start(); obj2.start(); really tried search this, unable find query this. simply because hellorunnable.run method executed in thread 1 printing abc . execute concurrently, that's point of threads. therefore, of 2 may access resource, stdout, before other.

virtual machine - PHP: Error in creating Server Instance in Google Cloud Compute -

while using google cloud compute's api in php, able start, stop, delete instances create , delete disks. however, when trying create instance, keep getting error invalid value field 'resource.disks' php fatal error: uncaught exception 'google_service_exception' message 'error calling post https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances: (400) invalid value field 'resource.disks': ''. boot disk must specified.' in /var/www/html/google/google-api-php-client/src/google/http/rest here request making self::connectclient(); $computeservice = new google_service_compute($this->client); if ($this->client->getaccesstoken()) { $googlenetworkinterfaceobj = new google_service_compute_networkinterface(); $network = self::default_network; $googlenetworkinterfaceobj->setnetwork($network); $diskobj = self::getdisk($instance_name); $new_instance = new google_service_compute_instan...

python - How simplifying fractions in matrices with sympy? -

i'm using sympy find matrix's inverse. i've next problem. when compute inverse of matrix a , want prove it, got matrix fractions; mean >> import sympy >> sympy import pprint >> sympy.abc import * >> import sys >> sys.displayhook = pprint >> sympy.matrices import * >> = matrix([[a, b],[c, d]]) >> b = a.inv() >> b >> [1 b*c -b ] >> [- + ------------ -----------] >> [a 2 / b*c\ / b*c\] >> [ *|d - ---| a*|d - ---|] >> [ \ / \ /] >> [ ] >> [ -c 1 ] >> [ ----------- ------- ] >> [ / b*c\ b*c ] >> [ a*|d - ---| d - --- ] >> [ \ / ] >> b*a >> [ /1 b*c \ b*c /1 b*c \ b*d ] >> [a*|- + ------------| - ----------- b*|- + ------------| - -------...

Grails: Sorting Nested Domain Objects -

i've got 1 many relationship in. have application has multiple files can uploaded it. application view contains uploaded file list (the files in list contain meta data file such file name, file size etc.). having trouble ability sort nested list. using sortablecolumn call sort action in controller. how can retrieve application , specify nested list of uploaded files sorted requested attribute (ex. file name, file size etc.) edit: here snippets: here application domain object class application implements serializable { private static final long serialversionuid = 1 firm firm static hasmany = [applicationdocumentholders:applicationdocumentholder] static belongsto = [firm:firm] static mapping = {firm lazy: false} } and here application document holder (i storing actual documents in mongodb , meta data in sqlserver in applicationdocumentholder object, sake of simplicity leaving out document file not pertain question) import java.sql.time cla...

Is any Python type whose objects contain elements that are numbered called a sequence type? -

i've been confused question long time. python type objects contain elements numbered called sequence type? sequences in python containers (i.e. have __contains__ method), iterable (i.e. have __iter__ method) , sized (i.e. have __len__ method). have following methods: __getitem__ __reversed__ index count these basic immutable sequences , mutable they'll have following methods: __setitem__ __delitem__ insert append reverse extend pop remove __iadd__

Azure Machine Learning - Serialization error -

Image
i have tried create predictive webservice (following movie recommender tutorial) when run predective experiment error: model not deserialized because serialized older serialization format. please retrain , re-save model. . ( error 0082 ) have idea? for recommendation, please replace "score module" in predictive experiment "score recommendation module" shown in video https://channel9.msdn.com/blogs/windows-azure/building-a-recommender-system-in-azure-ml-studio - @ time elapse 2:38

Android GLES20 link/compile debugging -

i having problems gles shaders failing compile , app crashes "unfortunately, app has stopped.". note not shaders assuming other code load , run shaders ok. i have tried adding following code app detect , display debug info when compile fails. gles20.glcompileshader(shader); int[] compiled = new int[1]; gles20.glgetshaderiv(shader, gles20.gl_compile_status, compiled, 0); if (compiled[0] == 0) { log.e("app", "could not compile shader"); log.e("app", gles20.glgetshaderinfolog(globals.shaderprogram)); log.e("app", "could not compile shader 2"); } when running android studio (just updated latest , greatest 1.4 version) logcat shows "could not compile shader" log entry not give me further info makes trying determine why shader fails difficult. gles20.glgetshaderinfolog not return anything. see next "could not complile shader 2" code continues. because linking fails app crashes when gets...

ruby on rails - Updating Strong Params Only -

first of all, believe there must people, asked question before don't know how can google problem. so, if duplicate sorry. i working on social media site. have user model, use register users site. validates, name, email, , password when registering. i use same model make users edit informations, username. this have in update controller: def update # find existing object using form parameters @profile = user.find_by_id(current_user.id) # update object if @profile.update_attributes!(settings_profile_params) # if save succeeds, redirect redirect_to request.referrer else # if save fails, redisplay form user can fix problems render('edit') end end private # user_params not action, why private. def settings_profile_params params.require(:user).permit(:first_name, :last_name, :username, :school, :program, :website, :information) end the problem is, want update strong parameters defined there. getting excep...

ruby - Globally accessible variable in rails -

i want variable globally accessible whole app. user fill single input field form. saved database , variable accessible anywhere. here have done far. class applicationcontroller < actioncontroller::base # prevent csrf attacks raising exception. # apis, may want use :null_session instead. protect_from_forgery with: :exception before_action :save_page def save_page @page_name = params[:page_name ] test_page_name = pagename.new test_page_name.name = @page_name if test_page_name.save redirect_to(controller: 'template',action: 'templates') end end end the form submitted save_page method in applicaitoncontroller , after being saved redirected. because method redirect in case of saved database, giving me problem. how can fix this? i tried no luck class applicationcontroller < actioncontroller::base # prevent csrf attacks raising exception. # apis, may want use :null_session instead. protect_from_forgery wit...

mysql - What is the best way to insert million record in sequelize -

what best way insert million record using sequelize, using bulkcreate it's slow , didn't finish. so think there's way it. return dbmytable.bulkcreate(array, {transaction: t}).then(function (item) { return res.jsonp('done'); }) i ran same issue using postgresql , agree @e4c5 built-in database method best this. problem you're loading data memory until bulkcreate executes. if got million rows, you'll run out of memory before executes. still, if queue using async.cargo , you'll still waiting db while data asyncrhonously consumes memory. my solution ditch sequelize loading of data (at least until implement streaming or (see github issue #2454 )). ended creating db-streamer , has pg support now. you'll want @ streamsql mysql.

navigation - flexbox not working in firefox -

the below flexbox code doesn't work in firefox. it's horizontal nav list stretches across browser width. in other browsers li's space out equally, in firefox don't. ideas? in advance. .wrapper { position: fixed; padding: 0; width: 100%; top: 0em; } .flex-container-top { padding: 1em; margin: 0; list-style: none; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; } .flex-item { font-family: sans-serif; font-size: 1em; color: #fff; text-align: center; } <div class="wrapper"> <ul class="flex-container-top"> <li class="flex-item"><a href="#eastsidedin">link 1</a> </li> <li class="flex-item"><a href="#eastsidedes">link 2</a> </li> <li class="flex-item"><a href="#eastsidedri">link 3</a> </li> <...

html - How to adjust svg in the center of square with the ability to dynamically adjust to screen -

i'm looking way to place svg icon in center of square div , adapt on length(width) , height of dynamic changing c column. want achieve here , in how looks. as width , height dynamicly changes line-height not suitable in example. looking way center vertical , horizontal in center of div without line-height. it's okay if flex involved. i thought add each square width 15% problem height not adjusted. not sure if iunderstanding correct maybe this, , if don't want "snap down line" when re scaling delete min width , min height. html: <div id="wrapper"> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> css: body{ width: 100%; height: 100%; margin 0; padding 0; } #wrapper{ width: 100vw; height: 100vh; background-color: #ccc; } .box { ...

associations - Rails - How to show attribute of parent object -

i making app rails 4. i trying understand how work associations , show attributes associated models. i'm struggling grasp concepts. i have project model , project_invitations model. the associations are: projects has many project invitations project invitations belong project in project_invitation show, trying display project attributes project creator attributes (stored in user profiles table). i getting stuck. in project_invitation show, have: you're invited participate in <%= project_invitation.project.title %> i have tried: you're invited participate in <%= @project_invitation.project.title %> when try ^^ error: undefined method `title' nil:nilclass in project table, have attribute called :title. i want project invitation show show name of project invitee has been invited. what's wrong way i've tried it? my project_invitations controller has following (generated scaffold): class projectinvitationscontroller ...

android - What build, compile and support libraries are recommended for production? -

i had 1 doubt , clarification it. building android app go production within 2-3 weeks. e-commerce app on selling goods. i plan target api 16+ , have done sufficient research know of target market have 16+ on android phones. the issue facing build, compile , app support libraries should use in terms of version? know of 23.0 has been released , appcombat library goes upto 23.0.1 developer know had suggested stick using 22 , 21.1.2 stable of now. true? example in node.js, versions classified per stability , disclaimer given recent ones still in testing phase. i dont feel opinion based question stability more based on fact , experience rather personal opinion. your friend has perspective. historically, if review android release history: https://en.wikipedia.org/wiki/android_version_history you notice that, compared api releases: https://source.android.com/source/build-numbers.html there definite evidence of "instability" - in other words, considering pr...

php - MySQLi prepared statement it is possible to execute a query multiple times -

i wondering if possible use multiple query way? make work easy or other way this? moved on mysqli prepared statement no idea. you $mysqli = new mysqli('localhost', 'root', '', 'demo'); $stmt = $mysqli -> prepare("select * users id = ?"); $stmt->bind_param('i', $id); $stmt->execute(); $stmt = $stmt->get_result(); while ($row = $stmt->fetch_assoc()) { //do row } $stmt->bind_param('i', $id2); $stmt->execute(); $stmt = $stmt->get_result(); while ($row = $stmt->fetch_assoc()) { //do row } $stmt = $stmt->get_result() returns mysqli_result , isn't prepared statement anymore, , such cannot multiple queries.

java - System.out.println() shortcut doesn't work -

i have newest eclipse version installed on laptop. when try use shortcut "syso" system.out.println() (i click ctrl + space) 2 new windows this: eclipse - 2 windows syso but on older laptop, when click same combinations of keyboard buttons, instantly system.out.println() without questions on added picture. i tried compare eclipse settings between 2 computers, there huge number of preferences configure under eclipse. open preferences -> java -> editor -> templates , found sysout, clicked edit, settings same. can me, please? many thanks, java begginer edit: found on older laptop (and eclipse version) there no syso template, sysout, both working on new laptop same template, working sysout please check windows->preferences->java->editor->templates be confirm have 1 entry syso in template menu. also check code written me shortcut there system.out.println(${word_selection}${});${cursor}

javascript - How to add values to <option> tag loaded from array -

i have multi part form load color options based on size selection not add values option tag , cant seem find solution. is. to add values option tags example: option value="x">clear,option value="t">smoke,option value="gs">gunsmoke output html selected options text can display client selections in readable format before submit final step. any appreciated. thanks my code var vest_10_08 = new array("select color", "clear", "smoke", "gunsmoke"); var vest_10_10 = new array("select color", "clear", "smoke", "gunsmoke"); var vest_10_12 = new array("select color", "clear", "smoke", "gunsmoke"); var vest_10_14 = new array("select color", "clear", "smoke"); var vest_10_16 = new array("select color", "clear", "smoke"); $(document).ready(function () { ...

Get label for AutoForm option value in Meteor Simple Schema -

in meteor template {{parameter}} returns value of option schema: new simpleschema({ parameter: { type: string, allowedvalues: ['value_1', 'value_2'], autoform: { options: [ {label: "label_1", value: 'value_1'}, {label: "label_2", value: 'value_2'} ] } }, }); how can label instead of value in template? template.yourtemplate.helpers({ label: function (value) { return _.findwhere(yourschema.schema('parameter').autoform.options, { value: value }).label; } });

sails.js -postgresql returning string value instead of integer for bigint fields -

we migrating project php node.js using sails.js backend framework. cannot modify our database , have use existing database project. if keep migrate: "alter" newly created model, sails default keep id field integer. however, our existing database, id fields bigint . defined migrate: "safe" , proceeded model creation. now problem facing when blueprint routes return result, id column value, should returned number, being returned string instead. here example: [ { "starttime": "07:00:00", "endtime": "14:00:00", "id": "1" }, { "starttime": "14:00:00", "endtime": "22:00:00", "id": "2" }, { "starttime": "22:00:00", "endtime": "07:00:00", "id": "3" } ] how can fix issue? here model: module.exports = { tablename: "timeslots...

amazon web services - Signing S3 urls fails (The request signature we calculated does not match the signature you provided. Check your key and signing method) -

i'm trying generate signed urls upload , download objects in s3 bucket, fails "signaturedoesnotmatch" per below. <?xml version="1.0" encoding="utf-8"?> <error><code>signaturedoesnotmatch</code><message>the request signature calculated not match signature provided. check key , signing method.</message><awsaccesskeyid>akiaj66rwejpywx6pl2a</awsaccesskeyid><stringtosign>get i understand symptom problem described here amazon mws - request signature calculated not match signature provided that is, credentials somehow wrong. double checked .aws/credentials file , generated new ones. moreover, can other aws operations these credentials, such querying dynamodb or listing buckets. the code use generate urls, copied here: http://docs.aws.amazon.com/amazons3/latest/dev/shareobjectpresignedurljavasdk.html final zoneddatetime expiration = zoneddatetime.now().plusseconds(expirationseconds); fin...

intellij idea - PhpStorm - permute reverse selection -

i switched sublime text phpstorm , missing permute reverse selection feature sublime (ctrl+t on windows). more clear: swapping selections each other. from xxx yyy to yyy xxx do guys know if there equivalent in phpstorm? didn't find in www. you can use shift + alt + up , shift + alt + down moves lines , down should have desired effect.

c# - Package Manager Console Warning - There is already a version of EntityFramework.dll loaded. You may need -

using vs 2015 community (but happening in vs2013) .net 4 ef 4.3.1 installed via nuget package manager console host version 3.2.0.10516 in package manager console warning when start 1 of projects there version of entityframework.dll loaded. may need restart visual studio commands work properly. the refererence entity framework in packages.config <package id="entityframework" version="4.3.1" targetframework="net40" /> which seems good. anyone know whats going on?

How to access a non-static private field in java? -

i have non-static private field in package , want access package don't know how that. searched didn't find useful , other questions in site weren't exacatly question. the way can via reflection. it's hack. ought finding way round it. if need it, suggests other package has badly designed structure. if class you're trying manipulate 1 of own, should @ changing code. if need , can't change other class, this: field f = badclass.class.getdeclaredfield("privatefield"); f.setaccessible(true); f.set(badclassinstance, newvalue); probably best places start tutorial on reflection, , setaccessible method.

Avoid removing all subsequent div elements when using parent() in jQuery -

i have tried using closest() , parent() jquery methods both seem delete of divs following 1 trying remove . not wish assign id each new div dynamically generated $(document).ready(function() { $(document).on('click', '.add_row', function() { alert("add new row method called"); $(".student_mounting").last().append('<div class="student_mounting">' + '<button class="add_row" src="../images/add-resource.png">add</button>' + '<button class="remove_row" src="../images/exit.png">remove</button>' + '</div>'); }); $(document).on('click', '.remove_row', function() { $(this).closest().remove(); }); }); .student_mounting { position: relative; top: 12px; height: 120px; width: 265px; border-radius: 6px; margin-top: 120px; background-color: #f4...

c# - How do I use IFileOperation? -

i want use ifileoperation copy files. i found this , this don't understand them. can ifileoperation call progress method information each item copied out of given – considering folder 1 instead of every file in separate ? edit: have list<string> of files , folders want copy string folder, method being called report progress. how that? is managed code? there should careful with, more "standard" code? is managed code? no. ifileoperation part of windows shell api , com interface. you'll need use com interop if want use these interfaces. you can total progress using copyitems .

Many autocreated migration files using Django in Docker -

just got started docker last week. in apps, seeing many auto created migration files if have ran docker-compose -f local.yml run django python manage.py makemigrations once. in log below, switched on machine , saw 30 migration files created in past 15 minutes. -rw-r--r-- 1 userx admin 788 sep 9 12:54 0053_auto_20170909_0954.py -rw-r--r-- 1 userx admin 788 sep 9 12:55 0054_auto_20170909_0955.py -rw-r--r-- 1 userx admin 788 sep 9 12:55 0055_auto_20170909_0955.py -rw-r--r-- 1 userx admin 788 sep 9 12:55 0056_auto_20170909_0955.py -rw-r--r-- 1 userx admin 788 sep 9 12:56 0057_auto_20170909_0956.py -rw-r--r-- 1 userx admin 788 sep 9 17:57 0058_auto_20170909_0958.py -rw-r--r-- 1 userx admin 788 sep 9 21:58 0059_auto_20170909_0958.py -rw-r--r-- 1 userx admin 788 sep 9 23:58 0060_auto_20170909_0959.py -rw-r--r-- 1 userx admin 788 sep 10 00:58 0061_auto_20170909_0959.py -rw-r--r-- 1 userx admin 788 sep 10 12:53 0062_auto...

ubuntu - Package list error sudo apt-get update -

recently have been facing error when run sudo apt-get update command. reading package lists... error! e: problem parsing dependency depends e: error occurred while processing iron64 (newversion2) e: problem mergelist /var/lib/apt/lists/sparkylinux.org_repo_dists_testing_main_binary-amd64_packages e: package lists or status file not parsed or opened. how reset or clean run system?