Posts

wpf - Image edit and save Out of Memory Exception C# -

i'm working in wpf application show images in 2 places means same image gets loaded in 2 places. in 1 of place image shown along other few images in slider able edit , save. if there no image available in location should showing separate image image not found not editable. when started working on functionality got used process exception during edit , save. after searching came solution , @ rare time out of memory exception when click next or previous or first or last in slider. slider image control 4 buttons. when buttons clicked below method called. i'm not sure if there memory leaks. bool noimage = true; private static readonly object _syncroot = new object(); private bitmapsource loadimage(string path) { lock (_syncroot) //lock object doesn't executed more once @ time. { bitmapdecoder decoder = null; try { //if image not found in folder, show image not found. if (!file.exists(path) && (path != null)...

html - How to change pressed item background color in ion-list on Ionic? -

i have list of items, want change background color of pressed item in ionic project. index.html <ion-list> <ion-item ng-repeat="item in familleitems"> <div ng-click="selectsousfamille(item.numfam)">{{item.nomfam}}</div> </ion-item> </ion-list> help me please highlight hover item purely css ion-item:hover { background-color: slategray !important; } highlight active item you add active css class using ng-class. define custom css 'active' class. <ion-item ng-repeat="item in familleitems" ng-class="{'activeitem': active}"> <div ng-click="selectsousfamille(item.numfam)">{{item.nomfam}}</div> </ion-item> example: <ion-content padding="true"> <ul class="product-list"> <!-- need .selected in stylesheet --> <li ng-repeat="(key, item) in products" ng-...

javascript - Setting a css property using a normal variable for knockout js -

i want set css property using if condition using normal variable other observables. like: a.html file: <span class="label" data-bind="text: isapproved, css: sampleglobalvar == true ? 'label-success' : 'label-important'"></span> a.js file: edit: define('durandal/app'],function(app) { var = function() { sampleglobalvar = 'true' }; } i getting error such 'sampleglobalvar' doesnt exist in viewmodel . know observable has used , have other problems observable switching between 'true' , 'false' observables creating problems: like if use: sampleglobalvar = ko.observable(""); setting : if(//condition) { sampleglobalvar(true); } else { sampleglobalvar(false); } was not clearing observable , due getting different results. to summarize possible use normal javascript variable use in css data-bind property? yes, it's possible. true global (i.e. stu...

sql server - Issue with MS-Access Application on shared network(Citrix) using by many users simultaneously -

a ms-access application sql server backend running on shared location(citrix) through mde file. running fine on local machine when multiple users generate certificate simultaneously, gives error , may file corrupt because after getting error file not work on local environment. ms-access application error

Flask Restful URLs giving 404 while in a blueprint -

i trying use flask restful blueprint in pattern works other blueprints. keep getting 404 error when go /todos/1 my project setup follows: folder structure ├── app │   ├── __init__.py │   ├── mod_api │   │   ├── __init__.py │   │   └── routes.py │   ├── main │   │   ├── __init__.py │   │   ├── forms.py │   │   └── views.py │   └── templates │   ├── base.html │   └── home.html ├── config.py ├── manage.py └── requirements.txt __init__.py from flask import flask flask_restful import api flask_bootstrap import bootstrap config import config bootstrap = bootstrap() api = api() def create_app(config_name): app = flask(__name__) app.config.from_object(config[config_name]) config[config_name].init_app(app) bootstrap.init_app(app) api.init_app(app) .main import main main_blueprint .mod_api import mod_api api_blueprint app.register_blueprint(main_blueprint) app.register_blueprint(api_blueprint) return app mod_api/__init__.py fr...

linux - poll(2) on read fd of pipe(2) and fd of inotify_init() is resulting in endless EINTR -

update possible bug in firefox - https://bugzilla.mozilla.org/show_bug.cgi?id=1288293 old post i writing inotify file watcher. my main thread first creates pipe pipe , creates polling thread, , sends thread read fd of pipe. int mypipe[2]; rez = pipe(mypipe) if (pipe(pipefd) == -1) { exit(exit_failure); } int mypipe_fd = mypipe[0]; my polling thread starts infinite poll watching inotify inotify_fd , pipe mypipe_fd poll this: int inotify_fd = inotify_init1(0); if (inotify_fd == -1) { exit('inotify init failed'); } // in_all_events = in_access | in_modify | in_attrib | const.in_close_write | in_close_nowrite | in_open | in_moved_from | in_moved_to | in_create | in_delete | in_delete_self | in_move_self if (inotify_add_watch(inotify_fd, path_to_desktop, in_all_events) == -1) { exit('add watch failed'); } int mypipe_fd = blah; // read end of pipe generated on main thread pollfd fds[2]; fds[0].fd = mypipe_fd; fds[1].fd = inotif...

Android ripple effect outside view for pre lollipop -

Image
i have circular view , need generate ripple effect outside view light shade when click on view. take @ these 2 libraries: https://github.com/skyfishjy/android-ripple-background https://github.com/ruzhan123/rippleview