Posts

Showing posts from July, 2010

Jetty embedded with Spring Boot -

i using embedded jetty container run web application in local machine. in higher environments need deployed server. i want maintain data in resource environment variables.is there way can configure same in embedded jetty well? if can provide example same, great.

Assistance with PayPal Adaptive Payments - IOS and Android development -

i'm developing mobile application list businesses in marketplace type format i.e. individual business listings, allowing users purchase smalls items through our application. ideally each individual end user able select desired payment method such paypal, mastercard or visa during sign up; however, provide option change desired payment option @ later stage. payment details saved end user stored , delegated businesses @ end of month etc. payment businesses made @ end of month less our fees/subscription. we conducted research , decided paypal adaptive payments ideal option chained payments each business; based on review of braintree, stripe , paypal. braintree our next option don't offer marketplace solution customers outside of us. have attempted contact paypal developer support on numerous occasions, though have not had luck in confirming required complete end end solution based on our needs. our questions community are, paypal adaptive payments allow following: pro

.htaccess - Port redirection using htaccess -

id ask if possible if redirect htaccess domain.com:3333 redirects newdomain.com:3333 if id open program , connect domain.com:3333 translate newdomain.com:3333 or browsers? if dont work, there solution other htaccess?

codenameone - Multi Select Box in Codename one -

currently, using combo box component single selection, required multiselection select multiple items @ time, searched multiselection component in codename 1 didn't find. please me how achieve multi-selection in codename one. create box layout y form checkboxes selections

javascript - How to add a drop down menu when user selects an icon on a cesium map -

