Posts

GNU Make shell function breaks when piped to cut -

hello have mve trying catenate 2 variables , pipe cut. all: @echo $(app_name) @echo $(current_branch) @echo $(call eb_safe_name,$(current_branch)) @echo $(shell echo "$(app_name)-$(call eb_safe_name,$(current_branch))" | cut -c 23) output: $ cicdtest $ issue#13-support-multi-branch $ issue-13-support-multi-branch $ o if remove | cut -c 23 output fine, need limit 23 char. doing wrong on 4th echo statement above? different behavior in test script in make, issue explicit use of cut, not make. following works expected: @echo $(shell echo $(app_name)-$(call eb_safe_name,$(current_branch)) | cut -c 1-23) cut has handling incomplete range, in make (even though using bash) complete range needed: bytes, characters, , fields are numbered starting @ 1 , separated commas. incomplete ranges can given: -m means 1-m ; n- means n through end of line or last field. options -b byte-list --bytes=byte-list print ...

osx - error in backend: 32-bit absolute addressing is not supported in 64-bit mode -

hi i'm working on asm intel_syntax noprefix on mac using gcc, reason keep getting error in backend: 32-bit absolute addressing not supported in 64-bit mode has variables, @ moment been use on asm inline? here's code: #include <stdio.h> char c, b; int main() { printf("give me letter: "); scanf(" %c", &c); _ _asm( ".intel_syntax noprefix;" "xor eax, eax;" // clear eax "mov al, byte ptr [c];" // save c in eax "cmp eax, 65;" // eax ? "a" "jl fin;" // eax < "a" -> fin "cmp eax, 90;" // eax ? "z" "jg upc;" // eax >= z -> case "add eax, 32;" // make low case "jmp fin;" // -> fin "upc: cmp eax, 97;" // eax ? "a" "jl fin;" // eax < "...

javascript - Callback Eventlistener -

i new node, , having bit of trouble wrapping mind around callbacks. i trying use single function either open component's connection, or close it, depending upon it's current state. if(state){ component.open(function(){ component.isopen(); //true }); } else{ component.isopen(); //always false component.close(); //results in error, due port not being open } basically trying wait unspecified amount of time before closing connection, , close using singular toggle function. have seen, way guarantee port open, inside callback. there way have callback listen kind of event take place? or there other common practice accepting input in callback? callbacks meant called once whereas events there invoke methods on demand 'so speak' multiple times, use case appears me want open , close connection on demand multiple times... for better use eventemitter part of nodejs , easy use. for example: var eventemitter = require('events').e...

How do I take a snapshot using cpanel -

i'd take restorable snapshot of data (so can revert if break anything). don't want download data (so have reupload it). snapshot i'm talking zfs snapshot. can cpanel ? if want restores full account backup have contact hosting provider this. restore you, cpanel access can not restore full account backups.

In bash, how do I use grep to find a certain function from the output of perldoc? -

so want find built in function perl. running ubuntu, run line in terminal: $ perldoc perlfunc | grep "map" but don't documentation function, using grep wrong? grep finds individual lines, won't much. use e.g. perldoc -f map to see doc given built-in. (and perldoc perldoc see doc perldoc.)

c# - How to link external Xaml page to a Grid in Universal Windows Platform? -

Image
i want link external .xaml file grid in universal windows platform app. this folder structure: i want link listview.xaml grid declared inside mainpage.xaml codes both file : mainpage.xaml: <page x:class="todogrocery.mainpage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:todogrocery" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d"> <grid background="{themeresource applicationpagebackgroundthemebrush}"> <grid.rowdefinitions> <rowdefinition height="40"/> <rowdefinition height="*"/> </grid.rowdefinitions> <grid x:name="gridview" grid.row="0" horizontalalignment="stretch" margin="0,0...

sql - How to select id's wich contains just special values? -

i need sql query. have table this: id booktype date ----------- ---------- ------ 1 85 01.01.2014 1 86 01.01.2014 1 88 01.01.2014 1 3005 01.01.2014 1 3028 01.01.2014 2 74 01.01.2016 2 85 01.01.2016 2 86 01.01.2016 3 88 01.01.2015 3 3005 01.01.2015 i need query, returns id's booktype 85, 86 , not id's booktype 88,3005,3028. other types not relevant, can included. example: i want id 2, because there no booktype of 88, 3005, 3028. have id 74, doesn't matter, can included. i tried this: select bookid id, count(bookid) number books date between '01.01.2014' , '01.01.2016' , booktype in (85,86) group bookid having count(bookid) >1 minus select bookid id, count(bookid) number books date between '01.01.2014' , '01.01.2016' , booktype in (88,3005,3028) group ...