I am running centos6 Python 2.6 and am trying to install pywinrm but not am not successful. I have also tried: pip install http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm but the link is broken (archive folder removed) Installed Packages python.x86_64 2.6.6-64.el6 @anaconda-CentOS-201508042137.x86_64/6.7 The pip install shows the following: [root@linux-s3-vm1 ~]# pip install pywinrm Collecting pywinrm Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolutio
How can i push to specific branch in remote with GIT gui. I can't seem to find an option for it. Let say i want to push to a specific branch name 'branchOne'. How could it be done? I am pushing to gitlab.
I am new to AngularJS and i work Laravel. When i fill my input fields with Laravel form model binding, and i set ng-model="title" on input field, AngularJs clears populated input and sets it's value to ''; When i comment ng-model="title", field is populated. on page load for few miliseconds input field is populated, and i think when AngularJS initializes $scope, input fields become empty. I have not any controller in angular and when i add angular to page this problem appears. How can i prevent angular from clear input fields, that are filled for edit action?
I have been trying to find a solution for some weeks now, and I have read all the threads related to this topic, so I hope someone can help me out with this. I want to use a wave file as input, apply a Fourier transform to it, and take these values to compare them to another file and get the difference. The challenge I've been working on for so long is to get that Fourier transform to work. Instead of giving me reasonable results, I only get NaN values. I have the following code: public FFTPerformer(float[] soundvalues) { buffer = new System.Numerics.Complex[4096]; try { for (int i = 0; i < 40
this div contains a link to open popup with bootstrap glypicon <div class="panel-heading" id="divHeading"> <div class="panel-title"> My Header <a href="#" id="lnkPopup" data-toggle="modal" data-target="#bs-example-modal-lg"> <span class="glyphicon glyphicon-briefcase pull-right" id="spOpenWindow"></span> </a> </div> </div> The initial page load should disable the link. $(document).ready(function () { $("#lnkPopup").off(); }); but its not removing the click property, any idea?
I'm trying to arrange a series of elements in a different layout for "mobile" screens vs large screens. Basically, on mobile screens I want a title to span the entire width at the top, centered. Underneath is an image and a group of icons to the right in the same row. On larger screens I want the title to be adjacent to the image in the same column, but above the icons (see image for desired results). By playing with the flexbox rules and the order property, I can achieve 2/3 of this effect. The way I have it written, I can get the title next to the image, but the icon group is always undernea
I can easily create a VPN connection through the PowerShell command Add-VpnConnection, however it doesn't seem able to specify any credentials (there is no option to specify username/password). As a workaround I tried to use -RememberCredential option in Add-VpnConnection and to pass the credentials by forcing a connection through rasdial command, yet even though the connection succeeds Windows doesn't save the credentials :( Add-VpnConnection -Name xxxxx ... rasdial xxxxx user password rasdial xxxxx /disconnect Is it possible some way ?
I'm using the Medoo database Framework. The following query returns a PDO object. $datas=$database->query(' SELECT lethal_servers.LETHAL_ServerName AS "lethal_servers LETHAL_ServerName", lethal_servers.LETHAL_ServerID AS "lethal_servers LETHAL_ServerID", lethal_servers.LETHAL_ServerPort AS "lethal_servers LETHAL_ServerPort", lethal_user.LETHAL_UserName AS "lethal_user LETHAL_UserName" FROM ( ( lethal_servers AS lethal_servers INNER JOIN lethal_server_user AS lethal_server_user ON (lethal_server_user.LETHAL_ServerID = lethal_servers.LETHAL_ServerID ) ) INNER JOIN lethal_user AS lethal_user ON (
I'm using the Medoo database Framework. The following query returns a PDO object. $datas=$database->query(' SELECT lethal_servers.LETHAL_ServerName AS "lethal_servers LETHAL_ServerName", lethal_servers.LETHAL_ServerID AS "lethal_servers LETHAL_ServerID", lethal_servers.LETHAL_ServerPort AS "lethal_servers LETHAL_ServerPort", lethal_user.LETHAL_UserName AS "lethal_user LETHAL_UserName" FROM ( ( lethal_servers AS lethal_servers INNER JOIN lethal_server_user AS lethal_server_user ON (lethal_server_user.LETHAL_ServerID = lethal_servers.LETHAL_ServerID ) ) INNER JOIN lethal_user AS lethal_user ON (
People, the company where I work has some MySQL databases on AWS (Amazon RDS). We are making a POC with BigQuery and what I am researching now is how to replicate the bases to BigQuery (the existing registers and the new ones in the future). My doubts are: How to replicate the MySQL tables and rows to BigQuery. Is there any tool to do that (I am reading about Amazon Database Migration Service)? Should I replicate to Google Cloud SQL and than export to BigQuery? How to replicate the future registers? Is possible to create a job inside MySQL to send the new registers after a predefined number? F
I came across this looking at the source for some physics animations in JavaScript found here on github where he's written this if (this._position < 0) this._position /= 3; A quick Google yielded nothing, anyone know?
I have seen very many questions asking how to detect if a device is mobile or not. Generally, they fall into 3 categories: Check the screen size/viewport Check the User Agent Use a library, such as Modernizr to work around browser capabilities. After implementing what I could, I still run across a situation which I have never seen asked or addressed; On many mobile browsers, there is a "Request desktop site" (Chrome) "Desktop Mode" (Dolphin) or "Desktop View" (HTC Sense). I have chosen strategy #1 above, which works unless the page is viewed in desktop mode. Implementing #2 has drawbacks (spoo
I want to make a multiple where query with AND and OR. Suppose my array is: array (size=8) 0 => array (size=2) 'timeline.type' => string 'videos' (length=6) 'timeline.sourceId' => string '7' (length=1) 1 => array (size=2) 'timeline.type' => string 'loadshedding' (length=12) 'timeline.sourceId' => string '5' (length=1) 2 => array (size=2) 'timeline.type' => string 'news' (length=4) 'timeline.sourceId' => string '3' (length=1) 3 => array (size=2) 'timeline.type' => string 'news' (length=4) 'timeline.sourceId' => string '5' (length=1) The above array could be dynamic. I want to make active record
I would like to know if anyone wrote code in Python that simulates CPU and memory stress. I saw code loading the CPUs, but how can I force them to work on 90% usage?
I'm trying to architect an application using CQRS pattern instead of Repositories and Onion architecture instead of n-layers using MVC5 stack. I have the following layers right now: Web.Data - Contains DbContext Web.Model - POCO classes Web.Service - Implementation of Commands and Queries using MediatR --Commands -----Request -----Handlers --Queries -----Request -----Handlers Web.UI I was thinking to put the Business Logic (e.g validations) on the Handler classes but I recon that those classes have direct access to EF. Is it still a good place to put those logic? How about if I have an Emailin
I'm trying to make a simple JMS client application for Websphere MQ 7.5 I already have ".bindings" file with connection factory and destination, which I'm trying to connecto to. This is my simple Java code, that I'm trying to run on mac: package com.company; import javax.jms.ConnectionFactory; import javax.jms.Destination; import javax.naming.Context; import javax.naming.directory.InitialDirContext; import java.util.Hashtable; public class Main { public static final String cfLookup = "TEST12"; public static final String icf = "com.sun.jndi.fscontext.RefFSContextFactory"; static String url = "f
Within a multi tenant app, I have two choices to expose my resources: api.myapp.com/customer/{id} api.mayap.com/{tenant}/customer/{id} I am wondering about the pros and cons of exposing the tenant name. In the first case the tenant name is given as a header field, and in the second directly within the URL. On one hand I do want to have the cleanest and simplest possible URL structure. Since all resource IDs will be UUIDs, having the tenant namespace seems redundant. On the other I am not sure if having the tenant name exposed in the URLs will make caching easier or any other factor I have not
I am writing a Ruby script to connect to a REST API website. The website is authenticated by using LDAP / SSO using the AD credentials, so no basic authentication or user/password has to be provided. This is the code so far: resource_http = Net::HTTP.new(webserver.company.com, 443) resource_http.use_ssl = true resource_http.verify_mode = OpenSSL::SSL::VERIFY_NONE resource_request = Net::HTTP::Post.new("/api/endpoint") resource_request.set_form_data({"chocolate"=>"yes","beer"=>"yes"}) resource_response = resource_http.request(resource_request) But I receive an authorization error: Net::HTTPUnau
I am trying to deploy a django project using nginx and gunicorn. I followed this tutorial. Gunicorn is able to run my project but nginx is not serving static files. My nginx conf: server { listen 80; server_name 69.12.74.39; location / { proxy_pass http://0.0.0.0:8001; } location /static/ { autoindex on; alias /home/ekodev/accounts/arham/ekomerz/static/; } } I checked the location of my static folder and its right. The gunicorn command i am using is: gunicorn ekomerz.wsgi:application --bind=0.0.0.0:8001 EDIT: On my local machine it works fine. server { listen localhost:8000; location / { proxy
I am developing a WAR project in Eclipse Mars which is running on a Tomcat 7 application server. I am also using the Java JSON API to create JSONObjects from a REST web service.I have ensured that my pom.xml file includes the JSON dependency so that the correct jar is downloaded. <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20151123</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl<
If I understand correctly URL.createObjectURL creates a URL that represents a file or a blob. Because the URL is just a string the browser has no way to know when you're finished with the resource that URL represents so there's a provided URL.revokeObjectURL function. MDN shows this example: var canvas = document.getElementById("canvas"); canvas.toBlob(function(blob) { var newImg = document.createElement("img"); var url = URL.createObjectURL(blob); newImg.onload = function() { // no longer need to read the blob so it's revoked URL.revokeObjectURL(url); }; newImg.src = url; document.body.append
I have installed node.js in windows 64bit and i run into this when runnig gulp on local project. another note: npm install went good with packages.json Error: Cannot find module 'lodash.assign' at Function.Module._resolveFilename (module.js:326:15) at Function.Module._load (module.js:277:25) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object.<anonymous> (D:\NBCredit_FRTE\RelyToolsSln\RelyTools.Web\node_modules\gulp-jshint\node_modules\lodash.clone\node_modules\lodash._baseclone\index.js:9:14) at Module._compile (module.js:410:26) at Object.Module._extensions..
I am trying to write a regular expression in Perl that matches a specific part of the file path. Input string: /usr/local/bin/mybinary Output it has to match to: /usr/local/bin My regular expression is: (\ /.*\ /) It is matching /usr/local/bin/, but the / after bin should be removed.
So i have code below which should check the value of the first drop-down selection menu with the id="country" and based on the value currently selected it will change the drop-down options of the second menu. Below is my attempt to solve this problem however it does not work :( any help? EDIT: I'm starting to think that the value of 'var country' is not being updated when it is manually changed, could it be that onChange does not work? i'm using chrome so it should be supported. <div id="forum2"> <form action="#forumhandler.php"> <fieldset> <legend>Shipping Calculator</legend> Country:<br> <se
I use Java Spring web controller And jackson for parsing responses. Also I have four Java Hibernate entities: User Filter Make Model, with bidirectional relation in Make -> Model(s): GeUser.getFilters().get(0).getModel().getMake().getModels().get(0).getMake()... I tried add @JsonIgnoreProperties(value = "models") in Model class but still get exception: WARNING: Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties disco
The MakeCert tool has the -eku option for describing the enhanced key usage object identifiers (OIDs) into the certificate. It allows to make the certificates for code signing and for other purposes. But it is not a cmdlet. New PowerShell versions have the New-SelfSignedCertificate cmdlet for local testing of the scripts. But it creates the certificate that can't be used for code signing: New-SelfSignedCertificate -DnsName www.SomeSite.com -CertStoreLocation Cert:\CurrentUser\My I don't see an option which is similar to -eku. How can I set the destination of my new self-signed certificate (cre
In my WPF app the user needs to select a folder, which path is in the company network. I use the System.Windows.Forms.FolderBrowserDialog and the following code gets executed on a button click event: FolderBrowserDialog fbd = new FolderBrowserDialog(); fbd.SelectedPath = "\\\\company.net\\data\\_Confidential"; DialogResult result = fbd.ShowDialog(); When the FolderBrowserDialog opens, the system automatically scans for other network devices and that causes the following problem: The network tree gets filled with other devices and causes my SelectedPath to scroll away. This is pretty annoying w