Always getting following error after couple of SQL statement execution. I am using var sql = require("mssql"); (node:12240) [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.Socket instead. warning.js:18 (node:12240) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ConnectionError: Failed to connect to Server-100:undefined in 15000ms warning.js:18 (node:12240) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a
I have a linux system where I have installed dockers. I also have a registry on azure for which I have the user name and password. To get a list of docker images from a private registry we can simply use curl command like below: curl localhost:5000/v2/_catalog This command I tested when I installed private registry on my machine and it was giving me the list of images which I have in the registry. Now I have azure registry. I can login to it successfully but don't know what command I can run to get the list of docker images. Is this possible.? For example, if I run: curl myregistry.azurecr.io/
I am supposed to read some data (specifically string datatype) and store each element in a vector. Now I have to check if any of the different strings that were inputted match in size, and if they do I have to see if there are any matching letters. Now my question is how do I compare what's inside the vector (first the size and then the different letters). Is it possible? Say I have HELLO and HELLA They have the same size, and 4 letters that match. This is what I am trying to accomplish. The code that I have does not work given my ignorance about the matter. vector <string> myVector; //insert
Our systems are changing over to cloud storage so our personal drives will be vanishing soon, therefore I need to save applications to users OneDrives. This is new territory for me and what I am reading online is not making much sense. This is what I have so far: Set FileSystemObject = CreateObject("Scripting.FileSystemObject") Dim FileExistsbol As Boolean Dim stFileName As String Dim CopyFrom As String Dim CopyTo As String stFileName = "C:\Users\" & Environ("UserName") & "\OneDrive - Company" stFileName = Trim(stFileName) FileExistsbol = dir(stFileName) <> vbNullString If FileExistsbol Then K
I want to migrate from gradle to maven I tried and build successfully but I am facing issue while running my application I took this gradle project https://github.com/spring-projects/spring-security-kerberos from git, its working fine as gradle project. But my requirement is maven project please tell me how I can do it.
I normally use fakeAsync to test a subscribe returning an observable. But on this rare occasion, I need to do the same but for a promise. This is my attempt: //Service Stub: const testService = { testMethod: jasmine.createSpy('testMethod').and.callFake(() => new Promise(() => 'test')) }; it('test example',() => { // Arrange const response = 'test'; component.selected = undefined; // Act component['myMethod'](); //Assert expect(component.selected).toEqual(response); }); This is my actual code: private myMethod(): void { return this.testService.testMethod() .then((response: string) => { this.sel
I am facing the issue "when I commit the code to local respository success, then I can't push the code from eclipse to git repository...". I'm attaching the screenshot: How can I get past the error message? Can't connect to any repository: https://gitee.com/JinJiaoJingTong/SanPin.git (https://gitee.com/JinJiaoJingTong/SanPin.git: cannot open git-receive-pack)
I am running R 64 bit on windows 7 64 bit. While running my script, I get an error message that cannot allocate a vector of size x (in my case about 200MB). My data.frame has about 200.000 rows, not more. How can it happen that there is not enough storage space to allocate another vector? I know that the operation itself works since the script runs through with a smaller, subsetted file. I know too that this question has been asked before but none of the answers solved my problem. there are many different answers out-there which one is correct? Is it related to the RAM of the system or of the
I am trying to figure out how to fetch a single value from a UserID and print it in the console. My current piece of code keeps returning "None" even though there is a value for Currency for the UserID I am searching. cursor.execute("SELECT Currency FROM ServerUsers WHERE USERID = %s" % (userid)) if cursor.fetchone(): a = cursor.fetchone() print(a)
I'm trying to setup hibernate + spring for my demo project with using JNDI. For this purposes, I selected Baeldung manual. But there is an error (see stack trace in the end). Any of same topics didn't help me. Any ideas how to fix it? Db connection testing My Steps: 1 Open and add resources in [tomcat_home]/conf/server.xml file Tomcat server.xml file content <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --> <GlobalNamingResources> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource name="UserDatabase" auth="Co
Setup Simple server and client applications running locally. Server endpoint receives a POST request with a sleep time to simulate work. Client is a SpringBoot app using RestTemplate for HTTP calls. Simulating a 500ms delay at the server per request and issuing 700 multi-threaded requests. Problem On quick consecutive executions of the client program, I get java.net.SocketException: Connection reset. Stack trace: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:8081/server/site": Connection reset; nested exception is java.net.SocketExcepti
At the moment I have Database_One and Database_Test, both SQL Server databases. Database_One represents my User's data that I shall not be modifying. Database_Test represents a replica of Database_One, but has test data that I edit whilst I am developing. In the future I may have Database_Two, Database_Three etc as more clients use my program. Currently if I need to add a column to a table in Database_Test, I would need to add it to all other databases individually, manually. I would rather have a system where all databases are replicas of a master database, but have their own data. So that if
I have two microservices that communicate each other thru gRPC, A is the RPC client and B is the RPC server, both written in NodeJS using grpc NPM module. Everything is working fine until, at some point in time, unexpectedly A stop being able to send requests to B, it fails because of a timeout (5s) and throw this error: Error: Deadline Exceeded Both microservices are Docker containers, run on AWS ECS and communicate thru AWS ELB (not ALB because it does not support HTTP2 and some other problems). I tried to run telnet from A to the ELB of B, both from the EC2 instance and from the running ECS
I try to make my first steps using React Native. Development for Android (on Windows host) works. Now I wanted to test iOS, and tried to set up a development environment on a MacBook Pro. Problem: React Native starts the iOS simulator, and then nothing happens any more. The simulator runs OK, but my React Native app won't start. What do I need to do to get my React Native installation going? More Info: I set up Xcode and React Native according to the docs on the MacBook Pro running OS X 10.13.2 (High Sierra). Xcode was installed and tested successfully, including the simulator. When I installe
I'm using a disassembler (SmartDec: http://decompilation.info/) and the many of the instructions in the generated disassembly look similar to this: mov rax, [rip + 0x32b5]:64 I'm unfamiliar with the :64 part of this instruction. What does it mean? Other examples: cmp [rcx + r8 * 0x8]:64, 0x0 mov eax, [rip + 0x592a]:32 jmp [rip + 0x6bad]:64 This disassembler doesn't show the corresponding machine code, so I used a hex editor and looked up the address that it said this instruction was at: 1665: mov rax, [rip + 0x19a4]:64 This is what was there, 16 bytes worth, in Little Endian: 54 00 00 49 89 E8
I am trying to set up a PHP application but something seems to be wrong with session handling. As you can see the configuration is quite standard. I checked the /tmp permissions from the container and got root@2217e6d458ad:/# ls -ld /tmp drwxrwxrwt 1 root root 4096 Dec 28 08:03 /tmp I also checked in runtime following snippet: $file = fopen('/tmp/foo.log', 'w'); fwrite($file, 'test'.PHP_EOL); fclose($file); echo 'path: '. session_save_path().'<br>'; var_dump(is_writable(session_save_path())); Now, the file /tmp/foo.log was created, the path was empty but the var_dump results with bool(false).
When I use perf to collect system stats, like this sudo perf record -a -g -F 997 -p pid sleep 30 then I got Error: You may not have permission to collect stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid: -1 - Not paranoid at all 0 - Disallow raw tracepoint access for unpriv 1 - Disallow cpu events for unpriv 2 - Disallow kernel profiling for unpriv I have no permission to modify /proc/sys/kernel/perf_event_paranoid, even in root. I try to add "kernal.perf_event_paranoid=-1" into /etc/sysctl.conf, and use sysctl -p to reload params. Again I have no permission to load param kernal.p
I run this command in my macOS $ perl ~/Desktop/blif2cnf.pl and got this error info: Can't locate getopts.pl in @INC (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Users/Frank/Desktop/blif2cnf.pl line 10. In my linux 16.04, such problem can be solved by following this answer I
After adding gradle to an existing Kotlin project in IntelliJ, I started having issues with references to some standard library elements. For instance, Kotlin String type is recognized, but the mutableMapOf is giving me Error:(11, 60) Kotlin: Unresolved reference: mutableMapOf another is: Error:(9, 78) Kotlin: Unresolved reference: Array during compilation. They are marked red in the IDE, as well (not isolated to only compilation) Another error that appears in IntelliJ is Kotlin not configured, with no options to configure Kotlin Here is my gradle build file: apply plugin: 'kotlin' group = "co
Hi I am using RestClient from RestSharp nuget package, but I found it does not implement IDisposable. So do I need to dispose it or how to dispose it? The example codes are from Mailgun api: RestClient client = new RestClient (); client.BaseUrl = new Uri ("https://api.mailgun.net/v3"); client.Authenticator = new HttpBasicAuthenticator ("api", "YOUR_API_KEY"); RestRequest request = new RestRequest (); request.AddParameter ("domain", "YOUR_DOMAIN_NAME", ParameterType.UrlSegment); request.Resource = "{domain}/messages.mime"; request.AddParameter ("to", "[email protected]"); request.AddFile ("messag
I am pretty much new to java and groovy. I have installed groovy 3.0 on my windows 10 laptop (64 bit) and when tried to run groovy getting following warning: >groovy -v WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/groovy-3.0.0-alpha-1/lib/groovy-3.0.0-alpha-1.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective a
Can anyone let me know how to write a CASE STATEMENT like in SQL but in a Jaspersoft 6 report? More precisely inside the expression editor. For example: CASE ProductLine WHEN 'R' THEN 'Road' WHEN 'M' THEN 'Mountain' WHEN 'T' THEN 'Touring' WHEN 'S' THEN 'Other sale items' ELSE 'Not for sale' END
I have a recursive CTE written in SQL server which i need to migrate to HIVE. As hive does not support recursion in CTE, i am stuck here. i am advised to write a java UDF for this but i am not expert in java. If anyone could help here, i would be great. Code(SQL server) : WITH CTE_CATEGORY_TREE AS ( SELECT CT.seq , CT.[name] , CT.pseq , convert(varchar(255), CT.seq) AS [sort] , convert(nvarchar(255), CT.[name]) AS [depth_fullname] FROM [dbo].[table1] AS CT WITH(NOLOCK) WHERE CT.pseq = 0 UNION ALL SELECT PC.seq , PC.[name] , PC.pseq , convert(varchar(255), convert(nvarchar,CT2.sort) + N' > ' +
I am running the below code in spark to compare the data stored in a csv file and a hive table. My data file is about 1.5GB and about 0.2 billion rows. When I run the code below, I am getting GC overhead limit exceeded error. I am not sure why I am getting this error. I have search various articles. The error comes at Test 3 step sourceDataFrame.except(targetRawData).count > 0 I am not sure if there is any memory leak or not. How can I debug and resolve the same? import org.apache.spark.sql.hive._ import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spa
I have a problem with loading a JSON file from a resource file. Here is my code: public void setConfiguration() { try { ClassLoader cl = this.getClass().getClassLoader(); ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(cl); Resource[] resources = resolver.getResources("classpath*:/configuration.json"); if (resources.length == 0) { log.warn("Configuration could not be loaded from file! Using " + "default configuration."); configuration = getDefaultConfiguration(); } for (Resource resource : resources) { configuration = new ObjectMapper().readValue( resource.getInputSt
i have made sender class using kafkatemplate bean to send payload to topic with some configuration in SenderConfiguration class . Sender Class @Component public class Sender { private static final Logger LOGGER = (Logger) LoggerFactory.getLogger(Sender.class); @Autowired private KafkaTemplate<String, String> kafkaTemplate; public void send(String topic, String payload) { LOGGER.info("sending payload='{}' to topic='{}'", payload, topic); kafkaTemplate.send(topic, "1", payload); } } , senderConfiguration class @Configuration public class SenderConfig { @Value("${kafka.bootstrap-servers}") privat
I have a dataframe where A and B is used to predict C: df = df[['A', 'B', 'C']] array = df.values X = array[:, 0:-1] Y = array[:, -1] # Feature Importance model = GradientBoostingClassifier() model.fit(X, Y) print ("Importance:") print((model.feature_importances_)*100) # PCA pca = PCA(n_components=len(df.columns)-1) fit = pca.fit(X) print("Explained Variance") print(fit.explained_variance_ratio_) This prints Importance: [ 53.37975706 46.62024294] Explained Variance [ 0.98358394 0.01641606] However, when I changed the dataframe position swapping A and B, only the importance changed, but the Exp
I loaded google's news vector -300 dataset. Each word is represented with a 300 point vector. I want to use this in my neural network for classification. But 300 for one word seems to be too big. How can i reduce the vector from 300 to say 100 without compromising on the quality.
I have a macro that opens multiple files. If it comes to a file "Locked for Editing" it will give me an error saying FileName is currently in use. Try again later. How can I make it open said file as read only? I tried: Workbooks.Open FileName:=Selected_EOS_Report_File, ReadOnly:=True and Workbooks.Open FileName:=Selected_EOS_Report_File, ReadOnly:=True, IgnoreReadOnlyRecommended:=True Update: The first method does work. My code runs on multiple files that pass through the "Selected_EOS_Report_File" variable. At some point a file passed through that was an Excel temp file (begins the filename
I'm using laravel 5.4, And I need to open an endpoint for 'createUser'. "LoginController.php" public function createUser(Request $request) { $data=$request->only('email','name','position'); $validate=Validator::make($data, [ 'email' => 'required|email|unique:users', 'name' => 'required', 'position' => 'required', ]); $exUser=User::where('email','=',$request['email'])->first(); $nameUser=User::where('name','=',$request['name'])->first(); if(empty($exUser)) { if(empty($nameUser)) { $user=new User(); $user->name=$request['name']; $user->email=$request['email']; $user->position=$request['position'