I'm trying to figure out how to drop jcmd.exe on a windows server installed at a client site so that we can troubleshoot heap and thread issues. Don't really want to install the full JDK since it complicates the environment. jcmd.exe definitely wants some components from the JDK to run, but I'm unable to determine which ones. If I can get it down to a small set that we unzip into a folder, use it to capture data, and then destroy, that would be perfect. Anybody know what JDK components jcmd needs to run?
One of the most famous features of IDEs is as you know finding references (or usages) of variables, functions or classes in a project. I have been trying Atom Atom) for a while. I like it so far. But, I could not find a way to access to references (or usages) of var/function or a class in JavaScript code. Isn't this feature available in Atom editor? I give two examples below. a) In the following simple code, Atom does not take me the declaration of "title". I am making "Go to Declaration" by right clicking on the word "title" Template.docAddForm.events({ 'submit .js-add-doc':function(event){ c
Does any one know how to install asterisk on mac? I am new to voip so please guide me from basics like what software/ command line tools would be needed. I do tried to search it on google but couldn't found any doc with the proper steps. You can also provide link of tutorial. Thanks in advance.
Building a web app using angular 2, (or 4). Want to send a message through Whatsapp. This works fine whatsapp://send?text=hi! to open Whatsapp from the browser. I want to send the URL of the current page. I can use {{url}} to print the URL on the web page but I don't know how to set text={{url}} if you know what I mean. relevant part of the component export class ActivityDetailsComponent implements OnInit { @Input() activity: any; @Output() close = new EventEmitter(); error:any; navigated = false; sub: any; imageURL: string; location:Location; url: any; constructor(private activitiesService:Ac
I am new to regex and I am trying to substitute some characters for asterisk in php like below: email: [email protected] -> v****r@g***l.com I have done this: $email = preg_replace('/(?:^|@).\K|\.[^@]*$(*SKIP)(*F)|.(?=.*?\.)/', '*', $linha['cli_email']); The problem is that the output is v*****@g****.com instead of v****r@g***l.com and I don't know how to show the last for the username and last for the email provider.
I recently got to know about ES6 proxies but I don't see a good reason to use it. I mean, everything that one could do with Proxy can be done without it, except if I'm missing something. For example, most folks talk about validation when it comes to proxy but one could apply some JS goodness to validate and everyone is fine. I would appreciate if someone could open my eyes to some major use cases of Proxies. Thanks!
I'm new to using ORM in dealing with database, Currently I'm making a new project and I have to decide if i'll use Entity Framework or Dapper. I read many articles which says that Dapper is faster than Entity Framework. So I made 2 simple prototype projects one using Dapper and the other uses Entity Framework with one function to get all the rows from one table. The table schema as the following picture and the code for both projects as the following for Dapper project System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); IEnumerable<Emp> emplist = cn.Query<Emp>(@"S
SQL Server 2016 is installed on windows server 2012 R2 server "dev" and sql server service is listening to all IP on port 1433. I can use sqlcmd to connect to it both from local and another remote windows server 2012. the command is simple: sqlcmd -S dev\INSTACE -d database -U test1 -P test1 However, when I try to connect from a Ubuntu 16.04 machine using same command, I always got following error: Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2AF9. Sqlcmd: Error: Microsoft ODB
Inside org.springframework.data.jpa.repository.@Query annotation I check if field in a collection and possibly ignore collection if it is empty: @Query(""select e from #{#entityName} where e.type in :lst or 0 = :lstSize") List<Entity> findByLst(@Param("lst") List<XEnum> lst, @Param("lstSize") int lstSize); I call code as: List<XEnum> lst = ...; int lstSize = (lst == null) ? 0 : lst.size(); findByLst(lst, lstSize); For Oracle DB in case of lst = null Hibernate logged: DEBUG [nio-8443-exec-4] org.hibernate.SQL entity0_.type in (?) or 0=? TRACE [nio-8443-exec-4] org.hibernate.type.EnumType Bindin
I have my table that gets generated based on what's in the database and would like to add the ability to sort the table based on particular columns. I tried looking online but since the table isn't static, I'm not sure how to properly add in the ability to sort. <table class="table" style="border: 3px solid black;"> <thead> <tr> <th style="border-left: 1px solid #eee;" class="align-middle">Select</th> <th class="align-middle">Col1</th> <th class="align-middle">Col2</th> <th class="align-middle">Col3</th> <th class="align-middle">Col4</th> </tr> </thead> <tbody> {% for row in data %} <tr> <td><
I am writing microservices with Java. At the end, I run maven build to generate a Docker image based on a Dockerfile in directory [project-root]/docker. Some files need to be copied into the Docker image. Therefore I have the following lines in my Dockerfile: # HDFS base image FROM mdouchement/hdfs COPY ${workdir.name} /${workdir.name} COPY ${resource.dir} /etc/hadoop Variables workdir.name and resource.dir are defined in pom.xml <properties> <workdir.name>javarun</workdir.name> <resource.dir>${project.baseUri}/src/main/resources</resource.dir> </properties> While first copy command uses relat
Hi there I've relativley new to the Wiremock framework. I've got a test enviroment working but I need to for our integration testing need to resolve a dynamic path such as /test/dynamic/{dynamicpath}/help where dynamic path is going to be a variable that I want to resolve and then present different data from using a subset of a json file such as { dynamicpathA : "hello", dynamicpathB "world" } at the moment I have : stubFor(get(urlPathMatching("/test/dynamic/{dynamicpath}/help")) .withHeader("accept", equalTo("application/json")) .willReturn(aResponse().withBody(readFile(RESOURCES + "test.json
Hi all I am new at learning Scheme and often have issues with making parallels between an imperative language and a functional language. For example if I had had two arrays. A = [1 2 3] B = [4 5 6] If I wanted to create a new array with the elements of A multiplied by each element in B I could simply do something like (pseudo-code): for(int i = 0; i < A.length; i++) for(int j = 0; j < B.length, j++) arr.push(A[i]*B[j]) Which would give back: arr = [4 5 6 8 10 12 12 15 18] What would be some ways to approach this problem in a functional language?
I have a file file.ts: let a: Message = "foo" let b: Message = "bar" let c: Message = "baz" Now I have a second file file2.ts type Message = string function fun(abc: Message): void { } Now function fun will allow me to pass stringto it, instead of Message, because it is only a type alias. Is there some way to isomorphic types, that is, a type that is just like another type, but there will be a strict check. So basically like Haskells newtype.
My Angular route config is as below: export const routes: Routes = [ { path: 'mgmt', ... }, { path: 'about', ... }, { path: '**', component: PageNotFoundCmp } ]; But now on a page, there's a link to help pages, which are static resources hosted on the same server: <a href="/help/en/index.html" target="_blank"> With the above route config, apparently it will be matched to others ** - page not found. If we cannot host help resources in another domain, is there any way to exclude /help/** path from Angular routing?
My angular route config is as below: export const routes: Routes = [ { path: 'mgmt', ... }, { path: 'about', ... }, { path: '**', component: PageNotFoundCmp } ]; But now on a page, there's a link (<a href="/help/en/index.html" target="_blank">) to help pages, which are static resources hosted on the same server. With the above route config, apparently it will be matched to others ** - page not found. Let's say we cannot host help resources in another domain, is there any way to exclude /help/** path from angular routing? or do you think this is a valid feature request for angular to support?
I am new to REST API JSON but have been able to consume a few API with asp.net. Here is the problem I am currently facing. I have been able to send JSON data to an API using this method. public void PostData() { string sName = sysName.Text; string sDescrip = sysDescrip.Text; var httpclient = new HttpClient(); httpclient.BaseAddress = new Uri("http://33.248.292.99:8094/bizzdesk/sysconfig/api/"); var sys = new Bizsys(){name= sName, description= sDescrip}; httpclient.PostAsJsonAsync("system", sys); } it work just fine. Now I modify the code in order to accommodate more values thus: var httpclient
I have a C# application who read in an SQL Server Database. Sometimes i get an error and the apps crash. If i look on the EventViewer, i got this : Application : XXXXXXXXX_CLI.EXE Version du Framework : v4.0.30319 Description : le processus a été arrêté en raison d'une exception non gérée. Informations sur l'exception : System.ComponentModel.Win32Exception Informations sur l'exception : System.Data.SqlClient.SqlException à System.Data.SqlClient.SqlConnection.OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1<System.Action>) à System.Data.SqlClient.TdsParser.ThrowExceptionAndW
Node project worked fine couple of months ago, now after implementation of sockets, when trying to run the app, i see the following error: Error in console(git bash) I'm using win 10, tried changing Node versions(4.7, 6.10, 7.2, 7.9), No result there. The port I'm using is not busy. We are using socket.io, tried to remove the part of code, that uses the module, but unexpectedly, it did not help. Any ideas ? Update: Works fine on OS X, and doesn't work on 3 different win 10 oter computers.
Firstly, installed erlang rabbitmqserver Then, try to run command to enable plugin like the following: C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.6.9\sbin>rabbitmq-plugins enable rabbitmq_management Plugin configuration unchanged. Applying plugin configuration to rabbit@PVGN50886410A... failed. Could not contact node rabbit@PVGN50886410A. Changes will take effect at broker restart. Options: --online - fail if broker cannot be contacted. --offline - do not try to contact broker. C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.6.9\sbin>rabbitmq-plugins enable --offline rab
This is the first time in my life I touch js or node so please bear with me. I am trying to make my app output logs on the server side. getUser.onclick = function () { console.log('Server running at http://127.0.0.1:1337/'); var req = new XMLHttpRequest(); req.onreadystatechange = function () { if (req.readyState === 4 && req.status === 200) { var user = JSON.parse(req.responseText); results.innerText += user.firstName + ' ' + user.lastName + '\n'; } }; req.open("GET", "/user"); req.send(); Now according to this: Node js console.log is not showing anything this should work. However, this sheds
I'm trying to get anime-list in this site, https://ww1.gogoanime.io this is the code, org.jsoup.Connection.Response usage = Jsoup.connect("https://ww1.gogoanime.io/anime-list-A") .header("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") .header("accept-encoding", "gzip, deflate, sdch, br") .header("accept-language", "en-US,en;q=0.8") .header("cache-control", "max-age=0") .header("user-agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36") .header("upgrade-insecure-requests", "1") .ignor
Is regular MYSQL query faster than Codeigniter active record query? some where I read that the active record query takes memory to execute the query but regular not. Thanks
I'm a US citizen and I wish to travel from Dallas to Toronto to Boston. I assume that I'll need my passport for this trip – Is this correct? And how much time (roughly) will it take to go through immigration and customs in Toronto and Boston?
I have Python 2.7 installed, Im looking at trying tensorflow and for windows it looks like it only works on python 3.5, I downloaded the python installer and it is apparently installed, but where? Python 2.7 has a Python27 directory in C:, but I cant locate 3.5 anywhere. I tried the installer again and it asked if I wanted to repair or remove. EDIT: Im really trying to find pip3, which I assume is in the python35/scripts directory
I am trying to create a build with basic configuration on the slave node. Only command the needs to be executed from Execute shell option is doing ssh to the slave. While executing the build the following error is observed: Building remotely on slave 1 in workspace /home/jenkins/workspace/slave job 1 [slave job 1] $ /bin/sh -xe /tmp/hudson4772532626468045261.sh + ssh [email protected] Pseudo-terminal will not be allocated because stdin is not a terminal. Host key verification failed. Build step 'Execute shell' marked build as failure In order to solve the issue of Pseduo-Termial, added th
Basic nack provides facility to return negative acknowledgement for one or multiple messages. Basic reject has facility to return negative acknowledgement for only one message. Do we have any use case where we definitely need basic reject?
In legacy ASP.NET applications, *.config files cannot be downloaded by navigating to the URL. But the new convention is to use appsettings.json. Now, if I have a ASP.NET Core website called contoso.com and it's served by IIS from a directory called C:\inetpub\websites\contoso.com, and there is a file located at C:\inetpub\websites\contoso.com\appsettings.json... Is IIS smart enough to know not to serve this file over HTTP if someone navigates to https://contoso.com/appsettings.json?
I am facing a confusing problem trying to download image and open it with BytesIO in order to extract text from it using PIL & pytesseract. >>> response = requests.get('http://abc/images/im.jpg') >>> img = Image.open(BytesIO(response.content)) >>> img <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=217x16 at 0x7FDAD185CB38> >>> text = pytesseract.image_to_string(img) >>> text '' Here it gives an empty string. However if i save the image and then open it again with pytesseract, it gives the right result. >>> img.save('im1.jpg') >>> im = Image.open('im1.jpg') >>> pytesseract.image_to_stri
The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by exampling the file 'C:\Users\your-user-name\AppData\Roaming\Microsoft\VisualStudio\your-version-number.*\ActivityLog.xml'. Continue to show this error message? I've Tried these support methods: https://stackoverflow.com/a/40418814 https://stackoverflow.com/a/23646013 Though I am getting no luck. Any hep will be appreciated