Posts

Showing posts from January, 2012

php - Generate unique URL for each customer downloading the same file -

i need deliver file example.com/realpathofthe/file.zip to customers don't want communicate same url customers (they share url non-customers, , difficult track if product delivered or not). instead, i'm generating random string in php , want share such url: example.com/download/djbf6xu83/file.zip which different each customer. question: should generate symlinks each customer link random string path path of actual file on server? or use rewriterule in .htaccess this? if done way (ie rewrite /download/*/file.zip actual file), all random strings link same file. not because non customer generate download link himself. how handle correctly? note: i'd avoid if possible php has process gigabytes of files data (through file_get_contents() ) before delivering it. thought (please correct me if i'm wrong) lighter server let apache distribute file. there can many ways approach problem. here's suggest. make file, /download.php , pass in download code

java - SQL service and database check with hibernate -

i'm using hibernate serialize java objects, check if sql service running , database present, before use of hibernate's function. how do? i seen method calling sql function, i'm looking more integrated hibernate, read hibernate.cfg.xml access parameters, example. wiki

python - Remove only formating on a cell range selection with google spreadsheet API -

i looking way remove formating on cell range selection, not content, using google sheet api python. for now, solution have apply same logic normal format , setting style none. example, when set border format specifical range, use : request_dict = {'requests': [{ "updateborders": { "range": { "sheetid": sheetid, "startrowindex": 1, "endrowindex": raws, "startcolumnindex": first_col, "endcolumnindex": last_col}, "top": { "style": "solid_medium", "width": 1, "color": {"blue": 0}}, "bottom": { "style": "solid_medium"

Add line breaks to titles in Wordpress -

i'm totally newbie in programming , i'm creating wordpress site. i'm trying add line break wordpress title. i have read lot , tried lot every time insert code supposed add line break, doesn't break line , stops wordpress working. asked on reddit no 1 help. what do add line break title? so seems like add breakline on every title?! if could, please, care teach me, step step, how break line wordpress title? if so, need use filter: <?php function your_custom_filter($title){ //this function returns title wrapping div element around it. //by default, should break line, unless otherwise specified in //your css. return '<div>' . $title . '</div>'; } add_filter('the_title', 'your_custom_filter'); put somewhere in functions.php your_custom_filter gets called everytime the_title gets called. refer hooks. hope helps. wiki

python 2.7 - Is there any way to use Sass with bottlepy's dynamically generated styles? -

i use python's bottle micro framework serve web pages. style sheets generated dynamically using %include(main_style.tpl). i'd use css pre-processor ( sass or less ). far know, sass works static css file. can shed lights on how dynamic css? any appreciated, wiki

javascript - How do I add prototype-like properties to an existing object? -

i start off simple object like: var person = { name: 'joe', age: 21 }; i want add method object without method showing when use hasownproperty. example, let's create birthday method increments person's age. var birthday = function() { this.age++; }; how add person object if say: for(var in person) { console.log(i); } i get: name: 'joe' age: 21 birthday: function() { ... } but if say: for(var in person) { if(person.hasownproperty(i)) { console.log(i, person[i]); } } i get: name: 'joe' age: 21 var person = { name: 'joe', age: 21 }; object.defineproperty(person, 'birthday', { enumerable: false, configurable: false, writable: false, value: function() { this.age++; } }); function showperson() { for(var in person) { if(person.hasownproperty(i)) { console.log(i, person[i]); } } } showperson(); person.birthday(); showperson(); if iterating met

ios - Custom Unwind Segue Crashes with NSException in Swift -

Image
i have unwind segue have custom animation. i have custom segue class: import uikit import quartzcore class seguefromright: uistoryboardsegue { override func perform() { let src: uiviewcontroller = self.source let dst: uiviewcontroller = self.destination let transition: catransition = catransition() let timefunc : camediatimingfunction = camediatimingfunction(name: kcamediatimingfunctioneaseineaseout) transition.duration = 0.25 transition.timingfunction = timefunc transition.type = kcatransitionpush transition.subtype = kcatransitionfromright src.navigationcontroller!.view.layer.add(transition, forkey: kcatransition) src.navigationcontroller!.pushviewcontroller(dst, animated: false) } } i have defined unwind segue: @ibaction func unwindtogameover(sender: uistoryboardsegue) { } i call segue on button press: @ibaction func backbuttonpressed(_ sender: any) { performsegue(withidentifier: "unwindtogameover", sender:

php - Call to undefined method Illuminate\Database\Query\Builder::with() -

i need update current code using with() function. before use db::raw (i use model style) with() not have problems. however, when use db::raw() with() can not use anymore. how make query can use with() function? thanks. $question_list = db::connection('mysql_pencil_content') ->table('cms_qst_master_main mst') ->select(db::raw( 'mst.*', 'mst.question_id', 'mst.dt_added dt_created', 'mst.scode_id subject_code_id', 'mst.first_dataentry_id owner_user_id', 'mst.format_type_id qst_format_id', 'mst.publish_status published_status', 'mst.edu_level_id edulevel_id', 'mst.edu_year_id eduyear_id', '8 owner_user_type', 'mst.dt_update', 'chp.chapter_name',

c# - UWP - ListBoxItem - Click Trigger. -

i´ve uwp application listbox. when click on related listboxitem change frame content. ( using selectionchanged event this. ) inside frame can go , multiple operations such move page frame. (and keep sme listboxitem selected. ) so have -> mainpage -> contactspage -> contactsdetailpage. (on listbox have "contacts" item selected). but, if on "contactsdetailspage" click on "contacts" listboxitem selectionchanged doesnt trigger ( because selected). so, cannot navigate "contact" page. there event can use navigate when click on listboxitem ? or can suggest options ? thank ! you may set index -1 after logic , ignore when it's fired: private void listbox_onselectionchanged(object sender, selectionchangedeventargs e) { if (listbox.selectedindex == -1) return; //your logic listbox.selectedindex = -1; } wiki

android - Why even using requestLayout() after expanding view the textViews overlap each other in ConstrainLayout? -

Image
the bottom part invisible when user clicks on item bottom part become visible , description line(3_rd line) when view isn't expanded shows 1 line, becomes expanded should show as should 3-4 lines, when description occupies 3-4 lines, text if bottom part overlaps , call requestlayout nothing change if (holder.binding instanceof storeofferitembinding) { final boolean isexpanded = position == expandedposition; ((itembinding) (holder.binding)).offerdetail.setvisibility(isexpanded ? view.visible : view.gone); if (isexpanded) { holder.itemview.requestlayout(); } ((itembinding) (holder.binding)).offerdescription.setmaxlines(isexpanded ? 4 : 1); holder.itemview.setactivated(isexpanded); holder.itemview.setonclicklistener(view -> { expandedposition = isexpanded ? -1 : holder.getadapterposition(); notifyitemc

Click on a locator using selenium with Java -

i trying automate scenario want click on tree view ('+','-') expand tree element clickable @ ('+','-') icon attached each node. inspect element able inspect checkbox , label associated each node , not able inspect('+','-'). approach tried :- getting exact coordinates have click unfortunately unable find coordinates. using sikuli - have done using sikuli, click on ('+','-') icon based upon image of '+' , '-' icon , solution has limitations , not in long run. the code: public void expandingmultipletreeicon() throws exception { screen s = new screen(); pattern p = new pattern("c:\\seleniumworkspace\\image.png").similar( (float) 0.7); iterator<match> = s.findall(p); i.next(); i.next().click(); } the html: <div id="mps2authoringtree" class="tree-menu mps2authoring ui-menu ui-widget ui-widget-content ui-corner-all" role="men

ruby - Capistrano 3 set variable "previous_path" -

i trying set previous_path in capistrano3. aware capistrano 3 doesn't handle variable, set default variable in configuration. add function before deploy::symlink::release : namespace :deploy desc 'set global variable previous_release' task :previous_release on roles(:all) |host| puts "current_path #{current_path}" set :previous_release, proc{capture("readlink #{current_path}")} end end end but function keep giving me current_path after symlink released , linked new deploy. need variable in order able handle copy previous_release current_release . thank you! wiki

rx java2 - Reactive programming that calls onComplete based on a set and then repeats -

in reactivex, have series of events need group events sets based on event type , unique id. so series looks this: a1 a2 b1 c1 b2 c2 ... and oncompleted called based on following sets [a1, b1, c1] [a2, b2, c2] and repeat indefinitely 3, 4, 5 ... if set takes long receive events, onerror should called. with groupby possible group events id, , use and when 3 events isn't clear documentation how use along timeout. you can use groupby , flatmap , takeuntil inside of flatmap have groups complete when terminal value discovered: observable.fromarray("a1 a2 b1 c1 b2 c2".split("\\s")) .groupby(v -> v.charat(1)) // <------------------ .flatmap(g -> g .takeuntil(v -> v.charat(0) == 'c') // <------------------ .tolist()) .subscribe(...) replace functions pointed @ grouping , end-detection function of datatype. wiki

java - function name as a string -

i trying wrap head around generic , functions... trying achieve: passing function name string executed: i want wrapper.usefunction("eleven") or wrapper.usefunction("ten") public class wrapper<t> { public f usefunction(function<f, f> function) { return function.apply(f); } function<f, string> ten = s -> "10"; function<f, string> eleven = s -> "11"; } but code not close compiling. maybe doesn't make sense. suggestions? if have finite set of functions able call recommend building map maps strings instances of runnable (or similar functional interfaces). usefunction method may function implementation in map , call if exists. example: public class someclass { private final map<string, runnable> methods = new hashmap<>(); { methods.put("helloworld", () -> { system.out.println("hello world!"); });

.net - Best C# API to create PDF -

can recomend pdf api c#. free best, dont mind paying it. update: i'm not sure when or if license changed itext# library , licensed under agpl means must licensed if included closed-source product. question not (currently) require free or open-source libraries. 1 should investigate license type of library used in project. i have used itext# success in .net c# 3.5; port of open source java library pdf generation , it's free. there nuget package available itextsharp version 5 , official developer documentation , c# examples , can found @ itextpdf.com wiki

python 3.x - "Cannot connect to server 'datahost': [Errno -2] Name or service not known", gaierror(-2, 'Name or service not known') -

i'm getting error gitlab-ci. @ test stage, pull down latest docker, , run docker run $latestimage python /path/to/test.py , , error message came pytds pytds.tds.loginerror . didn't error on local machine because have set x.x.x.x datahost in local /etc/hosts . added 1 more docker command before test command: docker run -i --add-host datahost:x.x.x.x $latestimage cat /etc/hosts , can see datahost has been added image. however, when run test, still got error. don't know if there's else left, current research online should "forgot set host" problem. wiki

google apps script - Copy a range in active sheet, create new spreadsheet with custom name, paste range -

i wrote first google apps script makes copy of spreadsheet (including tabs within spreadsheet) , places specific folder in user's drive. copy renamed based on cell value in original spreadsheet. here script, reference: function copydocument() { var ss = spreadsheetapp.getactivespreadsheet(); // current active spreadsheet. var id = ss.getid(); // current active spreadsheet id. var sstocopy = driveapp.getfilebyid(id); // spreadsheet driveapp. var sheet = ss.getactivesheet(); // current active sheet. var sheet_name = sheet.getrange("b1").getvalue(); // value of cell b1, used name new spreadsheet. var folder_name = sheet.getrange("c23").getvalue(); // target folder id. var folder = driveapp.getfolderbyid(folder_name); // id of folder place copy of spreadsheet. sstocopy.makecopy(sheet_name,folder); // make copy of spreadsheet in destination folder. } this script works, have been asked modify because script wrote copying on unnecessary tabs , data causing co

paypal - How can I be notified when a recurring payment fails? -

a client has civicrm site uses paypal payments pro (legacy) payment processor. (legacy last version worked civicrm , provides recurring billing) my client's users sign memberships, of pay recurring payments. if recurring payment fails, , subscription lapses, client know, can reach out user or otherwise take informed action. how can set things client informed if recurring payment fails? wiki

c++ template template : cannot access private member -

i'm trying work template template parameters in c++, famous stack example : however acompilation error in code below. understanding 'stack<t2, cont2>' , 'stack<t, cont>' same class 'container' accecible in ' stack<t, cont>::operator = ( const stack<t2, cont2>& rhs )' could me? there specific should pay attention when working template template parameters? template <typename t, template < typename elem, typename alloc = std::allocator< elem > > class cont = std::deque > class stack { cont<t> container ; public : stack() {} ; template <typename t2> void push_back ( const t2& elem ) ; bool isempty (void ) const ; template <typename t2, template < typename elem2, typename = std::allocator< elem2 > > class cont2 > stack<t, cont>& operator = (const stack<t2,cont2>& rhs ) ; void push_back (t cons

javascript - dynamic table row generation using ng-repeat -

my problem similar thread dynamic table creation ng-repeat in angularjs json looks this { "id": "string", "marks" : { "nummin":"integer" "nummax":"integer" "subjectname": "string", } } just there additional feature user going enter no of rows need generated , table generated according dynamic json file fetched database. in advance try out this js-fiddle . let me know if helped you! let app = angular.module('app', []); app.controller('ctrl', ['$scope', ($scope) => { $scope.numberofrows = 0; $scope.data = []; $scope.$watch('data', () => { console.log($scope.data); }, true); }]); app.filter('range', function () { return function (input, total) { total = p

android - anti virus deleted gradle file -

i have big problem , don't know do. earlier got anti virus , prompted clean files , erase duplicate did. since have installed android studio multiple times , have partially restarted windows seen big size of memory back. when deleted duplicate files suppose there android studio files in there , not getting error : "this project using unsupported version of gradle" i have tried uninstall , re install android studio 2 times , nothing works. when click on error android studio fix ever issue has nothing. , last tried make new project , same error know not project file deleted gradle file using search try find gradle located in system, copy path. then in android studio: go file -> settings -> build,execution,deployment -> gradle -> select 'use local gradle distribution -> , select gradle -> click apply -> ok in case not find gradle anywhere in system, go here : https://services.gradle.org/distributions/ , download gradle

android - Shadow below Nav Drawer when it's open -

this question has answer here: disable dark fading in navigation drawer 4 answers when open nav drawer, screen below becomes darker. need change color (it's dark, need make lighter). , different screens have different shadow colors when nav drawer open, it's bug. cannot find, color taken, change it? try this yourdrawerlayout.setscrimcolor(getresources().getcolor(android.r.color.transparent)); and change navigation drawer vertical shadow try this navigationdrawer.setdrawershadow(r.drawable.somedrawable, gravitycompat.start); wiki

c# - KeyEventArgs to Timer.Tick -

i try keyeventargs tick. if thinks why i'm using timer, needs detect keypress outside of window too. i don't have "error" in code, when run program comes: exception unhandled. system.nullreferenceexpetion: (i try translate) 'your object referral can't define object occurrence' now thing i'm using is private void form1_load(object sender, eventargs e) { a.start(); a.interval = 1; } private void a_tick(object sender, eventargs e) { keyeventargs ke = e keyeventargs; if (ke.keycode == keys.r) { test = true; } } i need help, because error has been long time. thanks from looking @ way put question me seems you're trying detect key press using timer. instead can use form's keypress event. use: private void form1_keypress(object sender, keypresseventargs e) {

sql server - Fine-tuning Powershell SQL Script -

my company has program tracks our employee workouts. when had program made, did not think adding ability add or remove employee program. i wrote script in powershell allows easier in ssms. see if can me clean bit , fine tune it. my biggest headache 1 or -1 gets returned anytime execute function. ask if finished, loop or exit. right exits done. <#writes invoker log#> $trandate = get-date $tranuser = $env:username <# variables open connection sql server #> $sqlcn = new-object system.data.sqlclient.sqlconnection $sqlcn.connectionstring = "server=10.10.1.19\vtsworkout;integrated security=true;database=vtsworkout;" <# read user wants #> $input = read-host "do want [a]dd new employee, [r]emove employee or [e]xit?" switch($input){ <# stuff adding employee database #> a{ $eid = read-host "what employees id number?" $fname = read-host "what employees first name?" $lname = read-host "what employees last name?

java - newInstance() | ClassNotFoundException | NoClassDefFounfError -

Image
this question has answer here: what causes , differences between noclassdeffounderror , classnotfoundexception? 15 answers following code, when giving command java test getting error noclassdeffounderror , when give command java test s error classnotfound. as per knowledge if newinstance() used , class not found classnotfound error should com why there difference in errors? class test { public static void main(string[] args) throws exception { system.out.println("in main method"); object o = class.forname(args[0]).newinstance(); system.out.println(o.getclass().getname()); } } class student { } class teacher { } as per knowledge if newinstance() used , class not found classnotfound error should com @callersensitive public static class<?> forname(string classname) throws classnotfoundexception { c

arkit - Cant add new SceneKit Scene File to art.scnassets -

currently using xcode 9 beta 6 , can't seem find way scenekit scene file placed art.scnassets folder. if add new files art.scnassets folder file never gets created. if add new file target folder try , drag art.scnassets folder, automatically makes copy. attempt deleter original deletes both original , copy. how can go creating "scenekit scene file" , have placed art.scnassets folder in xcode 9 beta 6. right click on art.scnassets , select 'open in finder', manually copy items there. worked me. wiki

.htaccess - htaccess rewrite #section to /section -

i have problem htaccess i'm making website youtube creator , improve seo need htaccess rule likes users vists page (that improves google listing) my website contains sections (like <section id="contact"> ) i'm trying /contact rewriting website.com/#contact website.com/contact when try , results in 404 (the requested url /nieuw/contact not found on server.) currently have file called .htaccess (root/nieuw/.htaccess) rewriteengine on options +followsymlinks rewriterule ^/contact$ %{http_host}/#contact [l] i tried without %{http_host} directory structure: -root --nieuw ---index.php sections --oud --.htaccess contains `rewriterule ^(.*)$ nieuw/$1 [l]` (and other stuff isn't relevant question) can tell me wrong , how solve it? wiki

c++ - Creating Graphics Tiles Using QVector(Basics Before QCache) -

i trying upgrade seismic graph viewer use tile graphics rendering. unfamiliar process attempt create simple example below. reason why need use either qvector or qcache(i'm using qvector right simplicity) save ram , tiles needed created on fly. i'm not entirely sure if you're able i'm trying below, creates array of bitmaps, makes them items, , tries add them scene. there twelve errors when program compiles, none of directly refer code made in mainwindow.cpp. the errors either this c:\qt\qt5.9.1\5.9.1\mingw53_32\include\qtcore\qvector.h:713: error: use of deleted function 'qgraphicspixmapitem& qgraphicspixmapitem::operator=(const qgraphicspixmapitem&)' thing changing being location of error (different header files) or this c:\qt\qt5.9.1\5.9.1\mingw53_32\include\qtwidgets\qgraphicsitem.h:861: error: 'qgraphicspixmapitem::qgraphicspixmapitem(const qgraphicspixmapitem&)' private q_disable_copy(qgraphicspixmapitem)

ios - drop down menu on navigation bar -

Image
in android, there action bar drop down menu, example old gmail app in android: as see above, when three-dots clicked, drop down menu shown. my questions: i wondering, if want implement same three-dots button shows drop down menu in ios navigation controller, how it? if not common thing in ios, equivalent in ios? (i still want implement in ios project though) there no built-in ui component in ios, , it's not used in apps. but when need implement use assistolab dropdown , it's easy use, well-documented , stable library. wiki

rebase - git change intermediate commit without changing later one -

this happens me (well, maybe frequently): note : of following happens before push. my software project needs new feature. code , test until works. had had make room new feature, divide changes 2 commits using git add -i : a --- r --- f commit r introduces refactoring changes, f adds code new feature. now realise made mistakes in dividing changes, in f belong r already, , vice versa. so, basically, r messed , doesn't pass tests (whereas final state of f perfect). to fix that, check out r on temporary branch , fix everything. git commit --amend , have a --- r --- f \ \-- r' so missing moving f new branch. far, solution git rebase --onto r-prime r f (i use branch names, see mean). problem it's not want: git understands want move changes between r , f onto r' , giving me commit f' might different f . however, want f' same f , except ancestor. frequently, rebase causes conflicts tricky fix (i.e. error-prone). is there way t

asp.net mvc - How to pass List<string> model property to view javascript array variable? -

this question has answer here: pushing values javascript array returning lots of errors 2 answers i have viewmodel property public list<string> answers { get; set; } how pass values of list array variable? currently have javascript code in view, has error on answers array inside foreach loop. the name answers not exists in current context. <script type="text/javascript"> var answers = []; @foreach(string answer in model.answers) { var ans = @answer; answers.push(ans); } </script> use json.net serializing json. use religiously ! think cleanest way json client. separate api call. retrofitted web api our server-rendered application don't need worry invoking json.net. return c# objects , web api converts them. (not new technology !) shouldn't doing in razor template. wiki

c - How we can iterate cards combinations efficiently? -

there huge number of poker hands possible. decrease removing similar hands can iterate through each individual possible combination. in order so, possible combinations denoted strings of length 52 '0' signifies card not present , '1' signifies card present. so hands of 2,3,4,5,6 of hearts be: '0000000000000000000000000000000000000000000000011111' 2,4,10,a of hearts , 3 of clubs : '0000000000000000000000000000000000000101000100000101' and on... here first 13 bits signify a,k,q,...4,3,2 of spades, next 13 bits diamonds next 13 clubs , last 13 hearts now need is, decimal value of binary string, reduce similar poker hand's binary string , return decimal value so mean when similar hands:- - a,q,7,6,2 of spades = aq762 of clubs = aq762 of hearts = aq762 of diamonds each of binary representation can reduced binary representation of aq762 of hearts, smallest - similarly, hand of 2,3,4,5 of spades , of diamonds equivalent of hearts , 2,3

javascript - internal server error in making a query to populate cascading dropdownlist in ASP MVC -

i have used method in populating cascading dropdownlist use string value in parent dropdown query data populate child dropdown, far i'm not having problems using method until arrived particular controller. the error being returned in debugging internal server error controller mentioned below. previous dropdownlists fine , javascript getting values, when comes passing title gettrainerlist, returns error based on inspection. what i'm trying populate dropdownlist names of trainers skilled in particular subject (referred here "qualification"). controller public actionresult gettrainerlist(string title) //registered trainers { list<trainerregistration> trainerlist = db.trainerregistrations.where(x => x.qualification.title == title) .include(t => t.trainer).include(t => t.qualification) .tolist(); viewbag.traineroptions = new select

PIVOT two columns SQL Server -

i've been trying use pivot feature query how not able find solution. below main table criteria. evaluationid criteria overallrating 1 c1 bad 2 c2 now each criteria has few questions , answers. id evaluationid questiontext ratingtext 1 1 q1 unsatisfactory 2 1 q2 unsatisfactory 3 1 q3 unsatisfactory 4 2 q4 bad 5 2 q5 my desired result below. evaluationid question answer question answer question answer 1 q1 unsati.. q2 unsati.. q3 unsati.. 2 q4 bad q5 null null important aspect here there multiple criteria , number of questions in each criteria can vary. can help? thanks wiki

ios - How to render an object from SVG in UIWebview along JQuery code? -

i loaded svg image uiwebview , want rendering element svg image while on click event on uiwebview. possible ? have tired uitapgesture gives x , y point of uiwebview. want object svg image. this understood question. want add click svg element should trigger event in ios you can make use of called url catching in ios.on click of svg element trigger url , implement these method in code application:handleopenurl: (used earlier ios 4.1) application:openurl:sourceapplication:annotation: (used later ios 4.1) so can catch url being triggered , can perform desired operation. wiki

windows - WinRM cannot process the request. Error 0x80090311 -

i have 2 systems (sr01 & sr02) local administrators account. both systems in same domain. local admin accounts same different password. these machines vm's. when run enter-pssession sr01 sr02 throws below error. error: enter-pssession : connecting remote server sr02.domain.com failed following error message : winrm cannot process request. following error errorcode 0x80090311 occurred while using kerberos authentication: there no logon servers available service logon request. possible causes are: -the user name or password specified invalid. -kerberos used when no authentication method , no user name specified. -kerberos accepts domain user names, not local user names. -the service principal name (spn) remote computer name , port not exist. -the client , remote computers in different domains , there no trust between 2 domains. after checking above issues, try following: -check event viewer events related authentication. -change authentication method; add

asp.net - Unauthorized error in c# while on background thread -

i have created asp.net web application in file needs deleted. below code performs operation perfectly file.delete(path); however when tried operation on background thread this task.run(() => file.delete(path)); then throws exception access path denied. have tried giving iis_iusrs , iusr full access path, still error persists. can explain what's going on here. howcome file getting deleted first code i.e. on main thread, not on background thread. backgroung threads in c# run different identity? the main difference between 2 approaches provided file.delete(path) calls winapi function deletefile immediately, , task.run(() => file.delete(path)) same delay. something can happen during short period of time. e.g. windows search service can open file indexing, antivirus can open file analysis, or other process can (i assume) newly created file. if sure application doesn't reopen file later , doesn't hold file handle anywhere, recommend use multiple

javascript - CSS not recognizing hover color set -

i created filter search list on javascript , nested elements of list under 3 different categories. cuenta nt training on job manual de procedimientos the table works great while looking of these terms , retrieves them instantly. however, list intended grow , want table display color similar 1 on headings when mouse hovers results. the problem this: despite background-color property defined in css sheet, cannot see color displaying while hovering mouse on of results. css #myul li a.1:hover:not(.header) {background-color: #fcf3cf;} function myfunction() { var input, filter, ul, li, a, i; input = document.getelementbyid("myinput"); filter = input.value.touppercase(); ul = document.getelementbyid("myul"); li = ul.getelementsbytagname("li"); for (i = 0; < li.length; i++) { = li[i].getelementsbytagname("a")[0]; if (a.innerhtml.touppercase().indexof(filter) > -1) {

vba - Is there a limit to the number of cells called on in a source range? -

i pieced visual basic code pulls data cells in multiple workbooks , creates master summary workbook. want include large number of cells each workbook, sub stops working if include many cells in source range. first section of code below works fine. if add more cells (second section of code), sub still runs, generates blank workbook. rest of code identical in both cases. there maximum number of cells/ characters can include in command? so, think wouldn't exceed such limit. this code works fine mybook.worksheets(1) set sourcerange = .range("j2, c2, d7, f7, k7, g10, j10, g11, j11, g12, j12," _ & "g14, j14, g15, j15, g16, j16, g17, j17, j21," _ & "j2, d24:e24, g24, i24, j24, o24:s24," _ & "d25:e25, g25, i25, j25, o25:s25," _ & "d30:e30, g30, i30, j30, o30:s30") end this code returns blank worksheet with mybook.w

c# - Visual Studio - Visual Studio cannot start debbuging because the debug target "C:\Users\name\registry\program.exe' is missing -

really sad, because code isn't working.i coding discord bot , @ end - boom.error code - using discord; using discord.commands; using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace superwafflebot { class mybot { discordclient discord; public mybot() { discord = new discordclient(x => { x.loglevel = logseverity.info; x.loghandler = log; }); discord.executeandwait(async () => { await discord.connect("discordbotkey"); }); } private void log(object sender, logmessageeventargs e) { console.writeline(e.message); } } } the other code not working. - using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace superwafflebot

typescript - debuggung source map load issues with visual studio 2017 -

so have been working on angular 1.x app using visual studio , typescript when noticed getting error sourcemap http://localhost:3131/components/bbapp.js.map read failed: unexpected character encountered while parsing value: <. path '', line 0, position 0..'iexplore.exe' (script): loaded 'sourcemap (http://localhost:3131/components/account/account.js)'. trying google error or many versions of hasn't produced useful. question how debug , figure out causing complain when loads? wiki

ember.js - how to watch specified `properties` in `router` and react accordinlgy? -

in app, user setting 6 seperate digits. can delete/re-enter/enter values in input. controller sending values router. when router watches properties, take user next page. question how watch properties ( specified properties ) , react accordingly? here router code ( snippet ): export default ember.route.extend({ otp1:null, otp2:null, otp3:null, otp4:null, otp5:null, otp6:null, mywatcher(){ console.log('all properties available, enable next'); }, setupcontroller(controller,model) { this._super(...arguments); this.controllerfor('auth-page.credit-card.credit-cardno').set('enablenext', false); }, actions:{ setupcardnumber( number, index ){ this.set('opt'+index, number ); //setting values console.log( 'setting', this.get('opt'+index) );//gets property } } } as far understand code, create if-statement : setupcar

logging - 2 VBScripts importing from the same file at the same time -

i have following function use import vbs file: sub import(byval filename) dim fso, sh, file, code set fso = createobject("scripting.filesystemobject") set sh = createobject("wscript.shell") filename = sh.expandenvironmentstrings(filename) filename = fso.getabsolutepathname(filename) set file = fso.opentextfile(filename) code = file.readall file.close executeglobal(code) end sub i use function 2 different scripts: script 1: imports logger vbscript function , executes script 2 like: dim objshell set objshell = wscript.createobject("wscript.shell") objshell.run "script2.vbs "+wscript.arguments(0) script 2: imports logger vbscript same function. when code gets script 2 , wants import logger following error: line: 0 char: 1 error: permission denied code: 800a0046 source: microsoft vbscript runtime error i think happening script 1 locks logger vbscript when imports , script 2 can

Search and Print the selected record VB6 -

how can print selected record? i'm using visual basic 6. after search record, display in form when click print button records print. want print selected record only. note : removed code mistake can me new code. search code :- con.open "provider=microsoft.jet.oledb.4.0;data source=" & app.path & "\accounts.mdb" rs.cursorlocation = aduseclient rs.open "select * accounts id '" & text1.text & "'", con, adopendynamic, adlockoptimistic if rs.eof msgbox "no record found" else text2.text = rs!id text3.text = rs!account text4.text = replace(replace(replace(rs!name, "*", " "), "%", " "), ",", " ") text1.setfocus command2.enabled = true end if con.close insert code :- dim statement string dim ctl control con.open "provider=microsoft.jet.oledb.4.0;data source=" & app.path & "\account

python 3.x - Django 1.11 admin form add search box to oneToOne field -

i have user, admin , employee models, both employee , admin related user model onetoone field in admin form have 1 field "user" instead of having drop down field users have search box when search specific user find him , choose him admin. how? tried add user's fields admin's form couldn't tried inline thing, parent_link in admin's model... couldn't find solution minimise search through long users list adding search box field i have solved type of problem using django-ajax-selects package. hope you. app/admin.py: from ajax_select import register, lookupchannel @register('users') class userslookup(lookupchannel): model = user def get_query(self, q, request): return self.model.objects.filter(username__icontains=q) class employeeadminform(forms.modelform): user = autocompleteselectfield('users', required=false, help_text=none) class meta: model = e