Posts

c# - wpf, register DP, bindable converter parameter -

[valueconversion(typeof(object), typeof(object))] public class bindableconvertor : dependencyobject, ivalueconverter { public object bindableparameter { { return getvalue(mypropertyproperty); } set { setvalue(mypropertyproperty, value); } } public static readonly dependencyproperty mypropertyproperty = dependencyproperty.register( nameof(bindableparameter), typeof(object), typeof(bindableconvertor), new propertymetadata(string.empty) ); public object convert(object value, type targettype, object parameter, cultureinfo culture) { // actions here... } public object convertback(object value, type targettype, object parameter, cultureinfo culture) { throw new notimplementedexception(); } } xaml: <application.resources> <local:bindableconvertor x:key="myconvertor" bindableparameter="{binding anytargetproperty}" />...

Count the number of lines in a file - C -

i'm receiving input file, bunch of lines. want able count lines analyse them. the input many lines of code integers. ex: 3 2 1 2 2 3 4 3 1 2 2 3 3 4 here's tricky part: first line has 2 numbers: 3 , 2. (the 3 isn't relevant now). 2 important. represents number of lines have read , save. so, according example have save lines 1 2 2 3 so why there other lines? - ask. well, let's see input blocks. after line 3 2 read 2 lines. it's block ended. then, line 4 3 came along. means have exact same thing did first block. so, line 4 3 know have read , save next 3 lines. meaning lines 1 2 2 3 3 4 i've been head on hills , can't seem find possible solution when you've got problem this, it's useful think of structure first. here's 1 method in simple pseudocode main algorithm started. people can't unless present code , problem it. declare line buffer array while (read line buffer == succeeds) { scan buffer 2 numbers (m, n...

java - How to access command line arguments in Spring configuration? -

i have spring boot application uses spring integration stored procedure inbound channel adapter. pass command line argument stored procedure. spring boot doc says springapplication convert command line option arguments starting ‘--’ property , add spring environment. correct way access property in int-jdbc:parameter element? application.java import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.springbootapplication; import org.springframework.context.configurableapplicationcontext; @springbootapplication public class application { public static void main(string[] args) throws exception { configurableapplicationcontext ctx = new springapplication("integration.xml").run(args); system.out.println("hit enter terminate"); system.in.read(); ctx.close(); } } integration.xml <int-jdbc:stored-proc-inbound-channel-adapter stored-procedure-name="sp_get_some_records...

javascript - Appending a to-do list -

i trying make "to list" app. trying append put in input list under "to do" "done" button. here have far: html: <!doctype html> <html> <link rel="stylesheet" text="text/css" href="doneit.css"> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> </head> <body> <div id="container"> <input type="text" id="task" placeholder="new task"/> <button id="enter">enter</button> <div class="todo"> <ul id="chores"><h2>to do:</h2></ul> </div> <button id="reset">new list</button> </div> <script type=...

php - Joomla: can't find code of something -

i need change information in block in sidebar. found need in temples/mytemplate/index.php file. here can see such tag (_rss_news): enter image description here how can find code of _rss_news example? _rss_news example, need thing. main question it? , how find it? <?= _variable ?> i tried find need in database, , tried open lot of files , seatch tag. efforts unsuccessful... i'm using old joomla. problem doesn't here. please me! thank much! do use ide netbeans ??i has hint or autocomplete,and perfect.i more dreamweaver shouldn't ( never) try finding methods,varrible test , errors. netbeans work easly conditionally function defined. should developing web should extentions webdevoloper , firebug easy in devoloping. goodluck

c++ - error C2664: 'pthread_create' : cannot convert parameter 3 from 'void *(__clrcall *)(void *)' to 'void *(__cdecl *)(void *) -

i trying use pthread library. what cause of error? error c2664: 'pthread_create' : cannot convert parameter 3 'void *(__clrcall *)(void *)' 'void *(__cdecl *)(void *) here's code: pthread_create(&thread1,null,sub_m,(void *)data); void *sub_m(void* data) make void __cdecl sub_m(void *data) . in managed code, need proper calling convention.

sql - Unable to comprehend why a WHERE clause is being accepted -

this question has answer here: sql - having vs where 7 answers i trying understand difference between having , where. understand having used group statements. however, cannot understand why following statement accepted: select sum(child_id) children child_id = 5 group child_id shouldn't correct statement select sum(child_id) children group child_id having child_id = 5 ? where clauses executed before grouping process has occurred, , have access fields in input table. having performed after grouping pocess occurs, , can filter results based on value of aggregate values computed in grouping process.