Posts

c# - Deploy WPF Application with SQL Server -

i'm using visual studio 2012. created wpf app client using service based database , published app fails access database. have installed sql server 2008. please guide me through process on how deploy app using sql server , changes should make in connection string , app.config or other change need make. have googled , searched on stack overflow 2 days find detailed solution. for 1 pc, there no need service based database. because service based database, there should background service running handle requests. came across same issue when had deploy wpf application client's machine. unless have multi-user app , need central database, best choice use sqlite. 1 disk file not need service running connection. the connection string have match place of sqlite file. can refer link start. sqlite wpf also sqlite supports both db first , code first approaches of entity framework , linq sql. find bit hard convert worth it. not can tell in 1 answer, try maybe write articl...

php - laravel 5.3 new Auth::routes() -

recently start use laravel 5.3 write blog, have question after run php artisan make:auth when run this, generate routes in web.php this code in it: auth::routes(); route::get('/home', 'homecontroller@index'); then run php artisan route:list , find lots of actions, logincontroller@login... but didn't find these actions in app\http\controllers\auth , these? and auth::routes() stand for, can't find routes auth. i need help, thank answer question auth::routes() helper class helps generate routes required user authentication. can browse code here https://github.com/laravel/framework/blob/5.3/src/illuminate/routing/router.php instead. here routes // authentication routes... $this->get('login', 'auth\logincontroller@showloginform')->name('login'); $this->post('login', 'auth\logincontroller@login'); $this->post('logout', 'auth\logincontroller@logout')->name('logo...

java - Red X Mark in android studio application while running -

Image
i wish if 1 can me in android studio problem? i came while working on application have no idea whatsoever since tried possible solution can resolve issues. any appreciated. the red x there saying cannot build/run project. because had error while indexing application. error happens when open project. needs index code again. couple things can remove this: go gradle file, delete something, , type back. ask "refresh" project. you may try cleaning , rebuilding project. basically, reloading code should fix problem. if can find way refresh project, can try use way too.

bash - How to extract x lines every y number of lines -

i have big file want extract x lines every y number of lines. searched around , found answers on how print first z lines, tail -n +<lines skip + 1> i'm trying combine sed don't know how. to print first 2 lines of every tex lines, try: awk -v x=2 -v y=10 '(nr - 1) % y < x' for example: $ seq 20 | awk -v x=2 -v y=10 '(nr - 1) % y < x' 1 2 11 12 how works awk reads through input line-by-line. print line if condition (nr - 1) % y < x true. nr line number starting @ 1 first line.

java - Javax.swing and AJDT issues -

i'm student , new aop , have think in use aspects define, in them, questions deal colors, borders, size of font, , that's it. that, downloaded complement ajdt of eclipse can work aspects (my version of eclipse 4.3 kepler , ajdt 2.2.3). i have aspect called "style" point cut captures call constructor of class frmprueba, , 1 advice around replace instance of formulary created another, configure button same formula, in yellow. problem this, aspect define style, pops error: https://s13.postimg.org/m2a13phuf/1.png - https://s13.postimg.org/twamp3pnb/2.png i searched lot on internet didn't find solution this.

Javascript: Getting undefined on input box that takes a range from 0 to 10 -

i have 2 buttons (+ , -) , input box value of 10. input must take value 0 10 , can't figure out why i'm getting undefined after reach either 0 or 10 on input box. tried using parseint values. perhaps i'm not doing on right place. appreciate help. var fighterscore1 = document.getelementbyid("fighterscore1"); fighterscore1.value = 10; var fighter1inc = document.getelementbyid("fighter1inc"); var valor = 10; fighter1inc.onclick = function (valor) { fighterscore1.value = increasevalue(valor); }; fighter1dec.onclick = function (valor) { fighterscore1.value = decreasevalue(valor.value); }; function decreasevalue() { if (valor <= 0 ) { } else { valor--; return valor; } }; function increasevalue() { if (valor >= 10 ) { valor = 10; } else { valor++; valor = valor; return valor; } }; <div id="rwid1"> <button id="...

javascript - Query subdocuments MongoDB Node.JS -

i have collection of objects have sub dictionary contains data given institution, identified provider_id . how can query collection, products , return produce contain given provider id? "natl_total_cost": 1.27478784e9, "natl_average": 8338.487, "natl_report_count": 152880, "name": "wax", "provider_cost_dict": { "340008": { "report_count": 181, "total_cost": 1335465, "average_cost": 7378.26 }, "340001": { "report_count": 643, "total_cost": 5026724, "average_cost": 7817.6113 }, ... how query of products returns products contain given provider id in provider_cost_dict ? you can use $exists operator db.getcollection('yourcoll').find({"provider_cost_dict.340008": { $exists: true }})