Posts

Showing posts from June, 2015

node.js - Update value once write completes in Cloud Function -

i'm trying update 1 value after write completes (in cloud function) wont work (i'm sure stupidly simple problem). code below: const functions = require('firebase-functions'); const admin = require('firebase-admin'); const firebase = require('firebase'); admin.initializeapp(functions.config().firebase); exports.createmessage = functions.https.onrequest((request, response) => { const json = json.parse(request.query.json); // == "{'start':0, 'end':0}" json.start = firebase.database.servervalue.timestamp; admin.database().ref('/messages/').push(json).then(snapshot => { //here problem. whatever try here won't work retrieve value. //so, how "start" value, has been written db (timestamp value)? var startvalue = snapshot.ref.child('start').val(); snapshot.ref.update({ end: (startvalue + 85800000) }).then(snapshot2=>{

xamarin - How can I duplicate the look of a comment area on the iOS setting page in a TableView? -

i add comments settings page. looks comment area below "ask join networks" on settings > wi-fi page of ios settings. can suggest how can , how can make use of dynamic typing when user changes font size comment area changes match in ios settings? note okay use ios renderer if needed. @ time concerned ios solution. thank much on ios 11, background color of setting page #eaeaf1 , text color within non-control area #59595f so add label viewcell place within container can control margin of label otherwise label text flush on left side vs. vertically aligned setting controls. something started: <viewcell> <stacklayout orientation="horizontal" backgroundcolor="#eaeaf1"> <label margin="15" textcolor="#59595f" horizontaloptions="centerandexpand" linebreakmode="wordwrap" text="this multi

c# - Fading in/out GameObject -

i'm new coding, i'm still trying develop logic of thinking me create solutions i'm wanting games. currently, i'm in unity trying create 2d gameobject that's wall hiding secret door. want gameobject fade out (about 90%) when player gameobject triggers it, revealing space behind , hidden door. so far, i've managed figure out how render "secret wall" go inactive on trigger, disappears, doesn't produce visual i'm going for. said, i'm still working on developing coder's way of thinking, while i've done lot of research solve problem, many of results don't readily understand. here's code: using system.collections; using system.collections.generic; using unityengine; public class secretdoor1 : monobehaviour { void ontriggerenter2d (collider2d secretdoortrig) { if (secretdoortrig.gameobject.tag == "player") { getcomponent<spriterenderer> ().enabled = false; } els

How to redirect current page to other URL depending on current URL? -

i want check current url , if not home page, want redirect page particular url using jquery or angularjs [angular] try following lines of code: var location = $location.path(); location = location.slice(1, location.indexof("/")); location = location.tolowercase(); if (location != 'home') { $location.path('/redirect/somewhere'); } wiki

reactjs - create-react-app Server Side Rendering -

i trying achieve server side rendering create-react-app project. don't need routes because it's single-page application. have been going through articles seem quite complicated me. guide me how or link me simpler articles please? here code till now:- the main app component, imports other components:- import react, { component } "react"; import homepage "./homepage"; import "./app.css"; class app extends component { render() { return( <div> <homepage/> </div> ); } } export default app; the express code till now:- import express "express"; import react "react"; import { rendertostring } "react-dom/server"; import app "../src/app"; const app = express(); app.use(express.static("../public")); app.get('*', (req, res) => { res.send(` <!doctype html> <head> <title>universal rea

javascript - retrieving image from database with ajax append in Laravel 5.4 -

i using ajax request data database. append every data div. having problem in image source. put image files in public folder name image_files. problem retrieving image thru source , con-cat image filename database in ajax here code: function getproducts(category_id) { $("#product-list").empty(); $.ajax({ url:"{{ url('product') }}/" +category_id, type:"get", datatype: "json", success: function(data) { if(data.length>0) { for(i=0;i<data.length;i++) { $('#product-list').append('<div class="col-md-3 col-sm-3 hero-feature">'+'<div class="thumbnail">'+'<img src="{{ asset('image_files/' . '+data[i]['featured_img']+') }}" alt="">'+'</div>') }

c# - An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll -

Image
i'm getting following exception message when trying use streamwriter : an unhandled exception of type 'system.notsupportedexception' occurred in mscorlib.dll what causing this? wiki

WINSCP script stop working after password change for FTP -

This summary is not available. Please click here to view the post.

Using python to find objects in array with same starting characters -

i'm new python , know if there easy way search strings in array have same starting characters. for example have list ex = [exa, exb, tea, exc] and want result matching first 2 characters this: {'ex' : 3, 'te' : 1} i have tried working counter method collections cant result shown above. thank in advanced if slice off first 2 characters of each element can use collections.counter this >>> import collections >>> ex = ['exa', 'exb', 'tea', 'exc'] >>> collections.counter(i[:2] in ex) counter({'ex': 3, 'te': 1}) wiki

ruby on rails - How to perform autoclearing associated table rows without valid associated id -

i trying find way clear rows table associated table. the point trying create application recipes. , example don't want have situation when 2 or more recipes have same ingredient (let's eggs). , if remove 1 recipe remove automatically associated active record want remove when e.g. eggs won't used in recipe. ingredient model: class ingredient < applicationrecord belongs_to :recipe, inverse_of: :ingredients end recipe model: class recipe < applicationrecord has_many :ingredients, inverse_of: :recipe has_many :directions, inverse_of: :recipe accepts_nested_attributes_for :ingredients, reject_if: proc { |attributes| attributes['name'].blank? }, allow_destroy: true accepts_nested_attributes_for :directions, reject_if: proc { |attributes| attributes['step'].blank? }, allow_destroy: tr

r - Split comma-separated column into separate rows -

Image
i have data frame, so: data.frame(director = c("aaron blaise,bob walker", "akira kurosawa", "alan j. pakula", "alan parker", "alejandro amenabar", "alejandro gonzalez inarritu", "alejandro gonzalez inarritu,benicio del toro", "alejandro gonzález iñárritu", "alex proyas", "alexander hall", "alfonso cuaron", "alfred hitchcock", "anatole litvak", "andrew adamson,marilyn fox", "andrew dominik", "andrew stanton", "andrew stanton,lee unkrich", "angelina jolie,john stevenson", "anne fontaine", "anthony harvey"), ab = c('a', 'b', 'a', 'a', 'b', 'b', 'b', 'a', 'b', 'a

python - Select specific regions of .shp file using Geopandas -

Image
i have .shp file contains limits of oceans , seas. but, instead of plotting of them, i'm interested in 6. geopandas creates similar dataframe (let's call "df"), pandas. possible create new dataframe ("df1") have selected areas of "df"? from mpl_toolkits.basemap import basemap import numpy np import matplotlib.pyplot plt import geopandas gp tes = gp.read_file(r'your\path\world_seas_iho_v1\world_seas.shp') tes1 = tes[(tes.name == "north pacific ocean"), (tes.name == "south pacific ocean")] tes1.plot() plt.show() plt.ion() when run this, "tes1" gets error: "series objects mutable, cannot hashed." any idea? thanks! (tes.name == "north pacific ocean"), (tes.name == "south pacific ocean") tuple of boolean series. can't pass indexer. want use bitwise or | combine boolean series , use result slice dataframe. from mpl_toolkits.basemap import

How to make horizontal table phpexcel? -

$objphpexcel->getactivesheet()->setcellvalue('a1', "no"); $objphpexcel->getactivesheet()->setcellvalue('b1', "name"); $objphpexcel->getactivesheet()->setcellvalue('c1', "age"); $objphpexcel->getactivesheet()->setcellvalue('d1', "job"); $stylearray = array('borders' => array('allborders' => array('style' => phpexcel_style_border::border_thick,'color' => array('argb' => '808080'),),),); $objphpexcel->getactivesheet()->getstyle('a1:d1')->applyfromarray($stylearray); $sql="select * cuba"; $query_c = mysqli_query($conn,$sql); $n=2; while($row_result=mysqli_fetch_assoc($query_c)){ $objphpexcel->getactivesheet()->setcellvalue('a'.$n,$row_result['id']); $objphpexcel->getactivesheet()->setcellvalue('b'.$n,$row_result['name&#

How to extract triggered job name in Jenkins using python -

i need extract name of running jenkins build using python script. 1 tell me how can extract jenkins triggered job's name @ runtime using python ? i've never cared particular bit of information before, jenkins sets environment variables during build. appears need like: import os job_name = os.getenv("job_name") depending on build outside of jenkins environment, might useful specify default in case variable not set: job_name = os.getenv("job_name", "(local build)") wiki

c - Which data type should be used for storing an integer as large as 10^9 in an array? -

i have code problem wherein have find frequency of minimum integer among integers scanned. have declared array of type size_t on machine has sizeof 8 bytes, tried data type unsigned long , still getting runtime error on final submission on hackerearth of code. i have checked , verified there no issue code since 3 test cases have passed on given input failing remaining test cases, issue data type used storing number. please guide me proper data type should use. problem mentioned on below link: https://www.hackerearth.com/practice/data-structures/arrays/1-d/practice-problems/algorithm/monk-and-lucky-minimum-3/ code: #include <stdio.h> #include<stdlib.h> size_t a[100001]={0}; int main() { int test_no,i; scanf(" %d",&test_no); for(i=0;i<test_no;i++) { int j,n ; size_t x,min; scanf(" %d",&n); for(j=0;j<n;j++) { scanf(" %zu",&x); a[x]++;

Setup django/python with Jenkins -

i configure jenkins python/django application (i'm using python 3.5) during setup open virtualenv , activate it. virtualenv -q wecover_platform . ./wecover_platform/bin/activate then install requirements file requirement.txt pip install -r $workspace/requirements.txt i can't pass step have permission denied issue. installing collected packages: asn1crypto, pycparser, cffi, idna, cryptography, pyopenssl, olefile, pillow, reportlab, selenium, django-jenkins exception: traceback (most recent call last): file "/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) file "/usr/local/lib/python3.5/dist-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, file "/usr/local/lib/python3.5/dist-packages/pip/req/req_set.py", line 784, in install **kwargs file "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 851,

python - Watson Discovery Service: Query Options -

is possible add threshold passage_score in query_options? here query_options in python: query_options = {'query': {query,'passage_score>20'},'passages': 'true'} which not working. able set threshold document score , relevance of entities not passage_score. this capability not supported, pretty easy in client application filter output of passages score. you are able tweak number of passages returned return top n passages (n=1-100). think want anyway, since passage score specific query, , not normalized score should used compare against others. wiki

How to Respond to SSDP Searches with Sockets in Python? -

i'm trying create chromecast device can stream video internet , remotely controlled. remote control http requests device , listen them following code: listening http requests device (localhost): import socket import sys s = socket.socket() host = "localhost" port = 8060 s.bind(('', port)) s.listen(1) try: while true: connection, clientaddress = s.accept() try: print clientaddress //do command //reply except: print "error" except keyboardinterrupt: print('interrupt') i went implement ssdp other devices can find device , cast , planning on using similar code listen msearch requests except on 239.255.255.250:1900. however, when msearch sent code not pick up. listening ssdp searches on "239.255.255.250:1900" import socket import sys s = socket.socket() host = "239.255.255.250" port = 1900 s.bind((host, port)) s.liste

#php - session if logout from user side admin side automatically logged out -

if logged in @ user side , admin side @ same time, when click on logout button on user side logged out admin side while both sides have it's on login , logout files. code of user side logout file <?php session_start(); session_destroy(); header('location:index.php'); ?> code of admin side logout file <?php session_start(); session_destroy(); header('location:login.php'); ?> parent folder "reservation system" contain user side file , child folder "admin" contain admin side files. don't use session_destroy(); here. session_destroy() deletes session data associated current session. check link: http://php.net/manual/en/function.session-destroy.php use unset($_session["user_id"]); unset($_session["username"]); wiki

amazon web services - How to filter Tag keys using aws boto3 starting with 'aws:' in ec2.describe_tags? -

we using following python code tags associated ebs volume , transfer them snapshots associated ebs volume. , want exclude aws: reserved tags output can apply them directly is. import boto3 ec2 = boto3.client('ec2') volume_tags = ec2.describe_tags(filters=[{'name': 'resource-id', 'values': ['volume-id',],},],) tag_snapshot = ec2.create_tags(resources=[snapshot-id],tags=volume_tags) you can use 'jq' program aws cli filter json results below aws ec2 describe-tags | jq '.tags[] | select(contains({key: "aws:"}) | not)' possibly use subprocess execute above command python unfortunately i'm unable try same using python bindings jq. jq or pyjq python bindings have installation issues using pip me wiki

php - OOP and single usage methods -

i'm in process of refactoring wordpress plugin follow oop principles , came across couple of situations have method serves single purpose. it doesn't take in arguments (currently) , it's job return modified array of data. is acceptable leave in class? or should refactored reusable? wiki

c# - Memory leak when I select uwp listbox item frequently -

i create listbox , register it's selectedchanged event. don't in event handler. , write ui automation test,it can select listbox's item in turn frequently. (there 5 items in listbox); when test running.i watch app's private memory.it increased. but when test over.the private memory hold , doesn't been collect. if use memory profiler in visual studio force gc.collect() . so think makes memory leak. could me ? thanks. here demo project link: https://1drv.ms/u/s!ahljbmnnql72uab1f86g-a2ledmd3a wiki

python - Merging pandas dataframe indices -

how can merge 2 indices index1 out[8]: int64index([22, 23, 24, 25, 32, 33, 34], dtype='int64') index2 out[8]: int64index([20, 23, 24, 25, 32, 33, 34], dtype='int64') so obtain index3 out[8]: int64index([20, 22, 23, 24, 25, 32, 33, 34], dtype='int64') that contains index1 , index2 without duplicates? use union in [1331]: index1.union(index2) out[1331]: int64index([20, 22, 23, 24, 25, 32, 33, 34], dtype='int64') wiki

pdf - Apache FOP - include one xsl to another -

i have many xsl files, have 1 common part. want separate part xsl file , include every file (to able apply changes once). using apache fop create pdf xsl file. tried approach described here: how use `xsl:include` apache fop , no success. here part of xsl: <xsl:template match="foobar"> <fo:root xmlns:fo="__http://www.w3.org/1999/xsl/format"> <fo:layout-master-set> .... .... <!-- parent element of part, want separate --> <fo:page-sequence master-reference="pages"> <!-- part, want move separate xsl file --> <fo:static-content flow-name="page-footer"> <fo:block font-size="7pt" margin-left="10mm"> <fo:table table-layout="fixed" width="100%" border-collapse="separate"> <fo:table-column column-width="100%"/> <fo:table-body> <fo:table-row> <fo:table-cell>

ajax - Why doesn't this simple PHP return a response? -

Image
this first php program i've written. ajax requests alright , i'm getting status 200 ok not getting response. <?php class employee{ private $fn; private $ln; private $dpt; private $id; } function newemployee(){ $employee = new employee(); $fn = $_post['firstname']; $ln = $_post['lastname']; $dpt = $_post['department']; $id = sprintf('%08d', $globals['$id']); $globals['$id'] = $globals['$id'] + 1; echo "first name: $employee\nlast name: $ln\ndepartment: $dpt\nid: $id"; $employee -> fn = $_post['firstname']; $employee -> ln = $_post['lastname']; $employee -> dpt = $_post['department']; $globals['$employeearray'][]= $employee; $globals['$numofemployees'] = $globals['$numofemployees'] + 1; $numemployees = $globals['$numofemployees']; echo "first name: $employee\n

html - trying to download excel file -

this html ajax code.... <form id="formfilter1" method="get" target="hidden-form"> select start date:<input type="date" name="start" id="start" required=""/> enter end date:<input type="date" name="end" id="end" required=""/> <input type="submit" value="submit" /> </form> <iframe style="display:none" name="hidden-form"></iframe> <script type="text/javascript"> $("#formfilter1").submit(function (e) { e.preventdefault(); $("#loaderid").show(); var formdata = $("#formfilter1").serialize(); console.log(formdata);

How do you print a variable in PHP that's either one element of an array, or the whole variable if it's not an array -

say have $examplevariable, want print. $examplevariable may array, in case have set right array element, can print print $examplevariable[$i] . if ($_get) { $i = array_search($_get["examplequerystring"], $examplevariable); } elseif (is_array($examplevariable)) { $i = 0; } else { $i = ""; } my problem last else , if $examplevariable not array, because print $examplevariable[] doesn't work. there can put $i print whole variable? alternatively, considered including brackets in $i, i'd have example $i = [0]; , in case don't know how i'd print it. $examplevariable$i won't work. i have number of variables besides $examplevariable i'll need print, same $i or lack thereof, i'd not have longwinded set each of them individually. this sounds way more complicated feel should, makes sense! you can nifty thing called type casting . means, can make variable array if not, prepending name (array) : $examplevariable =

android - How to make SearchView using list of objects retreived from firebase? -

Image
i making android app using android studio add student details , retrieve using firebase.i want make activity details of students under 1 activity user allowed make search. function in searchactivity.java retrieve records("studentlist") firebase database public arraylist<student> getstudentdetails(final arraylist<student> arrayliststudent,final listviewadapter adapter) { firebasedatabase database = firebasedatabase.getinstance(); databasereference fdatabaseroot = database.getreference("studentslist"); fdatabaseroot.orderbychild("name").addvalueeventlistener(new valueeventlistener() { @override public void ondatachange(datasnapshot datasnapshot) { (datasnapshot areasnapshot : datasnapshot.getchildren()) { student stud = areasnapshot.getvalue(student.class); arrayliststudent.add(stud);

javascript - JSON parsing under django framework -

i'm learning both django , javascript i passed json string python javascript , string got. [{"model": "polls.question", "pk": 1, "fields": {"question_text": "anything", "pub_date": "2017-09-07t09:36:07z"}}, {"model": "polls.question", "pk": 2, "fields": {"question_text": "hi", "pub_date": "2017-09-07t10:01:39z"}}] whenever use json.parse method javascript crashes javascript: let mylist = "{{ question_list_as_json | escapejs }}"; let temp = json.parse(mylist); python: question_list = question.objects.all() question_list_as_json = serializers.serialize('json', question_list) return render(request, 'polls/index.html', {'question_list': question_list, 'question_list_as_json': question_list_as_json}) in context question_list in template question_list_as_json ,

javascript - Shortest way to find Promise object status in chrome developer tool? -

Image
i working angular js , need know status of promise object whether in pending/fulfilled/rejected status? in chrome developer tool ( v 60 ), select variable , choose stored global variable ( temp1 ) temp1; deferred {promise: promise, resolve: Æ’, reject: Æ’, notify: Æ’} write below statement check promise object status . temp1.then(() => { console.log('resolved'); }) .catch(()=> { console.info(''rejected'); }); although working fine. looking alternative / different approach same in shorter way. temp1.isrejected // return true/false temp1.isresolved // return true/false i checked 1 suggestion can write method in console , can run temp1 variable again this, need write method on each new tab cumbersome. any suggestion or help? in case using chrome's native promises, can @ promise's [[promisestatus]] property: with standard $q promises in angularjs (i assume talking angular 1.x), can check $$state property:

SQL Server encryption with stored procedure -

i trying encrypt multiple column. need code. it's crashing @ cursor statement. alter procedure [dbo].[encrypt] (@stringtosplit nvarchar(500)) begin set nocount on; declare @splitword nvarchar(255) declare @pos int declare @tablename nvarchar (255) declare @columnname nvarchar (255) declare @sqlqueryforencryption nvarchar(500) declare @enckey nvarchar(255) declare cursorsplit cursor select @splitword dbo.splitstring (@stringtosplit) open cursorsplit fetch next cursorsplit @splitword select @pos = charindex('.', @splitword) select @tablename = substring( @splitword, 1, @pos-1 ) set @columnname = substring(@splitword,@pos,len(@splitword)-len(@tablename)) set @enckey = key_guid('enc_sym_key') open symmetric key enc_sym_key decryption certificate enc_cert set @sqlqueryforencryption = 'update' + @tablename + 'set'+ '' + @columnname +'&#

node.js - How to kill process with node js -

im running bdd tests uses ie, chrome , firefox drivers. when tests fails doesnt kills drivers keeps running. want kill process process name, in windows taskkill /f /im chromedriver.exe /t but node js or work along in linux , windows machines. if gulp plugin great can add task. you looking fkill works on macos, linux, windows. usage examples : const fkill = require('fkill'); fkill(1337).then(() => { console.log('killed process'); }); fkill('safari'); fkill([1337, 'safari']); wiki

C# web api / Javascript file upload set filename -

i use asp.net web api backend , javascript client. use form input let user select file, , make ajax request web api formdata, this: var form = $('#uploadform')[0]; var formdata = new formdata(form); $.ajax({ ... type: 'post', data: formdata, ... }); on backend receive request, , data httpcontent object. this: try { if (!request.content.ismimemultipartcontent("form-data")) { return statuscode(httpstatuscode.unsupportedmediatype); } var result = await _blobrepository.uploadblobs(request.content); if (result != null && result.count > 0) { return ok(result); } return badrequest(); } i need have unique file names. how can rename file? not matter if client side, or backend. wiki

javascript - Website input type text focus only works when browser loses and gets focus -

Image
my website uses several input text elements , defined in html like: <input type='text' style='width:200px;'/> however if open webpage , click on these inputs, this: so display no cursor , no blue border when selected. if click outside chrome browser, example if click on desktop , chrome, inputs work , following: so after step, how supposed to. this happens in chrome , on server, works fine on localhost. i have no blur functions or else. causes issue? do have ideas this? thank much! wiki

android - Unity - input latency is way too high but game has decent frame rate -

i implemented input mobile game so: have buttons , have anywhere else on screen. when player touches screen , not button ingame, character jumps. now, implemented using onpointerdown , onpointerup sets bool : public class jumpinput : monobehaviour { public static bool jump; public void pointerdown() { jump = true; } public void pointerup() { jump = false; } } if player jumping, checked fixedupdate method: if (!movementdisabled && grounded && jumpinput.jump) { //then can jump currentimageindex = 0; animstate = charanimstates.jumpstart; //added again here //zeroing out y axis velocity if had 1 rb2d.velocity = new vector2(rb2d.velocity.x, 0.0f); //until here jump = true; } as decent frame rates when using post-processing, have no clue why input delayed. require assistance verify if solution "anywhere on screen input" viable performancewise , not, how improve it.

android library - Jitpack.io does not work with Volley repository fork -

i forked volley repository: https://github.com/capnspellcheck/volley , enabled jitpack.io in settings. i include dependency compile 'com.github.capnspellcheck:volley:master-snapshot' gradle build fails resolve jitpack dependency, error the jitpack.io log when builds : execution failed task ':publishlibrarypublicationtomavenlocal'. failed publish publication 'library' repository 'mavenlocal' invalid publication 'library': artifact file not exist: '/home/jitpack/build/build/outputs/aar/volley-release.aar' why volley build not make aar ? appreciate help! wiki

mariadb - Error in php code after php and mysql upgrades -

my server has been upgraded , since 1 of old application not working php from php version 5.04 php version 5.4.156. mysql mysql database has been upgrade mysql version 4.1 mariadb version 5.5.52(mysql compatiable). here attaching of error codes , if have ideas please solve issue. error in login this error , corresponding lines of codes. php fatal error: call undefined function import_request_variables() in /user/jsf/public_html/guru/post_login.php on line 3 import_request_variables ("p","p_"); php notice: undefined index: hash in /user/jsf/public_html/guru/check_login.inc on line 7 $query.=$_request['hash']."' , login='".$_request['login']."'"; php notice: use of undefined constant is_on_server - assumed 'is_on_server' in /user/jsf/secret/defs.inc on line 2 define (is_on_server,true); error in registration php notice: use of undefined constant is_on_server - assumed 'is_on_server

ios - UIActivityViewController Style in iOS10 -

Image
i new ios , have problem on displaying uiactivityviewcontroller. have done code , works fine on ios8&9 ipad, when tested on ios10 ipad 5th , uiactivityviewcontroller frame restricted parent view controller. problem need fixed: the desired layout: uiactivityviewcontroller *vc = [[uiactivityviewcontroller alloc]initwithactivityitems:activityitems applicationactivities:nil]; vc.excludedactivitytypes = @[uiactivitytypemessage]; vc.popoverpresentationcontroller.barbuttonitem = self.sharebutton; vc.popoverpresentationcontroller.permittedarrowdirections = uipopoverarrowdirectionany; vc.popoverpresentationcontroller.delegate = self; vc.modalpresentationstyle = uimodalpresentationpopover; can give me hints on that? in advance. wiki

html - Display Flex align the Text Vertically Top and image to Center -

Image
i trying flex layout image needs align center not text. currently have 2 flex box first box both text , second 1 text , image when align items both aligning center need image align center not text. flex-container { border: 1px solid; display: flex; align-items: center; } .flex-item { flex: 1 auto; border: 1px solid green; height: 100%; display: flex; justify-content: center; } .flex-center { align-items: center; } <div class="flex-container"> <div class="flex-item">i'm top dog! </div> <div class="flex-item flex-center"> want vertically centered! , am! </div> </div> <div class="flex-container"> <div class="flex-item">i'm top dog!previous. next. image scented lolly dude small hardtop pencil case smiggle ... tall pencil pack x24 2 $20 tall pencil pack x24 $12.95 aud. previous. next. image scented lolly dude small

visual studio - Multiple Inheritance (maybe Abstract class?) C# Entity Framework -

the last weeks have been working on development of database based on entity framework 6 (code-first) on c# using visual studio 2015. i'm working on options inheritance offers work with. @ point , following standards of database should implement multiple inheritance primary key. means? means should implement class inherits class , have own pk identify him different parent class. @ point implement tpc, making parent class abstract , not defining pk on parent. sample of code @ point (this works , have tested it) public abstract class person { public string name { get; set; } public string lastname { get; set; } } [table("students")] public class student : person { [key]public int id_student { get; set; } public string code_s { get; set; } public virtual icollection<course> courses { get; set; } } then standard should follow build database requires me implement inheritance taking student

bash - Awk summation is carried out without floating point precision -

Image
i have file.txt , i'm trying summarize values of fourth , fifth columns: ^20170821^3007030^153^863.53^0.42^ ^20170821^1402675^110^581.36^0.37^ ^20170821^1404785^24^155.29^0.29^ ^20170821^1406505^40^210.51^0.00^ ^20170821^1005^1^18.00^0.00^ ^20170821^9657^7^7.28^0.00^ ^20170821^143646^86^486.59^0.08^ ^20170821^342657^3^12.60^0.00^ ^20170821^1006^4^7.04^0.04^ ^20170821^1004^1215^3502.44^12.09^ ^20170821^1007^932^6689.64^15.07^ ^20170821^378228^1^2.80^0.00^ ^20170821^704797^4^23.80^0.00^ ^20170821^705642^2^9.80^0.00^ ^20170821^703689^7^40.60^0.00^ ^20170821^148340^75^382.81^0.20^ ^20170821^257^2^5.60^0.00^ ^20170821^3702^1^2.80^0.00^ ^20170821^3703^1^7.00^0.00^ ^20170821^258^1^7.00^0.00^ ^20170821^920299^11^60.20^0.00^ ^20170821^210705^2^14.00^0.00^ ^20170821^867693^12^65.88^0.08^ ^20170821^2635085^6^33.60^0.00^ ^20170821^13211^140^409.18^0.58^ ^20170821^64^2^14.00^0.00^ ^20170821^13214^234^1685.91^1.26^ ^20170821^13212^2^34.90^0.00^ ^20170821^13213^2^2.80^0.00^ ^20170821^18385

database - Assign several values to one key Pentaho Kettle -

please help! have 2 streams (columns), let's col_1 , col_2 . there 50 unique rows in col_1 , 10 unique rows in col_2 . need assign these 10 unique rows every row of col_2. actually need populate every value col_1 10 times. as far can understand, looking joinrow (cartesian product) step. wiki