\n\nSome Css:\nbody {\n margin: 0 auto;\n text-align: center;\n}\n\n.wrapper {\n text-align: center;\n}\n\n#open-modal-button {\n position: absolute;\n top: 30%;\n}\n\nJust be sure tu put a conditional statement before the carousel in order to validates the presence of the images.\nNote: Just use bootstrap.js and bootstrap.css"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17201,"cells":{"_id":{"kind":"string","value":"d17202"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"As hinted out by Naveh, It works those functions are present only in MATLAB 2014 version and not in older versions. \nOlder versions do not have that example as well when I try to open edit TextDetectionExample\n\nA: This example first appears in release R2014a. helperGrowEdges is a helper function, which goes with the example. Unfortunately it does not get published in the documentation. The only way for you to see it is to get access to an installation of MATLAB R2014a with the Computer Vision System Toolbox, and do edit helperGrowEdges."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17202,"cells":{"_id":{"kind":"string","value":"d17203"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"You don't need 4 conditions and need to have them ANDed together:\nRewriteEngine on\nRewriteBase /amit/public/\n\nRewriteCond %{ENV:REDIRECT_STATUS} ^$\nRewriteCond %{REQUEST_FILENAME} !-l\nRewriteCond ${REQUEST_FILENAME} !-d\nRewriteRule ^(.+?)/?$ $1.php [L]\n\n\nA: Thanks to @anubhava. I've just realized that my code uses $ for all the server variables. It should be %. A silly typo had hacked my brain for close to 24 hours... So the 'ultimate' code with the suggestions made by @anubhava would be:\nOptions +FollowSymlinks\nRewriteEngine on\n\nRewriteBase /amit/public/\n\nRewriteCond %{ENV:REDIRECT_STATUS} ^$\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteCond %{REQUEST_FILENAME} !-s\nRewriteCond %{REQUEST_FILENAME} !-l\nRewriteRule ^(.*[^/])/?$ $1.php [NC,L]\n\nWorks like a charm."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17203,"cells":{"_id":{"kind":"string","value":"d17204"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"i too came up with the same issue. seems like android studio seeking to update the kotlin plugin as well.\ngo to Tools > Kotlin > Configure Kotlin Plugin Update and update the plugin.\nthen restart studio, and it will sync the gradle on restart.\n\nA: I found the answer. I changed the versions of gradle plugins.I am adding my Gradle files below\nProject Level\n// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n repositories {\n jcenter()\n maven {\n url 'https://maven.google.com/'\n name 'Google'\n }\n }\n dependencies {\n classpath 'com.android.tools.build:gradle:3.1.0'\n classpath 'com.google.gms:google-services:3.1.1'\n classpath 'com.loopj.android:android-async-http:1.4.9'\n\n // NOTE: Do not place your application dependencies here; they belong\n // in the individual module build.gradle files\n }\n}\n\nallprojects {\n repositories {\n jcenter()\n }\n}\n\ntask clean(type: Delete) {\n delete rootProject.buildDir\n}\n\nApp Level build.gradle file\napply plugin: 'com.android.application'\napply plugin: 'io.fabric'\napply plugin: 'com.google.gms.google-services'\n\nbuildscript {\n repositories {\n maven { url 'https://maven.fabric.io/public' }\n }\n\n dependencies {\n classpath 'io.fabric.tools:gradle:1.+'\n }\n}\n\nbuildscript {\n repositories {\n jcenter()\n google()\n }\n dependencies {\n classpath 'com.android.tools.build:gradle:3.0.1'\n }\n}\n\nandroid {\n compileSdkVersion 25\n buildToolsVersion '26.0.2'\n lintOptions {\n disable 'InvalidPackage'\n }\n defaultConfig {\n applicationId 'app.ecopon.com'\n minSdkVersion 15\n targetSdkVersion 25\n versionCode 33\n versionName \"1.1.30\"\n useLibrary 'org.apache.http.legacy'\n // Enabling multidex support.\n multiDexEnabled true\n vectorDrawables.useSupportLibrary = true\n }\n dexOptions {\n preDexLibraries = false\n }\n buildTypes {\n release {\n minifyEnabled false\n proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n }\n }\n productFlavors {\n }\n lintOptions {\n checkReleaseBuilds false\n }\n\n packagingOptions {\n exclude 'META-INF/DEPENDENCIES'\n exclude 'META-INF/NOTICE'\n exclude 'META-INF/LICENSE'\n }\n}\nrepositories {\n mavenCentral()\n jcenter()\n\n maven { url 'https://maven.fabric.io/public'\n\n }\n\n maven {\n url 'https://maven.google.com/'\n name 'Google'\n }\n}\n\ndependencies {\n compile fileTree(dir: 'libs', include: ['*.jar'])\n\n\n compile project(':android-async-http-1.4.9')\n\n // compile 'com.daimajia.androidanimations:library:1.0.3@aar'\n compile project(':PayTabs_SDK_NOSCAN')\n compile('com.twitter.sdk.android:twitter:1.14.1@aar') {\n transitive = true;\n }\n compile('org.apache.httpcomponents:httpmime:4.3') {\n exclude module: \"httpclient\"\n }\n compile files('libs/signpost-core-1.2.1.2.jar')\n // Discovery and Outlook services\n compile('com.microsoft.services:discovery-services:1.0.0@aar') {\n transitive = true\n }\n compile('com.microsoft.services:outlook-services:1.0.0@aar') {\n transitive = true\n }\n\n compile 'org.sufficientlysecure:html-textview:3.3'\n compile 'com.android.support:appcompat-v7:25.3.1'\n compile 'com.android.support:design:25.3.1'\n compile 'com.android.support:support-v4:25.3.1'\n compile 'cz.msebera.android:httpclient:4.3.6'\n compile 'com.squareup.picasso:picasso:2.5.2'\n compile 'com.nineoldandroids:library:2.4.0'\n compile 'com.daimajia.slider:library:1.1.5@aar'\n compile 'me.dm7.barcodescanner:zxing:1.8.4'\n compile 'com.google.android.gms:play-services:9.0.0'\n compile 'com.android.support:multidex:1.0.1'\n compile 'com.google.gms:google-services:3.0.0'\n compile 'com.google.android.gms:play-services-ads:9.0.0'\n compile 'com.google.android.gms:play-services-auth:9.0.0'\n compile 'com.google.android.gms:play-services-gcm:9.0.0'\n compile 'org.codepond:wizardroid:1.3.1'\n compile 'com.facebook.android:facebook-android-sdk:4.0.0'\n compile 'com.google.code.gson:gson:2.3.1'\n compile 'com.google.zxing:core:3.2.0'\n compile 'io.card:android-sdk:5.3.0'\n compile 'com.google.firebase:firebase-messaging:9.0.0'\n compile 'com.mcxiaoke.volley:library-aar:1.0.0'\n compile 'me.dm7.barcodescanner:zbar:1.8.2'\n compile 'com.journeyapps:zxing-android-embedded:3.0.2@aar'\n compile 'de.hdodenhof:circleimageview:2.0.0'\n compile 'com.cloudrail:cloudrail-si-android:2.11.0'\n compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'\n compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'\n compile 'com.android.support.constraint:constraint-layout:1.0.2'\n compile 'com.android.support:recyclerview-v7:25.3.1'\n compile 'com.ss.bannerslider:bannerslider:1.8.0'\n compile 'com.marshalchen.ultimaterecyclerview:library:0.7.3'\n\n compile 'com.github.barteksc:android-pdf-viewer:2.8.2'\n\n\n testCompile 'junit:junit:4.12'\n}\nconfigurations.all {\n resolutionStrategy.eachDependency { DependencyResolveDetails details ->\n def requested = details.requested\n if (requested.group == 'com.android.support') {\n if (!requested.name.startsWith(\"multidex\")) {\n details.useVersion '25.3.1'\n }\n }\n }\n}\n\nNow, everything is working perfectly\n\nA: Found a solution to this. You need to add google() to the buildscript and allprojects repository section as below:\nbuildscript {\n repositories {\n google()\n jcenter()\n }\n dependencies {\n classpath 'com.android.tools.build:gradle:3.1.1'\n\n // NOTE: Do not place your application dependencies here; they belong\n // in the individual module build.gradle files\n }\n}\n\nallprojects {\n repositories {\n google()\n jcenter()\n }\n}\n\n\nA: 1- Go to http://services.gradle.org\n2- Go to Distributions\n3- Click on the latest one to download it (I downloaded \"gradle-4.6-rc-2-all.zip\")\n4- Unzip or Extract it\n5- In Android Studio go to File > Settings > Build, Execution, Deployment > Gradle > Use local gradle distribution > then choose the file (that you just download and unzip it) from your computer\n6- Click Ok\n7- Inside \"build.gradle(Module:app)\" make sure that compileSdkVersion and targetSdkVersion are same \n8- Click Sync Now\nResource: https://www.youtube.com/watch?v=q_qWUQNbFLY\n\nA: Change your Buildscript part of your build.gradle To this , Actully Remove google() & jcenter(). This Worked for me. \nbuildscript {\n\nrepositories {\n maven { url 'https://jitpack.io' }\n mavenCentral()\n maven { url \"https://maven.google.com\" }\n}\n\n\ndependencies {\n classpath 'com.android.tools.build:gradle:3.1.0'\n}\n}\n\n\nA: You could try updating your Kotlin version and maybe add https://maven.google.com to the repositories tag of allProjects. \nYour project level build.gradle should look something like this afterwards:\n// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n ext.kotlin_version = '1.2.30'\n repositories {\n jcenter()\n google()\n }\n dependencies {\n classpath 'com.android.tools.build:gradle:3.1.0'\n classpath 'com.google.gms:google-services:3.1.0'\n classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n classpath 'com.loopj.android:android-async-http:1.4.9'\n }\n}\n\nallprojects {\n repositories {\n jcenter()\n maven { url 'https://jitpack.io' }\n maven { url \"https://maven.google.com\" }\n }\n}\n\ntask clean(type: Delete) {\n delete rootProject.buildDir\n}\n\nBesides that, try cleaning the project and maybe removing your .gradle folders manually \n\nA: Try to invalidate cache(did it a few times) or reinstall studio, or check gradle-wrapper.properties distributionUrl should be like this:\ndistributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17204,"cells":{"_id":{"kind":"string","value":"d17205"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I figured it out. I was confused between the development.key and the config/credentials/development.yml.enc. The latter is the encrypted credential file."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17205,"cells":{"_id":{"kind":"string","value":"d17206"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Just download it to ${basedir}/target/classes before packaging phase. You don't need it to be in sources in order to include it to JAR.\n\nA: Solved!\nI changed the phase to process-resources..\n \n org.apache.maven.plugins\n maven-antrun-plugin\n \n \n download-files\n process-sources\n \n run\n \n \n \n \n \n \n \n \n "},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17206,"cells":{"_id":{"kind":"string","value":"d17207"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I have a solution for the question that i have posted. Try starting the Spring XD single node too. Then you won't face any stream creation failure. Status will be in deployed (when we try create stream to fetch mysql data for example). But stream creation will be in failed, if we are pointing to gemfire. I am looking into it."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17207,"cells":{"_id":{"kind":"string","value":"d17208"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"The \"special file\" mentioned by Walter White is:\nMETA-INF/services/javax.enterprise.inject.spi.Extension\nThat file should contain the fully-qualified name of your Extension class.\nie:\norg.mydomain.extension.MyExtension\n\n\nA: Thanks to Pete Muir, the solution was to implement the Extension interface. Once I did that, along with creating a special file, it worked perfectly.\nThe thing to remember is, if you want to observe (or act on) container events, you must implement the extension interface as it is a special event.\nhttps://docs.jboss.org/weld/reference/latest/en-US/html/extend.html#d0e4984\nWalter"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17208,"cells":{"_id":{"kind":"string","value":"d17209"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Are you debugging using \"Attach to Process\"?\nFirst determine the w3wp.exe process:\nFor IIS6\n\n\n*\n\n*Start > Run > Cmd \n\n*Go To Windows > System32 \n\n*Run cscript iisapp.vbs \n\n*You will get the list of Running\nWorker ProcessID and the Application\nPool Name.\n\n\nFor IIS7\n\n\n*\n\n*Start > Run > Cmd\n\n*Go To Windows > System32 > Inetsrv\n\n*Run appcmd list wp\nNote the Process ID (PID).\nNext in Visual Studio: \n\n\n*\n\n*Debug > Attach to Process...\n\n*Find the w3wp.exe with the right PID and attach\n\n\nYour breakpoints should work."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17209,"cells":{"_id":{"kind":"string","value":"d17210"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"collinksmith did answer your question but didn't explain that you cannot change the colour of a .svg file with CSS. You need to add the SVG inline then you can apply CSS to it.\n\nA: You need to use the fill property of the svg's path. Assuming an svg html element, with a class set on the svg element itself:\n.class-name path {\n fill: red;\n}\n\nEDIT Here's an example: https://jsfiddle.net/4447zb7o/\nEDIT 2 To set the css inline, change the style attribute of the path element inside the svg:\n"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17210,"cells":{"_id":{"kind":"string","value":"d17211"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Like a two-factor (TOTP) code, but based on your GUID instead of a timestamp?\n// userData should be populated with whatever immutable user data you want\n// applicationSecret should be a constant\npublic string ComputeCode(byte[] userData, byte[] applicationSecret, int length)\n{\n using var hashAlgorithm = new HMACSHA256(applicationSecret);\n var hash = hashAlgorithm.ComputeHash(userData);\n return BitConverter.ToString(hash).Replace(\"-\", \"\").Substring(0, length);\n}\n\n\nA: I can't speak to the EF-related aspects of your question, but I recently had to figure out a way to generate unique, user-friendly IDs for a personal project.\nWhat I eventually settled on was the following:\n\n*\n\n*Start with a 32-bit integer. (In my case it was an incrementing database ID.)\n\n*\"Encrypt\" the integer using RC5 with a block size of 32 bits. This scrambles the key space. You'll probably have to write your own RC5 implementation, but it's a simple algorithm. (Mine was <100 lines of python.)\n\n*Encode the resulting 4 bytes in Base32. I recommend z-base-32 for the most user-friendly alphabet. You might have to write your own Base32 implementation, but again, it's quite simple.\n\nThis algorithm produces a reversible mapping similar to the following:\n1 <-> \"4zm5cna\"\n2 <-> \"5ytgepe\"\n3 <-> \"e94rs4e\"\netc."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17211,"cells":{"_id":{"kind":"string","value":"d17212"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"The solution is to maintain a persistent connection.\nYou want to open a table that is very small (maybe just one record) and keep that open. Then everything else responds quickly.\nYou can also open a form that has a small table as its recordset, as long as it keep the connection open/persistent."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17212,"cells":{"_id":{"kind":"string","value":"d17213"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Based on the code in my answer to your previous question\nYou can simply create an array of arrays and put each array into its own section in the collection view:\nstruct City {\n var name: String\n var imageName: String\n }\nclass firstViewController: UIViewController // Or UICollectionViewController \n\nlet cities = [City(name:\"City00\", imageName:\"city_00\"),\n City(name:\"City01\", imageName:\"city_01\"),\n City(name:\"City02\", imageName:\"city_02\")]\n\nlet towns = [City(name:\"Town00\", imageName:\"town_00\"),\n City(name:\"Town01\", imageName:\"town_01\"),\n City(name:\"Town02\", imageName:\"town_02\")]\n\nlet villages = [City(name:\"Village00\", imageName:\"village_00\"),\n City(name:\"Village01\", imageName:\"village_01\"),\n City(name:\"Village02\", imageName:\"village_02\")]\n\nlet allPlaces = [cities, towns, villages]\n\nfunc numberOfSections(in collectionView: UICollectionView) -> Int {\n return self.allPlaces.count\n}\n\nfunc collectionView(_ collectionView: UICollectionView, \n numberOfItemsInSection section: Int) -> Int {\n let places = self.allPlaces[section]\n return places.count\n}\n\nfunc collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell{\n let cell = collectionView.dequeueReusableCell(withReuseIdentifier: \"cell\", for: indexPath)\n as! CollectionViewCell\n\n let places = self.allCities[indexPath.section]\n\n let city = places[indexPath.item]\n\n cell.imageView?.image = UIImage(named:city.imageName)\n\n return cell\n}\n\n\noverride func prepare(for segue: UIStoryboardSegue, sender: Any?) {\n if segue.identifier == \"showOptions\" {\n if let indexPaths = self.collectionView!.indexPathsForSelectedItems {\n if let cityVC = segue.destination as? CitySelectViewController {\n var selectedCities = [City]()\n for indexPath in indexPaths {\n let places = self.allPlaces[indexPath.section]\n selectedCities.append(places[indexPath.item])\n }\n cityVC.selectedCities = selectedCities\n }\n }\n }\n}\n\n\nA: first of all your selectedImage is never filled (or at least in the code you provide) so its always an empty dictionary. secondly why you downcast IndexPath to NSIndexpath in cellForItemAt?\ncell.imageView?.image = imageSelected[(indexPath as NSIndexPath).row]\n\nalso your dictionary is type of [String : UIImage] and you're treating it as [Int : UIImage].\nalso when you are going to use indexpath you can use array instead of [Int, UIImage]."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17213,"cells":{"_id":{"kind":"string","value":"d17214"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"probably in this line of code\nthis.products.remove(this.products.get(rowIndex)\n\nrowIndex return null or zero value because check and debug this line my friend\n\nA: The code I posted if fine and it works. The problem was due to a shadow reference -that is I was having two instances of my table.This answers why I was getting -1 when calling getSelectedRow()-the possible reason to my question why I was having this value yet I was adding rows to my table.In simple terms - I was adding rows to myTable1OnTheScreenand calling deleteSelectedRow()on myTable2ThatHasNoRowsAddedToIt hence, getSelectedRow()would return -1 because it was refering to myTable2ThatHasNoRowsAddedToIt."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17214,"cells":{"_id":{"kind":"string","value":"d17215"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"select R.ReportID,\n D.V as DateString\nfrom #ReportSpecs as R\n cross apply (select cast(R.ReportSpec as xml)) as X(R)\n cross apply X.R.nodes('//@*, //*/text()') as T(X)\n cross apply (select T.X.value('.', 'varchar(max)')) as D(V)\nwhere charindex('/20', D.V) > 0\n\nResult:\nReportID DateString\n----------- --------------------------\n136 8/16/2002\n136 8/23/2002\n136 8/16/2002\n136 8/23/2002\n311 3/25/2002\n311 4/4/2002\n311 3/25/2002\n311 4/4/2002\n1131 \" CREATEDATE=\"12/7/2009\">"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17215,"cells":{"_id":{"kind":"string","value":"d17216"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"It works if you add it to the children of properties rather than the property node-list. Ie change:\nsite.properties.property.add( 0, newNode )\n\nTo\nsite.properties[0].children().add( 0, newNode )"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17216,"cells":{"_id":{"kind":"string","value":"d17217"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Just use pool.banks in the iteration of your view. Your controller is wrong because you try to find banks of multiple pools.\n <% @pools.each do |pool| %>\n
<%= pool.name %>
\n
\n <% pool.banks.each do |bank| %>\n <%= bank.name %>\n <% end %>\n
\n <% end %>"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17217,"cells":{"_id":{"kind":"string","value":"d17218"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Create date object:\nvar currentdate = new Date(\"01-\"+currentmonth)\n\nSet last day of month using setFullYear, getFullYear and getMonth methods:\ncurrentdate.setFullYear(test.getFullYear(), test.getMonth()+1, 0)"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17218,"cells":{"_id":{"kind":"string","value":"d17219"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"The behaviour you describe, using a pl/sql process which references a page item from another page will work fine, but there are some things to take into account. Not sure if this list is exhaustive, others might comment:\n\n*\n\n*Personally I try to avoid references to items on other pages within a page, because that makes developing harder - when working on page x, you'll usually search for item occurences within page only . If there are occurences on other pages the application becomes less clean. I try to follow this as a best practice. The cleaner the app, the easier to maintain. When you have to work in this app 2 years from now, you won't remember that P1_SOME_VALUE is referenced on page 2. Or that other developer who works on it will hate you forever ;)\n\n*This can possibly make debugging a lot harder. Suppose page is accessed via a url or branch that has the option \"clear cache for pages\" set to \"page 1\", then the value of P1_SOME_VALUE will be cleared because that item is defined on page 1. Debugging this issue will be a challenge.\n\n*Passing a value in a url is very secure. If you use checksums, there is no way for a user to manipulate the value of the page item manually.\n\n*Note that the DOM of the page only contains the page items that are defined on that page. This implies that you cannot use javascript on page 2 that references P1_SOME_VALUE or set the value of P1_SOME_VALUE using javascript on page 2. This doesn't matter in your use case.\n\nAn alternative to referencing page items in another page than the page they belong to is storing the data in a collection - that will exist for the duration of the session."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17219,"cells":{"_id":{"kind":"string","value":"d17220"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Maybe try to use in_array() method \nphp.net in_array()\n\nA: Try to use references like this:\n$rank0 =& $hand[0]['rank'];\n$rank1 =& $hand[1]['rank'];\n\nif (\n($rank0 == \"A\" && $rank1 == \"A\")\n|| (...)\n\nJust, as the first step to code minimization"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17220,"cells":{"_id":{"kind":"string","value":"d17221"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":": is same as slice(None, None, None)\nA[0, -1, :] is same as\nobj = (0, -1, slice(None, None, None))\nA[obj]"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17221,"cells":{"_id":{"kind":"string","value":"d17222"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I created a sample progress bar with Bootstrap, jQuery & momentjs. Hope this will help you. \n\n\n$(document).ready(function(){\r\n var start = moment('2020-02-21 05:38:33');\r\n var end = moment('2020-02-21 20:00:00');\r\n var formattedPercentage = 0;\r\n \r\n var interval = setInterval(function(){\r\n var now = moment();\r\n var percentage = now.diff(start) / end.diff(start) * 100;\r\n\r\n if (percentage > 100) {\r\n formattedPercentage = 100;\r\n clearInterval(interval);\r\n } else {\r\n formattedPercentage = percentage.toFixed(2);\r\n }\r\n // Use formattedPercentage as you need\r\n $('#example-progress-bar .progress-bar').width(formattedPercentage+'%').html(formattedPercentage+'%')\r\n\r\n }, 500);\r\n});\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n \r\n
"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17222,"cells":{"_id":{"kind":"string","value":"d17223"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Short answer: it's not possible to do what you're asking for, as array keys must be unique.\nI would suggest, during your combining logic, to create an array of AssesmentQuestions and AssesmentAnswers, e.g.:\nArray\n(\n [0] => Array\n (\n [id] => 1,\n [AssesmentQuestions] => Array\n (\n [0] => 1,\n [1] => 2\n ),\n [AssesmentAnswers] => Array\n (\n [0] => 0,\n [1] => 2\n )\n )\n)\n\n\nA: You can use foreach loop to achieve this :\n$main_arr = array\n(\n array\n (\n 'AssessmentQuestion' => 1,\n 'AssessmentAnswer' => 0,\n 'id' => 1\n ),\n array\n (\n 'AssessmentQuestion' => 2,\n 'AssessmentAnswer' => 2,\n 'id'=> 1\n ),\n array\n (\n 'AssessmentQuestion' => 3,\n 'AssessmentAnswer' => 4,\n 'id' => 2\n ),\n array\n (\n 'AssessmentQuestion' => 5,\n 'AssessmentAnswer' => 6,\n 'id'=> 1\n )\n);\n\nforeach ($main_arr as $arr) {\n $new_arr[$arr['id']]['id'] = $arr['id'];\n $new_arr[$arr['id']]['AssessmentQuestions'][] = $arr['AssessmentQuestion'];\n $new_arr[$arr['id']]['AssessmentAnswers'][] = $arr['AssessmentAnswer'];\n}\nvar_dump($new_arr);"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17223,"cells":{"_id":{"kind":"string","value":"d17224"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Possible explanations:\n\n\n*\n\n*You have your warning level turned right down.\n\n*You're using precompiled headers that are including the right files.\n\n\nA: The declaration of your tolower() is in fact included. It could be so in one of the following ways:\n\n\n*\n\n* or is included in one of the headers (even standard headers) that you have included. The standard does not forbid standard headers to include other standard headers\n\n*one of the headers you have included has the declaration of that funciton. For example, could have int tolower(int); somewhere in its code.\nYou cannot forbid this behavior. What you can do is learn where the function has to be defined/declared and never rely on inclusion of that header by other headers. You know where tolower is declared, so do include every time you use this function."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17224,"cells":{"_id":{"kind":"string","value":"d17225"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"You can find all leds of your device under\n/sys/class/leds/\n\nIn my case, I have the following leds\namber\nbutton-backlight\nflashlight\ngreen\nlcd-backlight\n\nIf I have a look inside \"green\", I see\n> cd green\n> ls\nblink\nbrightness\ncurrents\ndevice\nlut_coefficient\nmax_brightness\noff_timer\npower\npwm_coefficient\nsubsystem\ntrigger\nuevent\n\nThese files are interfaces to the kernel module, which controls leds. In this case, I think they are char-devices. You can use the command \"echo\" and \"cat\" to communicate with the kernel module. Here an example.. \necho 1 > brightness # Turn on led\necho 0 > brightness # Turn off led\n\nFor implementing a \"heartbeat\" pulse as you mentioned, I would have a look into \"blink\". If you not want to perform reverse engineering, this could be a good entry point to check what happens in the kernel leds-gpio.c"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17225,"cells":{"_id":{"kind":"string","value":"d17226"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"mainloop() should be called on a tk.Tk object but in your code app is a tk.Frame object. So, try ...\nroot.mainloop()"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17226,"cells":{"_id":{"kind":"string","value":"d17227"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"As the error is indicating, you need to transform your array from 3-d to a 2-d. You can do this by using thereshape function passing the total amount of pixels to one axis (430*430).\nnp.random.seed(42)\nfour_img_concat = np.random.randint(0,255,size=(430,430,3))\nprint(four_img_concat.shape) # (430, 430, 3)\n\nfour_img_concat = np.reshape(four_img_concat, (430*430, -1))\nprint(four_img_concat.shape) # (184900, 3)\n\nans = np.array(four_img_concat)\nheaders = np.array(['r','g','b'])\n\ndf = pd.DataFrame(ans)\ndf.to_csv(\"answ.csv\",index=False,header=headers)\n\nansw.csv file\nr,g,b\n102,179,92\n14,106,71\n188,20,102\n121,210,214\n74,202,87\n...\n..."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17227,"cells":{"_id":{"kind":"string","value":"d17228"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Their is one easiest way to develop multi language app by using string file. only you need to make different string file for each languages and then use NSLocalizedString to use current language. For Ex:\nUIlabel *label;\nlabel.text= NSLocalizedString(@\"Key\", nil);\nand in Localizable.strings (english) string file it will be defined as\n\"Key\"=\"English Name\";\nand in Localizable.strings (german) string file it will be defined as\n\"Key\"=\"german Name\";\nIt will automatically set the value of current language on uilabel from device.\nAnd you can localize the xib directly , it will create different xib for each language and set the text accordingly."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17228,"cells":{"_id":{"kind":"string","value":"d17229"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"If you really want to have it working on all devices, I suggest you this approach:\n\n\n*\n\n*Set up Firebase messaging\n\n*Subscribe all devices to specific topic e.g. \"UPDATE_LOCATION\"\n\n*Extend FirebaseMessagingService and implement onMessageReceive()\n\n*If your data message contains instruction to update location, call the method to update location from onMessageReceive()\n\n*Trigger recurring messages to \"UPDATE_LOCATION\" topic from Firebase (CRON job or scheduled tasks)\n\n\nIt's a little more work that methods you have already tried, but it works on all phones and also after device restart and system update.\nAdditional plus is that you have control over the location updater from your backend (not per device which relies on app update)."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17229,"cells":{"_id":{"kind":"string","value":"d17230"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Since it's a GET request, this should work:\nvar busqueda = document.getElementById('search_keywords').value;\n\nxmlhttp.open(\"GET\",\"{{ path('searchCorreos', {'page': thisPage}) }}&search=\" + busqueda,true); \nxmlhttp.send();\n\n\nA: If you run into this problem more often (needing to append javascript variables to symfony generated paths/urls) you can make use of the FOSJsRoutingBundle: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle\nThis allows you to do the following in your javascript source:\nvar busqueda = document.getElementById('search_keywords').value;\nvar path = Routing.generate('searchCorreos', { page: 'thisPage', search: busqueda });\n\nxmlhttp.open(\"GET\", path, true);\nxmlhttp.send();"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17230,"cells":{"_id":{"kind":"string","value":"d17231"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Group coordinator Unavailability is the main cause of this issue. \nGroup coordinator is Unavailable --\n This issue is already raised in the KAFKA Community (KAFKA-7017).\n You can fix this by deleting the topic _offset_topics and restart the cluster.\nYou can go through the following to get few more details.\nhttps://www.stuckintheloop.com/posts/my_first_kafka_outage/\n\nA: @Rohit Yadav, Thanks for the answer, I have replaced a consumer group for the time being and I am working very well. But now the client has another problem, continuous output:\n2019-11-05 14:11:14.892 INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-1, groupId=fs-sales-be] Error sending fetch request (sessionId=2035993355, epoch=1) to node 4: org.apache.kafka.common.errors.DisconnectException.\n2019-11-05 14:11:14.892 INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-1, groupId=fs-sales-be] Error sending fetch request (sessionId=181175071, epoch=INITIAL) to node 5: org.apache.kafka.common.errors.DisconnectException.\n\nWhat is this caused by this? 4, 5 node status is OK"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17231,"cells":{"_id":{"kind":"string","value":"d17232"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I suspect you haven't used the enum anywhere in the contract. Unless you have, there is no reason that it would be included in the graph that it builds by walking members from the root contract type. It will not be included just because it is nested: it needs to be actually used somewhere."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17232,"cells":{"_id":{"kind":"string","value":"d17233"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Try changing in your routes.rb file to this:\nauthenticate :user do\n mount Sidekiq::Web, at: \"/sidekiq\"\nend\n\nAlso notice that :user refers to your app user model. If your user model has another name, let's say :admin, you should replace :user to :admin in the snipped code above.\n\nA: try this inside of your routes:\nSidekiq::Web.use Rack::Auth::Basic do |username, password|\n username == USERNAME && password == PASSWORD\nend if Rails.env.production?\n\nmount Sidekiq::Web, at: \"/sidekiq\""},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17233,"cells":{"_id":{"kind":"string","value":"d17234"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"We figured out what went wrong and how to fix it. \nFirst off, since the app is sandboxed it's technically impossible that we caused this with our code. However, according to a user, there was a plist file (named after our app) in the LauchAgents directory that caused the restarting of our app. After deleting that file, everything was fine again. As to why this entry existed in the first place and how it got there: ¯\\ _(ツ)_/¯\nHope this helps anyone who has the same problem.\n\nA: We haven't seen this exact issue, but something similar where we overrode the - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender method.\nAnd in certain circumstances we were returning NSTerminateLater or 'NSTerminateCancelinstead ofNSTerminateNow`. In turn, the application would continue running even after the user told us to quit."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17234,"cells":{"_id":{"kind":"string","value":"d17235"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"You have to use aggregation framework.\nCheck this:\ndb.mongo.aggregate(\n { $unwind: '$scores' },\n { $match: {\n 'scores.categoryList': 'Bar'\n }},\n { $sort: {\n 'scores.weight': -1\n }}\n)"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17235,"cells":{"_id":{"kind":"string","value":"d17236"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"That exception is lost in ActiveMQ at the moment (don't know about Mule) but it is reported to the log as error. \nIt would make a good enhancement, remembering the string form of the exception in the ActiveMQConsumer and passing it back to the broker with the poison Ack that forces it to go to \nthe DLQ. In that way, it could be remembered as a message property in the resulting DLQ message.\nHow would you like to handle the exception, have it reported to a connection exception listener or have it recorded in the DLQ message?"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17236,"cells":{"_id":{"kind":"string","value":"d17237"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"You could use @QueryParam. Take a look here"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17237,"cells":{"_id":{"kind":"string","value":"d17238"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"sed 's#\\?version.*\\\"#\\?versionMyVersionHere\\\"#g'\n\nDemo : \n$echo -e '\n' | sed 's#\\?version.*\\\"#\\?versionMyVersionHere\\\"#g' \n\n\n$\n\n\nA: You may use:\nsed -i 's/?version\"/?versionMyVersionHere\"/' index.html\n\nDetails:\n\n\n*\n\n*? doesn't need to be escaped in default BRE.\n\n*Make sure to match trailing \" in order to avoid matching partial word.\n\n\nA: If you want to substitute all all occurrences of ?version for substitute in your file index.html, then execute the following command:\nsed -i 's/?version\"/?versionMyVersionHere\"/' index.html"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17238,"cells":{"_id":{"kind":"string","value":"d17239"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"In the docs readOnly you can set the config to readOnly\nconfig.readOnly = true;\n\nThere is also an example that shows setting it via a method\neditor.setReadOnly( true);\n\n\nA: try with following lines, \n\n\n\n\n\n\n\n\nA: have you tried\nthis\n?\nthey say, that this should work\nvar editor;\n\n// The instanceReady event is fired, when an instance of CKEditor has finished\n// its initialization.\nCKEDITOR.on( 'instanceReady', function( ev )\n{\n editor = ev.editor;\n\n // Show this \"on\" button.\n document.getElementById( 'readOnlyOn' ).style.display = '';\n\n // Event fired when the readOnly property changes.\n editor.on( 'readOnly', function()\n {\n document.getElementById( 'readOnlyOn' ).style.display = this.readOnly ? 'none' : '';\n document.getElementById( 'readOnlyOff' ).style.display = this.readOnly ? '' : 'none';\n });\n});\n\nfunction toggleReadOnly( isReadOnly )\n{\n // Change the read-only state of the editor.\n // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly\n editor.setReadOnly( isReadOnly );\n}\n\nand html\n\n\n\nA: In version 5 i do this:\nClassicEditor\n .create( document.querySelector( '.editor' ), {\n removePlugins: ['Title'],\n licenseKey: '',\n\n } )\n .then( editor => {\n window.editor = editor;\n editor.isReadOnly = true;\n\n\n } )\n .catch( error => {\n console.error( 'Oops, something went wrong!' );\n console.error( 'Please, report the following error on https://github.com/ckeditor/ckeditor5/issues with the build id and the error stack trace:' );\n console.warn( 'Build id: efxy8wt6qchd-qhxgzg9ulnyo' );\n console.error( error );\n } );\n\n\nA: Sources :\nhttp://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.readOnly\nhttp://rev.ckeditor.com/ckeditor/trunk/7657/_samples/readonly.html\nCKEDITOR.config.readOnly = true;\n\nA: Check this one out. The idea is if a user logs in a system with a classification other than 'BPPA', the CK editor shall be disabled and read-only. If the classification of a user is BPPA, thus the CK editor is editable. Note that these code fractions are actually in PHP. They need a working database to work but I figured you might get the idea and be able to work your own magic. \n\n\nThen, apply $disable to your text area:\n' . $saved . '';\n?>\n\n\nA: with version 4.5.4 you can do it with:\n$('#idElement).ckeditorGet().setReadOnly(true);\n\n\nA: In case you have several editors on the same page and you want to disable all of them on the page display :\nCKEDITOR.on('instanceReady', function (ev) {\n ev.editor.setReadOnly(true);\n});\n\nDocumentation"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17239,"cells":{"_id":{"kind":"string","value":"d17240"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"The obvious thing one would like to do is define cascade deletes on the association in the context. But trying it I found out that either sql server does not support it or EF needs help:\n\n\n*\n\n*Defining cascade delete on the foreign key constraint (using code-first) throws a sql server exception:\n\n\nIntroducing FOREIGN KEY constraint 'xxx' on table 'yyy' may cause cycles or multiple cascade paths. (See here.)\n\n\n*Cascade delete in EF model: now when deleting a parent the child records are not deleted. Even worse: the FK fields are not nullified and the foreign key constraint violation will throw an exception. The remedy is to load the child collection before deleting the parent.\n\n\nEspecially when deleting a tree of navigationitems this is not a very attractive option, but I'm afraid it's all you've got at the moment."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17240,"cells":{"_id":{"kind":"string","value":"d17241"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"You have to put the code in your function.php between tags.\nAs additional note: you can put all of these gallery' effects or only few of them on your site. For example if performance of your site is degrading you can delete or put // to \nadd_theme_support( 'wc-product-gallery-zoom' );\n\nor to other effects."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17241,"cells":{"_id":{"kind":"string","value":"d17242"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I would just check the time when you get to your conditional. This way it will check the time right before you are checking to see if an alarm should be raised. In my opinion this will be much simpler than having it run in the background the whole time. You don't need to make a new variable it would just look like this:\n if time.ctime() == dataValue:\n print(\"alarm Raise\")"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17242,"cells":{"_id":{"kind":"string","value":"d17243"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Just found a solution for this.\nClick on the branches tab shown below -\n\nDelete your published banch from the list -"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17243,"cells":{"_id":{"kind":"string","value":"d17244"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Change your image to video to include a silent audio track:\n-loop 1 -i image.jpg -f lavfi -i anullsrc -c:v libx264 -t 5 -pix_fmt yuv420p -crf 25 -s 1280x720 Out.mp4.\n\nConcat filter requires paired inputs."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17244,"cells":{"_id":{"kind":"string","value":"d17245"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"But, using G1.subgraph(matching.keys()).edges is slower than the long way:\nin_time = time.perf_counter()\ng1_edge_list = []\nfor m in matchings:\n m2 = {y: x for x, y in m.items()}\n for e1, e2 in G2.edges:\n g1_edge_list.append((m2[e1], m2[e2]))\nout_time = time.perf_counter() - in_time\nprint(out_time)\n\nin_time2 = time.perf_counter()\ng1_edge_list = []\nfor m in matchings:\n g1_edge_list += graph.subgraph(m.keys()).edges\nout_time_2 = time.perf_counter() - in_time2\nprint(out_time_2)\n\nIt is approximately 12 times slower. @Timus"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17245,"cells":{"_id":{"kind":"string","value":"d17246"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"i got here and still couldnt figure it out\nso i ended up moving my vault code into my own lib which i include in the recipe so i couldnt mock it out during ChefSpec run.\nso i have under my-cookbook/libraries/my_vault.rb with this code:\nrequire 'vault'\n\nmodule MyVault\n module Helpers\n def get_vault_secret(secret)\n Vault.configure do |config|\n config.address = \"#{node[:vault_url]}\"\n config.token = \"#{node[:vault_token]}\"\n end\n Vault.logical.read(secret)\n end\n end\nend\n\nand in my recipe:\nChef::Recipe.send(:include, MyVault::Helpers)\n\ncreds = get_vault_secret(\"secret/jmx\")\nuser = creds.data[:user]\npassword = creds.data[:password]\n\n\ntemplate \"/etc/app/jmx.password\" do\n source \"jmx.password.erb\"\n mode 0600\n owner \"dev\"\n group \"dev\"\n variables({\n :user => user,\n :password => password\n })\nend\n\n\n\nand my spec test:\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\n\ndescribe 'app::metrics' do\n platform 'ubuntu', '14.04'\n\n before do\n response = Object.new\n allow(response).to receive_messages(:data => {\n :user => \"benzi\",\n :password => \"benzi\"\n })\n allow_any_instance_of(Chef::Recipe).to receive(:get_vault_secret).and_return(response)\n end\n\n\n describe 'adds jmx.access to app folder' do\n it { is_expected.to create_template('/etc/app/jmx.access')\n .with(\n user: 'dev',\n group: 'dev',\n mode: 0644\n ) }\n end\n\n\nA: I responded to your email already, you want allow_any_instance_of(::Vault) and similar, and you may have to create the module (const_set(:Vault, Module.new)) if it doesn't exist already."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17246,"cells":{"_id":{"kind":"string","value":"d17247"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I'll put my comments into an answer:\n\nCan we open more than 2 websockets from the same page? Because i need\n more as well to show some more live updates on my page.\n\nYes, you can, but you shouldn't need to. Why open more than one webSocket? It's just a communications channel. You can send different messages related to different topics over that one channel. You really shouldn't need multiple webSockets between the same page/server.\nThe general idea is that you don't just send data, but you send a message name and some data. Then, all receiving code can decide what to do based on the message name. You might be interested in socket.io which creates this format for you on top of webSocket, or you can do it yourself with webSocket as shown here.\n\nIf I get answer to my first two questions my last question is, right\n now when a user uses a chat functionality the message goes to all the\n users on that page irrespective of the event they are attending. So a\n user attending an event1 send a message and user in the event2 gets\n that message as well which is incorrect. Ideally users from event1 can\n only seen messages from users attending event1. I other words, people\n in the same chat room should only be able to chat with each other and\n their messages should not go outside the chat room. How can I bind my\n event id in the websocket with the people attending that event so that\n the messages within the same event chat room remains within.\n\nwebSockets themselves don't have the \"attending the event\" capability you are asking for. With plain webSockets, you would have to keep track of which socket was in which event and when you want to send to an event, you send to only the connected webSockets associated with that event. It would be all your own code that would do that. Again, the socket.io library I mentioned above has this capability built-in. It sounds like what you really want. There is Java server support for socket.io too. socket.io has built-in chat rooms and the ability to broadcast to those in a given chat room."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17247,"cells":{"_id":{"kind":"string","value":"d17248"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Thanks to Travis' innovation teams' efforts numba is a great and powerful tool for scientific computing. One shall however take a due care to use it where feasible and where jit-compilation can bring some fruit to our hard and fast lives.\nNumba Documentation states this explicitly, saying:\n\n2.4.1.1. Constructs\n Numba strives to support as much of the Python language as possible, but some language features are not available inside Numba-compiled functions:- Function definition-\n Class definition-\n Exception handling (try .. except, try .. finally)-\n Context management (the with statement)-\n Comprehensions (either list, dict, set or generator comprehensions)-\n Generator delegation (yield from)\n The raise statement is supported in several forms:\nraise (to re-raise the current exception)\nraise SomeException\nraise SomeException(): in nopython mode, constructor arguments must be compile-time constants\n Similarly, the assert statement is supported with or without an error message."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17248,"cells":{"_id":{"kind":"string","value":"d17249"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Take a look at this setup https://github.com/kurtzace/python-spark-avro-query (dockerfile within it)\n\n*\n\n*This solution loads avro jar into spark jars\n\n*sets up spark home\n\n*also exposes the avro file as an API (main.py)"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17249,"cells":{"_id":{"kind":"string","value":"d17250"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"AFAIK this is still an issue and plotly will fail in such situation. There is still an open issue at github: Support for Pandas Time spans as index col.\nAs proposed in the comments one of the solution is to use to_timestatmp conversion, see this.\n\n*\n\n*Create MWE (this is just for reproducibility since there is no data provided in the question)\n\nimport numpy as np\nimport pandas as pd\nimport plotly.graph_objects as go\nimport plotly.offline as pyo\n\ndf = pd.DataFrame({\"one\": np.random.random(10)}, index=pd.period_range(\"2020-03-01\", freq=\"M\", periods=10))\n# Out:\n# one\n# 2020-03 0.302359\n# 2020-04 0.919923\n# 2020-05 0.673808\n# 2020-06 0.718974\n# 2020-07 0.754675\n# 2020-08 0.731673\n# 2020-09 0.772382\n# 2020-10 0.654555\n# 2020-11 0.549314\n# 2020-12 0.101696\n\ndata = [\n go.Scatter(\n x=df.index,\n y=df[\"one\"],\n )\n]\nfig = go.Figure(data=data)\npyo.iplot(fig)\n# -> will fail (\"TypeError: Object of type Period is not JSON serializable\")\n\n\n\n*Use to_timestamp conversion (-> df.index.to_timestamp())\n\ndata = [\n go.Scatter(\n x=df.index.to_timestamp(), # period to datetime conversion\n y=df[\"one\"],\n )\n]\nfig = go.Figure(data=data)\npyo.iplot(fig)\n\n\nOr, if you do not need datetime format you can convert this to string as well:\ndata = [\n go.Scatter(\n x=df.index.strftime(\"%Y-%m\"), # You can define your own format\n y=df[\"one\"],\n )\n]\nfig = go.Figure(data=data)\npyo.iplot(fig)\n\nYou can of course do this conversion right on the original dataframe (so you do not need to do it iteratively inside go.Scatter), but this is just minor stuff. There might be also a way of using custom encoder instead of the default one, but I think it's not worthy of trying and afaik there is no better solution than using one of possible conversion from Period to datetime or string."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17250,"cells":{"_id":{"kind":"string","value":"d17251"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"as mentioned in the documentation: you will need to use tostring on the internal property bag.\ni.e. parse_json(tostring(parse_json(customDimensions).CurrentPluginContext))\n\n\nA: traces | order by timestamp desc\n| project CurrentContext = parse_json(customDimensions.CurrentPluginContext)\n| extend Source = parse_json(tostring(CurrentContext)).source\n| project Source"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17251,"cells":{"_id":{"kind":"string","value":"d17252"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Try this\nboolean use24HourClock = DateFormat.is24HourFormat(getApplicationContext());\n\nReturns true if user preference is set to 24-hour format.\nSee more about DateFormat here\n\nA: Try this \npublic static boolean usesAmPm(Locale locale)\n{\n String pattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern(\n FormatStyle.MEDIUM, FormatStyle.MEDIUM, IsoChronology.INSTANCE, locale);\n return pattern.contains(\"a\");\n}"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17252,"cells":{"_id":{"kind":"string","value":"d17253"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I'd recommend implementing a URL-shortener API (ie: bit.ly). Even further, there are API wrappers available for most of these popular services (ie: Python API wrapper for bit.ly - http://code.google.com/p/python-bitly/)."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17253,"cells":{"_id":{"kind":"string","value":"d17254"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Since my storage mechanism has failed, can SES provide me with a history of email addresses to which an email was sent to?\n\nNo unfortunately, unless you previously configured it to do so.\nChecking anything at a granular level within SES - including email sending/delivery - can only be done using event publishing.\nAlso, event publishing cannot be backdated so if you enable it now, it will also only work for emails sent from this point onwards."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17254,"cells":{"_id":{"kind":"string","value":"d17255"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"You can try use xpath selectors, for example\nwithin(:xpath, \"//table/tr[1]/td\") do\n page.should have_content('First row content')\nend\n\nwithin(:xpath, \"//table/tr[2]/td\") do\n page.should have_content('Second row content')\nend"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17255,"cells":{"_id":{"kind":"string","value":"d17256"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"You have to order the rows accordingly:\nDataRow dRow = dsMain.tblStudentMaster.AsEnumerable()\n .OrderByDescending(r => r.Field(\"StudentRollNo\"))\n .FirstOrDefault();\n\n(assuming that the type of the column StudentRollNo is int)\n\nA: You can also try MaxBy extension method from MoreLINQ\ndsMain.tblStudentMaster.MaxBy(item => item.FieldYouWantMaxFrom);"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17256,"cells":{"_id":{"kind":"string","value":"d17257"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Is that true?\n\nYes.\n\nIs there any step I can take to further understand the structure of the data sent from my device to the remote server?\n\nThe captured packet includes an Ethernet Ⅱ header and an IPv4 header and a UDP header as follows:\nEthernet Ⅱ: from 20:e5:2a:4f:b9:4f (NETGEAR) to 44:80:eb:ea:ef:9b (Motorola)\nIPv4: from 169.55.244.58 to 192.168.1.12, not fragmented\nUDP: from port 14242 to port 48818, payload length=1406 bytes\n\nThe right chunk of the 3rd line (i.e. bb 19 43 4f 02 c8 2b a3) is the start of the application data.\nTo analyze the application data, you need to know what protocol the application used to send the packet and to learn the protocol."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17257,"cells":{"_id":{"kind":"string","value":"d17258"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"OK, apparently I needed to call \"web->deleteLater();\" before calling \n\"this->close();\". The \"delete web;\" was uneeded. Still, I'd like to know why delete doesn't work in this case...\n\nA: You are creating QWebEngineView with parent \"this\" (owner) so you don't have to delete it yourself, it will be automatically deleted when it parent will. See Qt documentation about memory management :\nhttp://doc.qt.io/qt-5/objecttrees.html\nit is also dangerous doing that, because if you don't create the QWebEngineView object using doWeb(QString link), you will try to delete something that doesn't exist and therefore it can lead you to undefined behavior.\nremove delete web from your destructor and see if you always have the problem.\nEdit :\nThe reason why it is not destroyed : you aren't destroying SubWindow Object (the owner of QWebEngineView Object). You can Verify it yourself by printing something in the destructor.\nIf you were destroying SubWindow object, the second time you push the button in MainWindow, your application will crashes. Since you aren't creating the SubWindow object inside your function on_push_button, but inside MainWindow::init. Your SubWindow Object is only hidden and not destroyed. It is destroyed only when you close the MainWindow. You are also Creating an instance of QWebEngineview each time you show sub (SubWindow Object), so if you show sub 3 times you will have 3 QWebEngineView inside your Subwindow.\nthe changes i would do to the code :\nmain.cpp\n#include \"mainwindow.h\"\n#include \n\nint main(int argc, char *argv[])\n{\n QApplication a(argc, argv);\n MainWindow w;\n w.show();\n\n return a.exec();\n}\n\nmainWindow.h\n#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include \n#include \"subwindow.h\"\n\nnamespace Ui\n{\nclass MainWindow;\n}\n\nclass MainWindow : public QMainWindow\n{\n Q_OBJECT\n\npublic:\n explicit MainWindow(QWidget *parent = 0);\n ~MainWindow();\n\nprivate slots:\n void on_pushButton_clicked();\n\nprivate:\n Ui::MainWindow *ui;\n SubWindow* sub;\n};\n#endif\n\nmainWindow.cpp\n#include \"mainwindow.h\"\n#include \"ui_mainwindow.h\"\n\nMainWindow::MainWindow(QWidget *parent) :\n QMainWindow(parent),\n ui(new Ui::MainWindow), sub(new SubWindow(this))\n{\n ui->setupUi(this);\n}\nMainWindow::~MainWindow()\n{\n delete ui;\n}\nvoid MainWindow::on_pushButton_clicked()\n{\n sub->show();\n sub->doWeb(ui->lineEdit->text());\n}\n\nsubWindow.h\n#ifndef SUBWINDOW_H\n#define SUBWINDOW_H\n\n#include \n\n#include \n#include \n\nnamespace Ui\n{\nclass SubWindow;\n}\n\nclass SubWindow : public QMainWindow\n{\n Q_OBJECT\n\npublic:\n explicit SubWindow(QWidget *parent = 0);\n void doWeb(QString link);\n ~SubWindow();\n\nprivate:\n Ui::SubWindow *ui;\n QWebEngineView *web;\n\nprivate slots:\n void on_pushButton_clicked();\n\n};\n\n#endif // SUBWINDOW_H\n\nsubWindow.cpp\n#include \"subwindow.h\"\n#include \"ui_subwindow.h\"\n\nSubWindow::SubWindow(QWidget *parent) :\n QMainWindow(parent),\n ui(new Ui::SubWindow),\n web(new QWebEngineView(this))\n{\n ui->setupUi(this);\n ui->verticalLayout->addWidget(web);\n}\nvoid SubWindow::doWeb(QString link)\n{\n web->load(QUrl(link, QUrl::TolerantMode));\n}\nSubWindow::~SubWindow()\n{\n delete ui;\n}\nvoid SubWindow::on_pushButton_clicked()\n{\n this->close(); //Artifact for testing purposes.\n}\n\nNote that i am also not destroying subWindow object, but i m not creating QWebView each time i call the method SubWindow::doWeb(String).\nIf it was up to me i would use a Subclassed Dialog that is not a member of MainWindow, the object would be created inside MainWindow::on_pushButton_clicked() and destroyed when i finish using it.\n\nA: Looks like something was not closed correctly.\nI was using Qt 5.15 using the kit MSVC2019 32bit compiler. But Visual Studio 2017 (and not 2019) was installed on my computer. Thus, the compiler detected in Qt creator -> project -> manage kit -> compiler was the one of MSVC2017 i.e : Microsoft visual C++ compiler 15.8 (x86).\nThe solution is to install visual Studio 2019 and then replace Qt creator by the correct compiler (2019) i.e: Microsoft visual c++ compiler 16.7 (X86).\nThen I could compile without any leak of memory anymore."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17258,"cells":{"_id":{"kind":"string","value":"d17259"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I don't believe that it's possible. If you compare Express to Standard, expand the Reporting node, you will see Model Support is unchecked for Express. Report Builder 1.0 only worked on prebuilt models so by extension, I'm assuming that bullet continues to address models and the report builder.\nI never install Express so I can't dig around and verify it.\nIf the Report Builder button is not showing, verify the accessing account has Report Builder role or better. Predefined SSRS Roles in 2008 R2\n\nA: I can confirm that this feature is not available in the express edition - you will also not be able to create a report model."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17259,"cells":{"_id":{"kind":"string","value":"d17260"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"There are mainly 3 different types of executables:\n\n\n*\n\n*A console application is reading from stdin or a file and writing to stdout or a file and outputs error messages to stderr.\nThe processing of a batch file is halted on starting a console application until the console application terminated itself. The correct term is therefore: calling a console application.\nThe exit code of the console application is assigned to environment variable ERRORLEVEL and can be also directly evaluated for example with if errorlevel X rem do something\nMany *.exe in System32 directory of Windows are such console applications, like find.exe, findstr.exe, ping.exe, ...\n\n*A GUI (graphical user interface) application is started as new process which means the Windows command processor does not halt batch processing until the GUI application terminates itself.\nIt is not easily possible to get something from within a command process from such applications. GUI applications are designed for interacting via a graphical user interface with a user and not via standard streams or files with a command process.\nA typical example for such applications is Windows Explorer explorer.exe in Windows directory.\n\n*A hybrid application supports both interfaces and can be therefore used from within a command process as well as by a user via GUI.\nHybrid applications are rare because not easy to code. The behavior of hybrid applications on usage from within a batch file must be find out by testing.\nExample for such applications are Windows Registry Editor regedit.exe or shareware archiver tool WinRAR WinRAR.exe.\nIt is best to look on simple examples to see the differences regarding starting/calling all 3 types of applications from within a batch file.\nExample for console application:\n@echo off\ncls\n%SystemRoot%\\System32\\ping.exe 127.0.0.1 -n 5\necho.\necho Ping finished pinging the own computer (localhost).\necho.\npause\n\nThe command processing is halted until ping.exe terminated itself which takes 4 seconds. There is no need for start or call for such applications, except the console application should be intentionally executed in a separate process.\nExample for a GUI application:\n@echo off\ncls\n%WinDir%\\Explorer.exe\necho.\necho Windows Explorer opened and is still running!\necho.\npause\n\nThis batch file outputs the text and message prompt to press any key immediately after starting Windows Explorer indicating that Windows Explorer was started as separate process and Windows command processor immediately continued on the next lines of the batch file. So although Windows Explorer was started and is still running, the batch processing continued, too.\nExample for a hybrid application:\n@echo off\ncls\n\"%ProgramFiles%\\WinRAR\\WinRAR.exe\"\necho.\necho User exited WinRAR.\necho.\npause\n\nThis batch file starts WinRAR without any parameter (usually not useful from within a batch file) if being installed at all in default installation directory. But batch processing is halted until the user exited WinRAR for example by clicking on X symbol of the WinRAR´s application window.\nBut opening a command prompt window and executing from within the window\n\"%ProgramFiles%\\WinRAR\\WinRAR.exe\"\n\nresults in getting immediately the prompt back in command window to type and execute the next command. So WinRAR finds out what is the parent process and acts accordingly.\nWindows Registry Editor shows the same behavior. Executing from within a command prompt window\n%WinDir%\\regedit.exe\n\nresults in opening Windows Registry Editor, but next command can be immediately entered in command prompt window. But using this command in a batch file results in halting batch processing until GUI window of Windows Registry Editor is closed by the user.\nTherefore hybrid applications are used from within a batch file mainly with parameters to avoid the necessity of user interaction.\n\nOkay, back to the question after this brief lesson about various types of applications.\nFirst suggestion is using\nResult\\TextFileName.txt\n\ninstead of\nResult/TextFileName.txt\n\nas the directory separator on Windows is the backslash character, except the executables require forward slashes as directory separator because of being badly ported from Unix/Linux to Windows.\nSecond suggestion is finding out type of application. Is command start really necessary because the applications don't start itself in a separate process and need user interaction to terminate itself?\nNote: Command start interprets first double quoted string as title string. Therefore it is always good to specify as first parameter \"\" (empty title string) on starting a GUI or hybrid application as a separate process. On starting a console application as a separate process it is in general a good idea to give the console window a meaningful title.\nAnd last if the started applications really would need user interaction to terminate, it would be definitely better to either start and kill them after waiting 1 or more seconds between start and kill or start them all, wait a few seconds and finally kill them all at once.\nExample for first solution with starting and killing each application separately:\n@echo off\nsetlocal\nset TimeoutInSeconds=3\ncall :RunApp IEPassView\ncall :RunApp MailPassView\ncall :RunApp MessenPass\ncall :RunApp RouterPassView\ncall :RunApp ProtectedStoragePassView\ncall :RunApp DialUpPassView\nendlocal\ngoto :EOF\n\n:RunApp\nstart \"\" \"%~1.exe\" /stext \"Results\\%~1.txt\"\nset /A RetryNumber=TimeoutInSeconds + 1\n%SystemRoot%\\System32\\ping.exe 127.0.0.1 -n %RetryNumber% >nul\n%SystemRoot%\\System32\\taskkill.exe /f /im \"%~1.exe\"\ngoto :EOF\n\nIt is also possible to use timeout instead of ping for the delay if the batch file is only for Windows Vista and later Windows versions.\nExample for second solution with starting all applications, wait some seconds and kill them finally all:\n@echo off\ncall :StartApp IEPassView\ncall :StartApp MailPassView\ncall :StartApp MessenPass\ncall :StartApp RouterPassView\ncall :StartApp ProtectedStoragePassView\ncall :StartApp DialUpPassView\n\n%SystemRoot%\\System32\\ping.exe 127.0.0.1 -n 6 >nul\n\ncall :KillApp IEPassView\ncall :KillApp MailPassView\ncall :KillApp MessenPass\ncall :KillApp RouterPassView\ncall :KillApp ProtectedStoragePassView\ncall :KillApp DialUpPassView\n\ngoto :EOF\n\n:StartApp\nstart \"\" \"%~1.exe\" /stext \"Results\\%~1.txt\"\ngoto :EOF\n\n:KillApp\n%SystemRoot%\\System32\\taskkill.exe /f /im \"%~1.exe\"\ngoto :EOF\n\nFor understanding the used commands and how they work, open a command prompt window, execute there the following commands, and read entirely all help pages displayed for each command very carefully.\n\n\n*\n\n*call /?\n\n*echo /?\n\n*endlocal /?\n\n*goto /?\n\n*ping /?\n\n*set /?\n\n*setlocal /?\n\n*start /?\n\n*taskkill /?\nSee also the Microsoft article about Using command redirection operators.\nPS: The last two batch code blocks were not tested by me because of not having available the applications.\n\nA: I suggest killing all tasks at once, at the end of the very end, possibly after a timeout command with a amount of time appropriate to your system's speed. That may help the issue."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17260,"cells":{"_id":{"kind":"string","value":"d17261"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"use filter.\na='A B C D \\n EF G'\nb=\" \".join(list(filter(None,a.split(\" \"))))\nprint(b)\n\n\nA: You could use a pattern to match 2 or more whitespace chars without the newline, and in the replacement use a single space.\n[^\\S\\r\\n]{2,}\n\nRegex demo | Python demo\nFor example\nimport re\n\ns = 'A B C D \\n EF G'\nprint(re.sub(r\"[^\\S\\r\\n]{2,}\", \" \", s))\n\nOutput\nA B C D \n EF G\n\n\nA: Try using regex.\nSplit the string by '\\n' and then combine multiple whitespace into 1 whitespace.\nimport re\ncomb_whitespace = re.compile(r\"\\s+\")\nfor i in s.split('\\n'):\n print(comb_whitespace.sub(\" \", i))\n\n\nA B C D \n EF G\n\n\nA: It’s need to add \\n split\ns = 'A B C D \\n EF G'\nprint(s)\ns = \" \".join(s.split())\ns = \" \".join(s.split('\\n'))\nprint(s)\n\nOuts\nA B C D \n EF G\nA B C D EF G"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17261,"cells":{"_id":{"kind":"string","value":"d17262"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Provided that test also has a column of the variable you are predicting you can just run something like\ntest$prediction <- prob\n\nThen both the actual outcome as well as your prediction are in the same data.frame and you can easily plot them\ntest <- test[order(test$prediction, decreasing = TRUE),]\ntest$id = seq(nrow(test),1)\n\nlibrary(ggplot2)\nggplot(data = test) + \n geom_line(aes(x = id, y = prediction)) +\n geom_point(aes(x = id, y = direction))\n\nNaturally this is a less beautiful graph than in an ordinary regression model because your dependant variable is binary."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17262,"cells":{"_id":{"kind":"string","value":"d17263"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"In VBScript you could do it like this:\nsrc = \"C:\\source\\folder\"\ndst = \"C:\\destination\\folder\"\n\nSet fso = CreateObject(\"Scripting.FileSystemObject\")\n\nmostRecent = Array(Nothing, Nothing)\n\nFor Each f In fso.GetFolder(src).Files\n If LCase(fso.GetExtensionName(f.Name)) = \"sch\" Then\n If mostRecent(0) Is Nothing Then\n Set mostRecent(0) = f\n ElseIf f.DateLastModified > mostRecent(0).DateLastModified Then\n Set mostRecent(1) = mostRecent(0)\n Set mostRecent(0) = f\n ElseIf mostRecent(1) Is Nothing Or f.DateLastModified > mostRecent(1).DateLastModified Then\n Set mostRecent(1) = f\n End If\n End If\nNext\n\nFor i = 0 To 1\n If Not mostRecent(i) Is Nothing Then mostRecent(i).Copy dst & \"\\\"\nNext\n\n\nEdit: The above code isn't too extensible, though. If you need more than just the most recent 2 files you may want to take a slightly different approach. Create an array the size of the number of files you want to handle, and do a sorted insert as long as you have free slots or the current file is newer than the oldest file already in the array.\nsrc = \"C:\\source\\folder\"\ndst = \"C:\\destination\\folder\"\nnum = 2\nlast = num-1\n\nFunction IsNewer(a, b)\n IsNewer = False\n If b Is Nothing Then\n IsNewer = True\n Exit Function\n End If\n If a.DateLastModified > b.DateLastModified Then IsNewer = True\nEnd Function\n\nSet fso = CreateObject(\"Scripting.FileSystemObject\")\n\nReDim mostRecent(last)\nFor i = 0 To last\n Set mostRecent(i) = Nothing\nNext\n\nFor Each f In fso.GetFolder(src).Files\n If LCase(fso.GetExtensionName(f.Name)) = \"sch\" Then\n If IsNewer(f, mostRecent(last)) Then Set mostRecent(last) = Nothing\n For i = last To 1 Step -1\n If Not IsNewer(f, mostRecent(i-1)) Then Exit For\n If Not mostRecent(i-1) Is Nothing Then\n Set mostRecent(i) = mostRecent(i-1)\n Set mostRecent(i-1) = Nothing\n End If\n Next\n If mostRecent(i) Is Nothing Then Set mostRecent(i) = f\n End If\nNext\n\nFor i = 0 To num-1\n If Not mostRecent(i) Is Nothing Then mostRecent(i).Copy dst & \"\\\"\nNext\n\nAn alternative would be shelling out to the CMD-builtin dir command and reading its output:\nnum = 2\n\nSet fso = CreateObject(\"Scripting.FileSystemObject\")\nSet sh = CreateObject(\"WScript.Shell\")\n\ncmd = \"cmd /c dir /a-d /b /o-d \"\"\" & sh.CurrentDirectory & \"\"\"\\*.*\"\nSet dir = sh.Exec(cmd)\nDo While dir.Status = 0\n WScript.Sleep 100\nLoop\n\ni = num\nDo Until i = 0 Or dir.StdOut.AtEndOfStream\n f = dir.StdOut.ReadLine\n fso.CopyFile f, dst & \"\\\"\n i = i - 1\nLoop"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17263,"cells":{"_id":{"kind":"string","value":"d17264"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Using an invisible view is definitely not something you want to do. Look into the addGlobalMonitorForEventsMatchingMask:: class method on NSEvent.\nFor example, here's how you would add a monitor for a movement of the mouse:\n[NSEvent addGlobalMonitorForEventsMatchingMask:NSMouseMovedMask handler:^(NSEvent *mouseMovedEvent) {\n //do something with that event\n}];"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17264,"cells":{"_id":{"kind":"string","value":"d17265"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"If your form1 is already present in the page, then why do you need to initialize it again? Just set the visible status to false to hide it.\nmainFrm.Visible = false;\n\n\nA: without seeing more of the code it's hard to answer, but you definitely need to reference the the old Form1 that is already visible and hide it. You are creating a new form and hiding it.\n\nA: You have to define your Form2 class to store the reference to the main form.\npublic partial class Form2 : Form\n{\n /* reference to the main form will be stored here */\n private Form1 _mainForm;\n\n public Form2(Form1 mainForm)\n {\n InitializeComponent();\n /* Initialize the main form field */\n this._mainForm = mainForm;\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n /* Set the main form visibility to false */\n _mainForm.Visible = false;\n } \n}\n\nNow when you are creating the Form2 instance just add the main form to the constructor:\n /* Show the form2 */\n _form2 = new Form2(this);\n _form2.Show();\n\nNote: this will refer to the form that creates the Form2 object.\n\nA: You could create a static form type property in your Form1 and set it when Form1 is Shown, and then use it to hide your form\n Here is a code that worked for me.\n private void button1_Click(object sender, EventArgs e)\n {\n var objForm1 = new Form1();\n Form1.Fom1ref = objForm1;\n objForm1.Show();\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n Form1.Fom1ref.Hide();\n\n }\n\nHere is the property that should be set in Form1.\n public static Form Fom1ref { get; set; }"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17265,"cells":{"_id":{"kind":"string","value":"d17266"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Assuming that you'd like to redirect to some.xhtml which is placed in web root folder:\n\n*\n\n*You can just continue using plain HTML.\n go to some page\n\nFor conditional rendering, just wrap it in an .\n\n\n\n*Or use with implicit navigation.\n \n\nNote: no need to prepend context path nor to include FacesServlet mapping.\n\n\n\n*Or use with ?faces-redirect=true.\n \n\nNote: no need to prepend context path nor to include FacesServlet mapping.\n\n\n\n*Or use , but you need to specify context path.\n \n\n\nRedirecting to an external URL is already answered in this duplicate: Redirect to external URL in JSF.\nSee also:\n\n*\n\n*How to navigate in JSF? How to make URL reflect current page (and not previous one)\n\n*When should I use h:outputLink instead of h:commandLink?\n\n*JSF implicit vs. explicit navigation"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17266,"cells":{"_id":{"kind":"string","value":"d17267"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"Use \nx = ((double) w[i]) / l[i];\n\nAs it is, you're dividing two integers using integer division, and assigning the resulting int to a double. Casting one of the operands to a double makes it do a double division instead.\n\nA: If you divide an int by another int you get an int not a double. Try\nx = (double) w[i] / l[i];\n\n\nA: System.out.printf(\"%10.4f\", x);\n\nMind, only BigDecimal has precise precision. Doubles are approximations."},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17267,"cells":{"_id":{"kind":"string","value":"d17268"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"I'm not sure why you are importing SimpleSlider/simple-slider.html, you should import ../bower_components/polymer-simple-slider/src/simple-slider.html\nI have created example project where it's working:\nhttps://github.com/mkubenka/polymer-simple-slider-example"},"language":{"kind":"string","value":"unknown"},"title":{"kind":"string","value":""}}},{"rowIdx":17268,"cells":{"_id":{"kind":"string","value":"d17269"},"partition":{"kind":"string","value":"val"},"text":{"kind":"string","value":"The method's parameter has no generic so all classes are allowed.\nYou may google 'type erasure' for more information.\nIf you add the generic type to your method you will get a compiler error:\nprivate static ArrayList tricky(ArrayList list) { // ...\n\nBy the way, you do not need to return the list because you modify the same instance.\n\nA: Here's why:\n\nThe reason you can get away with compiling this for arrays is because\nthere is a runtime exception (ArrayStoreException) that will prevent\nyou from putting the wrong type of object into an array. If you send a\nDog array into the method that takes an Animal array, and you add only\nDogs (including Dog subtypes, of course) into the array now referenced\nby Animal, no problem. But if you DO try to add a Cat to the object\nthat is actually a Dog array, you'll get the exception. Generic\nMethods (Exam Objectives 6.3 and 6.4) 615 616 Chapter 7: Generics and\nCollections\nBut there IS no equivalent exception for generics, because\nof type erasure! In other words, at runtime the JVM KNOWS the type of\narrays, but does NOT know the type of a collection. All the generic\ntype information is removed during compilation, so by the time it gets\nto the JVM, there is simply no way to recognize the disaster of\nputting a Cat into an ArrayList and vice versa (and it becomes\nexactly like the problems you have when you use legacy, non-type safe\ncode)\n\nCourtesy : SCJP Study guide by Kathy Sierra and Bert Bates\n\nA: When you declare you ArrayList like ArrayList list = ... you do not declare the type of object your list will contain. By default, since every type has Object as superclass, it is an ArrayList