How to run loop check vbs for particular running process? Or missing process?

Uncategorized
Question: I am running the following VBScript (check.vbs):Set service = GetObject ("winmgmts:") For Each Process In Service.InstancesOf("Win32_Process") If Process.Name = "cmd.exe" Then WScript.Echo "cmd running" WScript.Quit End If Next CreateObject("WScript.Shell").Run("C:systemfile.bat") This script will check whether cmd.exe is running or not. If it is running, this script will display a message "cmd running". If it is not running, this script will open a batch file C:systemfile.bat. But what I actually need is: when I run this script check.vbs it needs to keep on checking until it finds that cmd.exe is not running. Only if it found cmd.exe is not running it needs to run file.bat - after repeated checking in background (like any loop program). In simple words, when opening check.vbs the script need to continously check that cmd.exe is running…
Read More

Process json with different data type in Circe

Uncategorized
Question: In my case, there might be different data type of same json field. Example:"need_exp":1500 or "need_exp":"-" How to process this case? I know it can be processed by parse or use custom encoders, but this is a very complex json text, is there any way to solve that without rewriting the whole decoder (for example, just "tell" the decoder to convert all Int to String in need_exp field)? Answer: Read more
Read More

I keep getting “ValueError: list.remove(x): x not in list” when looping through nested lists [duplicate]

Uncategorized
Question: This question already has an answer here:Remove items from a list while iterating 18 answers How to remove list elements in a for loop in Python? [duplicate] 7 answers Python 2.7 throws ValueError: list.remove(x): x not in list 3 answers I am trying to make a simple version of space invaders, I keep running into the same error ValueError: list.remove(x): x not in list trying to remove the invaders once they've been hit. Here is the code. def killEnemies(bullets, enemies):for bullet in bullets:for x in enemies:for y in x:if bullet.top = y.top:if bullet.left >= y.left and bullet.right = y.left and bullet.right = y.left and bullet.right = y.left and bullet.right
Read More

how to update script link in html

Uncategorized
Question: I wash to update script link in index.html of dist file directory, but this code can't update script link? how to update it? thanks ! use this link to download my project -- clickthis var jsSrc = ['js/jquery-1.9.0.min.js','js/customer.js']; gulp.task('default', function() { gulp.start('clean','minifyjs','revCollector'); }); gulp.task('clean', function(cb) { del(['minified/css', 'minified/js','rev/js','dist/'], cb) }); gulp.task('minifyjs', function() { return gulp.src(jsSrc) .pipe(concat('main.js')) .pipe(gulp.dest('dist/js')) .pipe(rename({suffix: '.min'})) .pipe(uglify()) .pipe(rev()) .pipe(gulp.dest('dist/js')) .pipe(rev.manifest()) .pipe(gulp.dest('dist/js')); }); gulp.task('revCollector', function() { return gulp.src(['dist/js/*.json','index.html']) .pipe(revCollector({ replaceReved: true })) .pipe(gulp.dest('dist/')); }); Answer: change html file script link same to rev-manifest.json key .it worker ! Read more
Read More

OnHistoryStateUpdated filter not working as expected

javascript
Question: I'm working on a Firefox add-on where I would like to add a pageAction when you are watching a video in YouTube. My background script works well until you go from a YouTube video to any other YouTube page, the pageAction doesn't disappear. This is my code:var filter = { url:[ { pathContains: "watch", hostSuffix: "youtube.com" } ] } function showPageAction(details) { browser.pageAction.show(details.tabId); } browser.webNavigation.onCommitted.addListener(showPageAction, filter); browser.webNavigation.onHistoryStateUpdated.addListener(showPageAction, filter); It just happens the first time you press any other YouTube link from a YouTube video page (history, main, channel, etc), because when you go to another YouTube page from that first click, it disappears. Something like:Open new tab Go directly to www.youtube.com (doesn´t appear) Press any video (it appears, as expected) Press any other link to a YouTube page (main,…
Read More

How to get value from contentEditable in reactjs

javascript
Question: I'm fairly new to ReactJS. I am looking to get the value inside a when contentEditable is set to true. const listResults = this.state.results['1'].map((result) => {result} ); return ( listResults {listResults} ) I am currently outputting a list into pre-filled text-boxes which allows the user to edit them. I am looking to add in a button which once clicked captures the data inside all of the text-boxes. Can anyone point me in a direction on how to capture the changed data. It may also be worth noting I am using ReactJS on the client side through a CDN. Answer: To get value of editable div:class App extends React.Component { change = (e) => { console.log(e.target.textContent); } render(){ return ( test ); } } https://codesandbox.io/s/m4xlxwnpz9 One note, you can't return…
Read More

Getting simple web project running with Fabric React

node.js
Question: As a newcomer to React / node I want to create a test application in Visual Studio 2017 using Fabric React (Fabric since I want to adopt the Office look and feel). By now I've spent countless of hours figuring out how to get this to work, and encountering problem after problem (e.g. creating package.json, installing Gulp, etc.) There are many tutorials on this topic but all of them seem to be a bit scattered or just on 1 of the dependencies. To start with:I want to build a web application - very simple / basic, for test purposes, and just use some of the Fabric UI components. I am creating this web project in Visual Studio 2017 as a ASP.NET Core Web Application (.NET Core) My Visual Studio…
Read More

ES File Explorer, logger logs Facebook Native Ads

Uncategorized
Question: Recently update Facebook dependency gradle version to 4.25.0 as compile 'com.facebook.android:facebook-android-sdk:4.25.0' compile 'com.facebook.android:audience-network-sdk:4.25.0' Now ES File explorer's logger log the ads when Native Ads is being display which is irritating. Note : I am also using Google Native Express Ads but it is not logging. To be more Clear : ES File Explorer App having logger facility to show bubble at top of others app while media downloaded by Apps.Now I am using both Facebook Native ads and AdMob's NativeExpress Ads to show ads in my App.When Facebook NativeAds is being displayed, Logger appears top of the application and showing recent media downloaded. It is not happening with Admob Ads. Screenshot : Note : It was not as issue while using dependency version 4.10.1 but I have to update…
Read More

Error with Syntax Angular 4 app

Uncategorized
Question: I am getting a weird error regarding syntax when I see the console log in chrome, it's regarding a line that uses $event.target. If I take this out, the error goes away. Not sure why I can't use $event.target in this button. You will find my code for the HTML, JS/TypeScript, and Error log in attachments. Answer: Why are you passing $event.target to a method where you end up looking up the element with jquery? Also element is not a string, it's an object. I would go about it this way: That will pass a reference to the button as an ElementRef - that holds a reference to the underlying dom element with .nativeElement addToList(button: ElementRef) { // You can still do imperative stuff here if you like:button.nativeElement.parentElement.children(... //…
Read More

Super Coach – A Clean WordPress Theme For Coaches And Trainers

Uncategorized
Super Coach was created by taking aim at all departments of business sector and by strengthening it with hundreds of features. All parts that come together with the theme are compatible with WordPress shortcode and Visual Composer structure. Therefore, we can promise that you will not come across with any surprises while building any page that you imagine. All pages of the theme are built with the shortcodes which include hundreds of properties and you can easily build as many different pages as you like.
Read More