i want select icon on cesium map , left click , bring drop down selection menu icon is. i using cesium map , need easy way add drop down. i think should create drop down menu jquery when user clicked on entity. handler = new cesium.screenspaceeventhandler(viewer.scene.canvas); handler.setinputaction(function(click) { var pickedobject = viewer.scene.pick(click.position); if (cesium.defined(pickedobject)) { // add jquery code create dropdown menu } } }, cesium.screenspaceeventtype.left_click);

sql - add parameters to select case db2 -

i have following select statement: select (case when age_years >= 18 , age_years < 30 '18-29' when age_years < 50 '30-49' when age_years < 70 '50-69' when age_years < 100 '70-100' end) age_range, count(*) num info group (case when age_years >= 18 , age_years < 30 '18-29' when age_years < 50 '30-49' when age_years < 70 '50-69' when age_years < 100 '70-100' end) order min(age_years); output age_range num ---------+---------+----

c# - Unit testing a .NET Standard 1.6 library -

i having trouble finding date documentation on how unit test .net standard 1.6 class library (which can referenced .net core project). here project.json looks library: { "supports": {}, "dependencies": { "microsoft.netcore.portable.compatibility": "1.0.1", "netstandard.library": "1.6.0", "portable.bouncycastle": "1.8.1.2" }, "frameworks": { "netstandard1.6": {} } } now left on task able create sort of project can unit testing. goal use xunit since seems .net core team pushing. i went ahead , created .net portable library project has project.json looks this: { "supports": {}, "dependencies": { "microsoft.netcore.portable.compatibility": "1.0.1", "netstandard.library": "1.6.0", "xunit": "2.2.0-beta4-build3444", "xunit.runner.visualstudio":

Failed to configure spring-boot to support https for IOS application -

i using spring-boot backend server , iphone front end app. need setup https in server side in order submit app in apple store. did below configurations in application.properties in spring-boot server: server.port = 9080 server.ssl.key-store=/data/ssl/server.jks server.ssl.key-store-password=123456 server.ssl.enabled=true server.ssl.key-password=123456 server.ssl.ciphers=tls_ecdhe_rsa_with_aes_128_cbc_sha256,tls_ecdhe_rsa_with_aes_128_cbc_sha,tls_ecdhe_rsa_with_aes_256_cbc_sha384,tls_ecdhe_rsa_with_aes_256_cbc_sha,tls_rsa_with_aes_128_cbc_sha256,tls_rsa_with_aes_128_cbc_sha,tls_rsa_with_aes_256_cbc_sha256,tls_rsa_with_aes_256_cbc_sha server.ssl.protocol=tls the ios app got below error when connecting server through https: error:optional(error domain=nsurlerrordomain code=-1200 "an ssl error has occurred , secure connection server cannot made." userinfo={_kcfstreamerrorcodekey=-9824, nslocalizedrecoverysuggestion=would connect server anyway?, nsunderlyingerror=0x61

siri - Sample phrase "Cancel my service using FieldService" was not classified as a INCancelWorkoutIntent intent -

Image
the warning via email after last build uploaded was: sample phrase "cancel service using fieldservice" not classified incancelworkoutintent intent. related info.plist file looks this: what fix issue?

javascript - Is it possible to force socket.io to use wss instead of ws, without having to change to https? -

i have been trying setup server users can send sign in using websockets, don't want using ws. want able turn on wss without having https. sadly, there aren't options this. , question how 1 on client side without using https protocol. from websocket protocol specification : a wss uri identifies websocket server , resource name, , indicates traffic on connection protected via tls (including standard benefits of tls such data confidentiality , integrity, , endpoint authentication). emphasis mine now can understand absurdity of request: wss is https . of course terminology wrong ( https different protocol wss ) bottom of line both version of respective tcp plain protocols ( http , ws ) on tls . so answer no . as matter of fact securty complex thing. experienced programmers refrain inventing or exploring new ways and, based on kind of question asked, don't appear expert on field. so it's better things best-practices say

backbone.js - how to add a route to swagger-ui -

i've been trying add route (health check) swagger-ui. haven't been able figure out going on? i added routes object swaggerui.js: routes: { 'health': 'health' }, health: function() { return "ok"; } and index.html file in src/main/html i added: window.swaggerui.on('route:health', function() { log('here'); }); but when navigate /health not get. has done before? this not possible because swagger-ui raw html serves js.

Select Join Where and orWhere in Laravel 5 -

i have 2 tables- jobseekers , resumes. try achieve 3 search options- entering 1. "first name", 2. "last name", , 3. "first name + last name". current code below: $q = \request::get('keyword'); $data['resume'] = resume::join('jobseekers', 'jobseekers.user_id', '=', 'resumes.user_id') ->where('jobseekers.first_name','like','%'.$q.'%') ->orwhere('jobseekers.last_name','like','%'.$q.'%') ->orderby('resumes.updated_at','desc')->paginate(50); using texbox (keywords), when search last / first name, works fine. however, when type both first + last name in textbox, shows no result. please share me how achieve this. using concat() : ->orwhere(db::raw("concat(jobseekers.first_name, ' ', jobseekers.last_name)"), 'like','%'.$q.'%');

ruby - Converting binary string to IEEE 754 float -

can tell me how convert 32-bit binary string ieee 754 floating point value in ruby? for example, binary string "01000001100101110011001100110011" (0x41973333) should convert 18.9, can't figure out how using ruby. i'm trying same values returned by: https://www.h-schmidt.net/floatconverter/ieee754.html thanks. that fun one! you need string#unpack , array#pack : ["01000001100101110011001100110011"].pack('b*').unpack('g').first #=> 18.899999618530273 [18.9].pack('g').unpack('b*').first #=> "01000001100101110011001100110011" 'g' : g | float | single-precision, network (big-endian) byte order 'b*' multiple : b | string | bit string (msb first)

javascript - Send an image with js and html into form -

i had code looks https://cloth.ardive.id/tshirt/index.html i want send canvas image form user need fill addon information (name, category) , in form image page before have been displayed , user doesnt need upload image anymore. when submit form, submited form contains filled information data image because want send canvas wasnt image, need generates canvas image, send form. this how form code lookslike (i'm using wordpress , woocommerce, code html). want navigating form page image uploaded field <script type="text/javascript"> wpuf_conditional_items.push(); </script> </li><li class="wpuf-el featured_image" data-label="gambar"> <div class="wpuf-label"> <label for="wpuf-featured_image">gambar <span class="required">*</span></label> </div> <div class="wpuf-field

ruby - whois-rb gem produces error: "Whois::ServerNotFound" -

i'm totally lost here. trying set whois gem according documentation @ https://whoisrb.org/ . unfortunately i'm getting error when trying perform whois, locally on machine. error message: unable find whois server `;; answer received 192.168.178.1 (75 bytes) ;; ;; security level : unchecked ;; ->>header<<- opcode: query, status: noerror, id: 51102 ;; flags: qr rd ra cd; query: 1, answer: 1, authority: 0, additional: 1 opt pseudo-record : payloadsize 512, xrcode 0, version 0, flags 32768 ;; question section (1 record) ;; google-public-dns-b.google.com. in ;; answer section (1 record) google-public-dns-b.google.com. 84453 in 8.8.4.4 ' don't confused, i'm using dnsruby gem well.. corresponding code in model: def set_isp res = resolver.new a_record = res.query(self.domain_name) whois = whois::client.new rec = whois.lookup(a_record) self.isp = rec.name end thanks lot in advance! according error, issue pas

html - height:auto overrides all height styles -

i have responsive page 2 sections. elements in right section should responsive used : #rightsection * {max-width:100%;height:auto} however further height styles being ignored see in code snippet. i don't want use !important because have many inline styles html codes prefer not forcing styles through css. there other way set heights after height:auto ? #rightsection * {max-width:100%;height:auto} .mydiv { width:534px; height:37px; box-sizing:border-box; } <div id="rightsection"> <div class="mydiv" style="background:#ff0000"></div> </div> red div invisible because height igonred! according code whatever happening fine css means cascading style sheet means last rule applies , whichever more specific. in case first rule has higher specifity second rule height:auto being applied. refer link more details on specificity . so in code can make second role

Javascript: Random Number Generator (Dynamic) -

i add random number generator site. idea have code outputs random number between min , max value (i.e. 200-400) updates in real time, without page refresh. came across this , doesn't need since number generated on click rather dynamically (without action on user's part). plus, if set range 400 , min value 230, snippet outputs numbers aren't within range (i.e. 580). it better have numbers display not randomly (i.e. 340, 348, 367, 330, 332, 330, 345, 357 etc). isn't mandatory. thank help! randwithvariation() takes min , max value maximum offset previous value , returns function can use. function randwithvariation(min, max, variation) { var seed = (math.floor(math.random() * max) % (max - min)) + min; // attempts keep result within bounds var min = min, max = max, variation = variation; var r = function() { var offset = math.floor(math.random() * variation); if (math.random() < 0.5) offset *= -1; // chance number decrease

javascript - Correct way to make an ajax call from EmberJs component? -

i know correct way make ajax call ember component. example i want create reusable component makes employee search employee's id, when response comes server want update model data ajax response. i don´t know if correct way it, i'm new on emberjs. export default ember.component.extend({ ajax: ember.inject.service(), actions: { dosearch() { showloadingdata(); var self = this; this.get('ajax').post('http://server.ip.com/api/v1/getemployee', { "id": }).then(function(data) { self.set('model.name', data.name); self.set('model.position', data.position); hideloadingdata(); }); } }}); edit: misunderstood question, here's updated version of answer: first, think should switch using ember-data. fetching employee id resolve calling this.get("store").find("employee", id) . if wish use plain ajax, suggest create service encapsulat

php - NULL::character varying CakePHP 3 Form -

i null::character varying value of form in cakephp 3 when expect blank created new entity. controller code use is public function add() { $audience = $this->audiences->newentity(); $this->set(compact('audience', 'languages')); $this->set('_serialize', ['audience']); in add.ctp code redner form is echo $this->form->create($audience, ['novalidate' => true]); echo $this->form->input('audience', ['type' => 'text']);

How to get service function to controller in AngularJS version 1.6.1 -

i have trouble on script, want data database using json output. [{"id_admin":"2","username":"mac","password":"macgeeky","nama_lengkap":"mac geeky"}] here angular script : app.controller('welcomecontrol', ['$scope', function($scope){ $scope.head_msg = { head: 'control panel', body: 'ini merupakan halaman yang hanya dapat diakses oleh administrator, pada bagian atas dan samping kiri halaman website ' + 'terdapat beberapa menu yang dapat ditelusuri untuk melakukan pengelolaan informasi.' }; $scope.img_wel = './images/icon_topsis.png'; $scope.welcome_text = 'selamat datang di aplikasi penilaian guru teladan pada dinas pendidikan dengan menggunakan ' + 'metode topsis.'; }]); app.controller('administratorcontrol', ['$scope', 'administratorservice&#

how to filter data from elasticsearch -

i have create several indexes in elasticsearch. result of http://localhost:9200/_cat/indices?v indicate follows. health status index pri rep docs.count docs.deleted store.size pri.store.size yellow open idx_post:user:5881bc8eb46a870d958d007a 5 1 6 0 31.3kb 31.3kb yellow open idx_usr 5 1 2 0 14.8kb 14.8kb yellow open idx_post:group:587dc2b57a8bee13bdab6592 5 1 1 0 6.1kb 6.1kb i new elasticsearch , tried filter data using index idx_usr . http://localhost:9200/idx_usr/_search?pretty=1 it working fine , returns expected values. when trying grab data using index idx_post returns error saying index not found. http://localhost:9200/idx_post/_search?pretty=1 this gives result: { "error" : "indexmissingexception[[idx_post] missing]", "status&q

amazon web services - Converting AWS date string to python datetime -

i'm trying aws timestamp converted python string datetime object. datetime format aws provides here 2016-09-20t17:21:14+00:00 this code have trying convert: import csv datetime import datetime ifile = open('text_results.txt') reader = csv.reader(ifile) row in reader: date_s = str(row[2]) date_o = datetime.strptime('date_s', '%y-%m-%dt%h:%m:%s+00:00') i don't care milliseconds if there way omit since aws doesn't provide milliseconds, it's 00:00. i'm receiving following error code: traceback (most recent call last): file "date.py", line 15, in <module> date_o = datetime.strptime('date_s', '%y-%m-%dt%h:%m:%s+00:00') file "/usr/local/cellar/python/2.7.12_2/frameworks/python.framework/versions/2.7/lib/python2.7/_strptime.py", line 332, in _strptime (data_string, format)) valueerror: time data 'date_s' not match format '%y-%m-%dt%h:%m:%s+00:00'

sitecore7 - Sitecore Building a single page from child node data -

i have sitecore structure of items comprises of range product 1 product name (text) product image (image) product 2 product name (text) product image (text) i need make single page view iterates through each of these nodes , collects , outputs data each - can assist in method best use this? sorry if basic question example code appreciated. you should think using single product template product name field , product image field instead of having items single fields under product. if requirement, how it. sublayout (or layout if need be) <div> <sc:text runat="server" id="txtproductname" field="productname"/> <sc:image runat="server" id="imgproductimage" field="productimage"/> </div> then in code behind take current item (the product , find child item corresponds looking , assign field item. private void page_load(object sender, eventargs e) {

Putting Views on top SurfaceView Android -

i need code on android, i've been trying , searching 3 hours , no luck so i've library call mediaplayersdk, i'm using in application play videos. library using surfaceview play video. now, i've include getsurfaceview().setzorderontop(true) player can show video otherwise not shown ( audio). but, when i'm using getsurfaceview().setzorderontop(true) cannot put view on top of player. want build controllers player couldn't. i've tired getsurfaceview().setzordermediaoverlay(true) , same problem video not shown. the xml code activity: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/transparent"> <framelayout android:id="@+id/playerviewlayout" android:layout_width="fill_parent"

c++ - Why is my Qt application crashing when accessing the IWMPMedia interface? -

i have built qt (5.7) application interfaces windows media player com api parse track meta data. in-explicit reason application crashing when calling iwmpmedia3::getattributecountbytype . the line crash keeps occurring is: if (pmedia3item && pmedia3item->getattributecountbytype(l"trackingid", 0, &l) == s_ok) //will crash here it not crash on first instance, takes couple of hundred loops , seems connected when call repeatedly returns 0 . if switch attribute know exists runs fine. what posted below object stripped right back, still crashes. object designed run in own qthread , com symbols defined , contained within qthread . the code forms part of larger app makes use of many other qt modules, gui, web engine being 2 of biggest. #include "wmpmlimport.h" #include <qdebug> #include "wininet.h" #define wmp_clsid l"{6bf52a52-394a-11d3-b153-00c04f79faa6}" #define wmp_refiid l"{d84cca99-cce2-11d2-9

android - Attribute ellipsize=marquee in textview doesnt work with movenmentmethod -

i need make running line clickable parts of text in android app. use textview attributes: android:singleline="true" android:ellipsize="marquee" android:marqueerepeatlimit ="marquee_forever" okay, in java code use next code: runninglinetext.settext(textrunningline); runninglinetext.setselected(true); runninglinetext.setmovementmethod(linkmovementmethod.getinstance()); i need use setmovementmethod making clickablespan clickable parts of running line. after textview on screen has no text! empty. so, there way mix attributes "setmovementmethod" , "ellipsize=marquee" in textview? thanks.

Can I pass an array as a single argument from vagrantfile to powershell script? -

my current setup follows: i have vagrant file set provisioning: config.vm.provision 'test', :type => 'shell', :path => "#{rootdir}/.build/vagrant-scripts/sandbox-test.ps1", :powershell_elevated_interactive => true, :args => ["1", "2"] my power shell script set print out names individually: param( [parameter(mandatory=$true, position=1)] [string[]]$array ) foreach($a in $array) { $a } i'm aware above example has incorrect format args, can't figure out how pass array vagrantfile (which written in ruby?) powershell script. i fine doing such this, know works time being: foreach($a in $args) { $a } however want introduce multiple arrays, functionality break unless i'm specific size of different arrays. i hope i'm trying clear enough, please feel free ask more information , in advance assistance.

c# - "The device is not ready" when writing or reading files -

when tried opening file, there exception "system.io.ioexception: 'the device not ready." showing up: // reading var data = file.readalltext(@"d:\test.txt"); // writing file.writealltext(@"d:\test.txt", ""); my stack trace doesn't give meaningful message: system.io.ioexception occurred hresult=0x80070015 message=the device not ready. source=mscorlib stacktrace: @ system.io.__error.winioerror(int32 errorcode, string maybefullpath) @ system.io.filestream.init(string path, filemode mode, fileaccess access, int32 rights, boolean userights, fileshare share, int32 buffersize, fileoptions options, security_attributes secattrs, string msgpath, boolean bfromproxy, boolean uselongpath, boolean checkhost) @ system.io.filestream..ctor(string path, filemode mode, fileaccess access, fileshare share, int32 buffersize, fileoptions options, string msgpath, boolean bfromproxy, bool

ios - UIButton (programmatically added) ignoring touches -

i've got view hierarchy one stack view vertical orientation , bunch of uibuttons added programmatically plus a second stack view horizontal orientation partially overlapping first view both stack views having view controllers root view common super view uibuttons added first view respond touches fine. uibuttons added second view ignore touches. both series of buttons added stack views using the same method , i.e. having userinteractionenabled enabled, targets set properly, etc. any ideas why only buttons in second stack view ignore touches..? the view hierarchy looks expected in xcode's view debugger, i.e. horizontal view on top of else nothing potentially eat touch events.. the buttons in horizontal view have identical tags , targets of buttons in vertical stack view (representing kind of ' more ..' functionality vertical buttons). any touch debugging facilities enable view hierarchy..?

angularjs - Getting error with angular -

i'm doing rails 5 application. have simple code showing sign-in page. var app = angular.module('app', ['ui.router']).config([ '$stateprovider', '$urlrouterprovider', function($stateprovider, $urlrouterprovider) { $stateprovider .state('sign_in', { url: '/sign_in', templateurl: '/angular_views/sign_in.html', controller: 'signincontroller' }) $urlrouterprovider.otherwise('sign_in'); }]) i'm getting error logs in browser. error: transition superseded error: transition prevented error: transition aborted this angular-ui-router version *** local gems *** angular-ui-router-rails (0.2.15) it seems latest version available: $ gem update angular-ui-router-rails updating installed gems nothing update please how fix it. i think problem angular-ui-router version.upgrade ui-router , give try

java - Queuing audio files on an RTSP streaming server -

is possible design rtsp server provides queuing audio files in classic rtsp client/server streaming communication (i.e. start streaming next audio file after present one)? p.s : can not use pub/sub architecture message queuing (e.g. jms/apache mq). have technical constraints.

groff - Combine eqn math in pic labels -

Image
i want add math equations pic labels. how can write such thing, example box "this $1 on 2$ test" "using math in pic labels" . know of ctan circuit_macros, require tex document. want document stay in roff -ms format. for example output of printf ".eq\n1 on 2\n.en" | eqn |groff -tps > 1over2.ps is see below. i try luck macros... or there inline way define .eq text? sorry guy's slow. solution comes inline equations, defined delimiters: printf '.ps\nbox "this a1 on 2b test" ""'\ '"using math in pic labels" wid 2 ht .7\n.pe' | pic|eqn -tps -dab | groff -tps > testbox.ps gives:

How to open CSV file type web url in webvie android -

i want open csv file type web view without downloading local. using webview google docs load other file types. below way loading file types csv i'm getting error , unable load. appreciated. mwebview.loadurl("http://docs.google.com/gview?embedded=true&url=" + docurl); what can creating google spreadcheat link works go google docs -> open document -> go file -> publish web -> link -> publish -> copy link , use in webview that should work. if not please respond , wrong.

c# - Accssess to repository from .net core library -

i need wrap function in repository class in .net core library. mistake constructor doesn't have constructor. doing wrong? here dbcontext code public class effmerccontext : dbcontext { public dbset<department> departments { get; set; } public dbset<employee> employees { get; set; } public dbset<project> projects { get; set; } public effmerccontext(dbcontextoptions<effmerccontext> options) : base(options) { } } public class effmercdbcontextfactory : idbcontextfactory<effmerccontext> { public effmerccontext create(dbcontextfactoryoptions options) { var builder = new dbcontextoptionsbuilder<effmerccontext>(); builder.usesqlserver("server=(localdb)\\mssqllocaldb;database=pinchdb;trusted_connection=true;multipleactiveresultsets=true"); return new effmerccontext(builder.options); } } my repository class far public class employeerepository { public employee

ksh - Error in my Shell Script (at kill command) -

#!/bin/ksh ssh user@hostname "ps -ef | grep java | grep dev | kill -9 `awk '{print \$2}'` && nohup java -jar application.jar --server.port=8090&" error: usage: kill [-ll] [-n signum] [-s signame] job ... or: kill [ options ] -l [arg ...] does know causing error? the \ in awk print syntax error. try this: ps -ef | grep java | grep dev | kill -9 `awk '{print $2}'`

javascript - Render JSX element based on condition -

so have simple component within web app have been working on , wondering if there way render element within component based on value of this.props.item. here jsx: var react = require("react"); var actions = require("../actions/schoolactions"); module.exports = react.createclass({ deleteschool: function(e){ e.preventdefault(); actions.deleteschool(this.props.info); }, render:function(){ return( <div classname="panel panel-default"> <div classname="panel-heading"> {this.props.info.name} <span classname="pull-right text-uppercase delete-button" onclick={this.deleteschool}>&times;</span> </div> <div classname="panel-body">{this.props.info.tagline}</div> </div> ) } }) i wanted able this: render:function(){

Adding new rows with SQL to an Access table with GROUP BY? -

i have table in access database looks (r1, r2, etc column names). r1 r2 r3 r4 r5 r6 4 8 1 1 1 90,0680360218135 4 8 1 1 2 100 4 8 1 1 3 72,0756369473476 4 8 1 1 4 68,9391913253478 4 8 1 1 5 61,6543424488292 4 8 1 1 6 69,904486251809 4 8 1 1 7 47,0347033309303 4 8 1 1 8 76,3784417080973 4 8 1 1 9 33,3333333333333 1 8 1 1 1 74,1004658877797 1 8 1 1 2 97,7238166791886 1 8 1 1 3 82,1876261841859 1 8 1 1 4 68,1693097727754 1 8 1 1 5 67,71399360198 1 8 1 1 6 47,5141142738908 1 8 1 1 7 44,8295982097869 1 8 1 1 8 82,6223931742496 1 8 1 1 9 33,3333333333333 3 8 1 1 1 85,5250502810347 3 8 1 1 2 100 3 8 1 1 3 78,5248764773228 3 8 1 1 4 63,6806936758504 3 8 1 1 5 60,0848342976394 3 8 1 1 6 49,4890311068566 3 8 1 1 7 94,7562947232155 3 8 1

subquery - MySQL Error 1093 - Can't specify target table for update in FROM clause -

i have table story_category in database corrupt entries. next query returns corrupt entries: select * story_category category_id not in ( select distinct category.id category inner join story_category on category_id=category.id); i tried delete them executing: delete story_category category_id not in ( select distinct category.id category inner join story_category on category_id=category.id); but next error: #1093 - can't specify target table 'story_category' update in clause how can overcome this? update: answer covers general error classification. more specific answer how best handle op's exact query, please see other answers question in mysql, can't modify same table use in select part. behaviour documented at: http://dev.mysql.com/doc/refman/5.6/en/update.html maybe can join table itself if logic simple enough re-shape query, lose subquery , join table itself, employing appropriate selecti

json - Entity Framework problems with SQL Server -

i'm try migrate entity framework 6.0 webapi default localdb sql server 2016. problem is, on localdb works fine after running the database-update on sql server "one many" , "one one" relations don't work anymore , error shown below. if i'm switching of proxy generation base.configuration.proxycreationenabled = false; the error not available related data "kunde" in case "null": [{"id":1,"name":"a","kunde":null},{"id":2,"name":"b","kunde":null}] i'm using simple model: public class projekt { public int id { get; set; } public string name { get; set; } public virtual kunde kunde { get; set; } } public class kunde { public int id { get; set; } public bool { get; set; } public string name { get; set; } } error: {"message":"fehler","exceptionmessage":"fehler des typs \"ob

command line - Build everything : even builtByDefault: false -

i have project contain lots of references other qbs file. project { name: "myproject" references: ["subproject1/subproject1.qbs", "subproject2/subproject2.qbs", "subproject3/subproject3.qbs", "subproject4/subproject4.qbs", ... ] } when working in qtcreator, don't want buid everything, of subproject not built default : builtbydefault: false i have automated build tools should built make sure build. the tools run commands : /opt/qt5.5.1/tools/qtcreator/bin/qbs build -d . -f ../myproject/myproject.qbs --job problem command doesn't build subproject not build default. is there way force build in command line ? it explained in documentation : https://doc.qt.io/qbs/product-item.html i needed add --all-products <qbs-folder>/qbs build --all-products -d . -f ../myproject/myproject.qbs

javascript - Declare AngularJS service multiple times in the same module -

i working angularjs 1.x , can define same service multiple times in same module. in following snippet of code, defining service nameservice 2 times in module myapp : (function() { 'use strict'; angular .module('myapp', []) .controller('maincontroller', maincontroller) .factory('nameservice', nameservice1) .factory('nameservice', nameservice2); maincontroller.$inject = ['nameservice']; function maincontroller(nameservice) { var vm = this; vm.message = nameservice.getname(); } function nameservice1() { return { getname: getname }; function getname() { return 'first definition'; } } function nameservice2() { return { getname: getname }; function getname() { return 'second definition'; } } })(); at runtime, angularjs use value returned second implementation of service: "second definition". please check t

How to create docker image from jenkins running on docker -

i wanted practice ci/cd docker. there many discussion going on topic. i'm new these technologies grateful if can me i created jenkins server on docker using aws ec2 instance. want create web application container jenkin job. how do ? if possible how deploy new container ? how practice cd each build this (free) online tutorial katacoda walks through: building docker images using jenkins .

how can i count this 3 fields in mysql? -

case when epro02.startreportid = 101 , eventprovider02.startvoltage = 0 'power supply disconnected' when eventprovider02.startsatellitecount < 9 or eventprovider02.startgsmsignallevel < 20 or eventprovider02.startgsmstatus != 9 'network outage' when eventprovider02.startreportid = 13 'gsm jamming' end reason use entire case...end count() , group by select case when epro02.startreportid = 101 , eventprovider02.startvoltage = 0 'power supply disconnected' when eventprovider02.startsatellitecount < 9 or eventprovider02.startgsmsignallevel < 20 or eventprovider02.startgsmstatus != 9 'network outage' when eventprovider02.startreportid = 13 'gsm jamming' end reason, count(case when epro02.startreportid = 101 , eventprovider02.startvoltage = 0 'power supply disconnected' when eventprovider02.startsatellitecount < 9 or eventprovider02.startgsmsignallevel < 20 or eventprovider02.startgsms

complexity theory - how to justify that "Tile Cover" is in NP -

hi im learning exam in theoretical computer science. , im learning exams of last years because task setting similar every year. , can solve of tasks except of one: there 1 question "p vs. np" problem. an example of lat year: we have given "tile cover" problem witch says: have "big" rectangle page length of n x m ∈ n , have k "small" rectangles ("tiles") r1, r2, ..., rk the question if "small" rectangles fit in "big" 1 without leaving space on it. and ther tasks problem , despair on first 1 witch says: "justify informal why 'tile cover' problem in np" how solve problem, or similar 1 (bacause dont think same in year) recall well-known characterization of complexity class np says np comprised of precisely problems which, given problem instance i , certificate c(i) , can verify in polynomial time instance i has solution (using certificate, of 1 can think of hint algorithm).

swift - Add UIButtons to data points in a line graph, plotting date and time in X-axis -

i trying plot data on simple line graph. below class storing data. how plot yvalue s time or date strings? also, add title uibutton each data point in graph. tapping on uibutton should display corresponding detailednote small popup. have searched , digged lot of chart libraries ios didn't find way add simple functionality. graph-with-buttons-at-data-points.png also, way filter , plot data "today", "last week", "last month" or interval of time? can of ios libraries core plot , uibeizerpath without 3rd party frameworks/libraries? prefer use uibeizerpath can smoothen graph.. https://medium.com/@ramshandilya/draw-smooth-curves-through-a-set-of-points-in-ios-34f6d73c8f9#.28frf03to can point me right resources.. posting swift code highly appreciated! class noteentry { var title: string? var detailednote: string? var yvalue: float? = 0 let timestring : string = { let formatter = nsdateformatter() formatter.dateformat = "