on-internet

Compilar y ejecutar proyecto Java desde terminal da No se ha encontrado o cargado la clase principal

estoy intentando compilar y ejecutar un proyecto Java desde la terminal de Windows, tengo una carpeta .\lib con varios .jar Para compilar utilizo el siguiente comando: javac -encoding UTF-8 -d .\bin -cp .\src .\src\partida\Partido.java Me compila sin errores Pero me da error al ejecutarlo con la siguiente instrucción: java -cp .\bin .\Partida\Partido** Me da el error: No se ha encontrado o cargado la clase principal .\Partido.java Tengo también en la carpeta .\lib unos .jar, pero no se como pasar esto al classpath en la compilación, he probado con esto pero no funciona; javac -encoding UTF-8 -

Join the discussion →

ARM WFI won't sleep

I am trying to enter standby mode on a Cortex-M4. The normal behaviour is that the device wakes up about every two minutes, but on my latest firmware release, it seems that the code is "randomly" stuck. After investigation, it seems that the code passes the WFI instruction without going to standby (no standby => no reset => infinite loop => ... => 42). So after many unclear specification readings, my understanding is that the WFI instruction may not go to sleep if there are pending interrupts. Can you confirm the last sentence? How can I ensure all pending interrupts are cleared before calling

Join the discussion →

String was not recognized as a valid DateTime while converting json to objects

I am trying to de-serialize a json object but getting this error, here is my call code. I am not exactly sure what has changed in my code, this use to work just fine before from what I remember. var serializedCriteria = JsonConvert.SerializeObject(criteria, new RawJsonConverter()); var request = new HttpRequestMessage() { RequestUri = new Uri($"{urlBase}/events/search"), Method = HttpMethod.Post, Content = new StringContent(serializedCriteria, Encoding.UTF8, "application/json"), }; var response = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result; var serializer = new D

Join the discussion →

How to store null value in hdf5 table?

I want to store null value in hdf5 file. h5file = tables.open_file("demo.h5", mode="w", title="demo") group = h5file.create_group('/', 'depth','Dept Data information') table = h5file.create_table(group, 'readout', depthdata , "depth data") row_data = table.row for i in range(len(record['local_timestamp'])): if record['bbno1'][i] is '': row_data['bbno1'] = NaN else: row_data['bbno1'] = record['bbno1'][i] I used these code but its not work. I used NaN and NULL but its not work.

Join the discussion →

how to group in sap.ui.table.Table

I want to group the rows of the table based on a property in sap.ui.table.Table I tried using how we do in sap.m.table. But it is not working. <ui:Table rows="{ path : '/EtyVacStockItmSet', sorter : { path : 'FacilityType', group : true }}" selectionMode="Single" ariaLabelledBy="title" id="productsTable">

Join the discussion →

AttributeError: 'module' object has no attribute '_create_unverified_context'

I got the following error AttributeError: 'module' object has no attribute '_create_unverified_context'. I'm using Python 3.4.2 . My code: import ssl ssl._create_default_https_context = ssl._create_unverified_context When I run this code, the error happens._create_unverified_context can be used in Python 3.4.2, so I really cannot understand why this error happens. How should I fix this? Traceback says Traceback (most recent call last): File "quickstart.py", line 3, in <module> ssl._create_default_https_context = ssl._create_unverified_context() AttributeError: 'module' object has no attribute

Join the discussion →

Python Tkinter random generating the colors?

from tkinter import * import random tk = Tk() canvas = Canvas(tk, width=400, height=400) canvas.pack() for x in range(0, 40): x1 = random.randint(0,400) y1 = random.randint(0,400) x2 = random.randint(0,400) y2 = random.randint(0,400) x3 = random.randint(0,400) y3 = random.randint(0,400) my_triangle = canvas.create_polygon(x1, y1, x2, y2, x3, y3,\ fill =("blue"), outline="red") Hi! I am playing with tkinter and generating random triangles. The problem is: I want to use random on fill = " " to generate random colors random.randint(start, end) returns numbers, but fill accepts only strings like f

Join the discussion →

Checking version of OpenCV (cv)

I was checking the version of OpenCV installed previously in a system. I tried to check using from cv2 import __version__ Its gave me the following error No module named cv2 When I tried import cv, it's not giving me error. Is there a way to know the version?

Join the discussion →

What are the dimensions for Chinese visa photos?

The Chinese government has a really specific list of requirements for visa photos: I had an old unused photo from last time I applied for a visa or passport, and compared it to the requirements (decided not to use it because it was damaged). It seemed to match most of the requirements, except that it seems that they want a photo which isn't square: The required width is less than the required height. Assuming most drugstores are still providing square passport photos, the question becomes: Should I cut the photo to match the specified width? What adds to the confusion is if you look at the vis

Join the discussion →

Swagger-ui anchor link to model definitions

Is it possible to access a model definition of via swagger-ui directly via an anchor? In the example page http://petstore.swagger.io/ I see that the anchor works for a groups of endpoints, e.g. http://petstore.swagger.io/#/pet. Hovering the mouse over a model description shows me an anchor (e.g. #/definitions/Category for the Category model), but http://petstore.swagger.io/#/definitions/Category does not bring me there. If I inspect the elements, I see a real link to anchor pet: <a class="nostyle" href="#/pet"><span>pet</span></a> while for Category this is a model-hint: <span class="model-hin

Join the discussion →

How to change Apple Map (MKMapView) background colors?

I've Required an iOS application with a black theme, and would really like to make the displayed Apple Map also in black colors. I see nothing in the native documentation that talks about changing look for MKMapView. I've Googled the topic and tried to change MKOverlayView.But, I couldn't find anything. Is this even possible? Can I change the background colors of the Apple Map. Thank you.

Join the discussion →

Windows c++ service faulting on ucrtbase.dll when starting

So I've been developing this program for a while now... Its meant to act as an asset manager (and potentially more in the future) for our IT team. I have 2 services which we'll refer to as "Manager" and "IAM" for right now. The "Manager" does all things managerial for all services (currently only the inventory asset manager known as "IAM") such as automatic updates, etc., while the asset manager does its job. Anyways, its been working great for a while now. Recently I implemented an automatic updating feature (actually still needing to be tested and likely debugged). While doing this, I needed

Join the discussion →

Java - Run Web Application with Swing GUI

We've developed a Java web application in Eclipse with a Swing GUI, all part of the same Eclipse web application project. We now want to be able to run the application outside an IDE, for example as a WAR or JAR file. We tried to deploy the application as a WAR using Tomcat and accessing it through the browser and the server is running but the GUI doesn't show up, naturally. Is there some way, preferably as simple and fast as possible, to be able to run the web application and at the same time have the GUI appear and be able to interact with it, the same way we did through Eclipse?

Join the discussion →

Error: Carthage not found. Install using `brew install carthage`

I am trying to do a UIAutomation using Appium and using Eclipse IDE and whenever I try to run the code through a testng.xml file, it fails to install WebDriverAgent on Phone/Simulator. If I run the same code without using XML file it works fine without issue. Here are the logs: Error: Carthage not found. Install using `brew install carthage.` at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13) at checkForDependencies$ (../../../lib/wda/utils.js:59:9) at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionProto

Join the discussion →

How can I print something on the client console from a react component?

I do not know if I gave myself to understand for example in the file server / main.js place something like this Meteor.startup (() => { console.log ('where am I'); // example of collection and map }); and you can see the message but within an extended react component how can I do it or would I have to import some method?

Join the discussion →

OpenCV 3, Error when run the project with fontQt?

When I compile the project no errors, but when i run the project i have a problem with fontQt. OpenCV Error: The function/feature is not implemented (The library is compiled without QT support) in fontQt, file /home/developer/opencv/modules/highgui/src/window.cpp, line 507 terminate called after throwing an instance of 'cv::Exception' what(): /home/developer/opencv/modules/highgui/src/window.cpp:507: error: (-213) The library is compiled without QT support in function fontQt Aborted (core dumped) #include <iostream> #include <string> #include <opencv2/opencv.hpp> using namespace std; using nam

Join the discussion →

Can never get all dependencies for opencv on raspberry pi 3

I've been trying everything to install dependencies for opencv. First I wen through the tutorial: https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/ After doing this I was still left with over 100 unmet dependencies so I ran sudo apt-get build-dep opencv --fix-missing This returned: Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: texlive-base texlive-fonts-extra 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. 117 not fu

Join the discussion →

Need help defining correct types from react-leaflet for typescript

I have a 'first' project trying to use react-scripts-ts and react-leaflet. I am trying to create the following class which seems like ti should be straight forward: import {map, TileLayer, Popup, Marker } from 'react-leaflet'; class LeafletMap extends React.Component { constructor () { super(); this.state = { lat: 51.505, lng: -.09, zoom: 13 }; } render() { const position = [ this.state.lat, this.state.lng]; return ( <Map center={position} zoom={this.state.zoom}> <TileLayer url="http://{s}.tile.osm.org/{z}/{x}/{y}.png" attribution="&copy; <a href='http://osm.org/copyright'>OpenStreetMap</a> co

Join the discussion →

Unsatisfied Dependency Exception in creating beans using Spring

I'm trying to use JPA for my spring application. I have integrated the JPATransactionManager & LocalEntityManagerFactoryBean into AppConfig class. Now, when I try to call one of the method which is in DaoImpl, the AppConfig is not able to Autowire the classes. Here is my code Test Class public class Test { public static void main(String[] args) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class); BbDao personService = context.getBean(BbDao.class); personService.getDealByDealId("0194541605021NJMAPFU"); context.close(); } } AppConfig @Configurat

Join the discussion →

Multiple search in database Codeigniter [duplicate]

I am trying to query multiple condition using codeigniter but the return query not showing correct results. //search public function search_autocomplete_album_data($data,$userid) { return $this->db->where("userid", $userid)->like('album', $data)->or_like('album_id', $data)->where("type", "music")->or_where("type", "video")->limit(5)->get("media"); }

Join the discussion →

Gauss-Jordan Elimination in python

I am working on code to do Gauss-Jordan elimination in python. My directions are as follows: def gauss_jordan(A): for each row k do i* <- argmax_{k<i<n} |A_{ik}| if A_{i*k} = 0 then Matrix is not invertible end if Swap rows k and i* for each row j below k (i.e. j = k + 1,...,n) do f = A_{jk}/A_{kk} Aj = Aj - fA_{k} end for end for for each row k = n,..., 1 (i.e. in reverse) do A_{k} = A_{k}=A_{kk} for each row j above k (i.e. j = k -1,..., 1) do f = A_{jk}/A_{kk} Aj = A_{j}-fA_{k} end for end for So far I have: def gauss_jordan(A): (h, w) = (len(A), len(A[0])) for y in range(0,h): for pivot in

Join the discussion →

Cannot get Jedis connection, Could not get a resource from the pool

I am creating a Web Application and using Redis for data storage. I have used JedisPoolConfig (redis client-jedis version 2.9.0) . So when I test my application with help of Apache Jmeter with following configurations : Number of threads(Users): 30 Ramp-Up period(in seconds) : 0 Loop-Count : 1 and JedisPoolConfig with following configurations : redis.sentinel.enable=true redis.sentinel.ip=localhost redis.sentinel.port=6379 redis.instance.account.masterName=master redis.pool.max-active = 20 redis.pool.max-idle = 10 with this code (which is created as Bean on startup of Spring Application) : Jed

Join the discussion →

How to run tslint using Angular Cli?

I am facing issue when I am trying to run tslint from Angular Cli. > ng lint Error Failed to load E:\Projects\lsp-ui\node_modules\ng2-slimscroll\tslint.json: Could not find custom rule directory: E:\Projects\lsp-ui\node_modules\ng2-slimscroll\node_modules\codelyzer [Error while running]

Join the discussion →

FAILED CONFIGURATION: @BeforeTest beforeTest . MAVEN; TestNG, Selenium

Hi I'm trying to run Selenium script with Maven, TestNG in Eclipse. First I right click on my project and select TestNG | Convert to TestNG(testing.xml is created). Then I go to the Run Configurations and create a new launch TestNGl and click Run. When run it I got this error: [RemoteTestNG] detected TestNG version 6.11.0 FAILED CONFIGURATION: @BeforeTest beforeTest java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version c

Join the discussion →

Split PR into two PRs by files

I have a Pull Request with six files, call them: A, B, C, X, Y, and Z. None of this is merged to master, but the local branch has been pushed to the remote on GitHub. There are many, many commits that touch any and all of these files. Some commits touch only one file. Some touch all six. I want to create two new PRs. One PR contains files A, B, and C with all the changes from all the commits. The other PR contains X, Y, and Z with all the changes to those files from all the commits. I don't care what happens to the commit history or branches. All commits will be squashed before merge and all w

Join the discussion →

Pivot table Calculated field - Sumif(s) between two dates?

I'm attempting to calculate periods of out of stock for a fleet of rental equipment that has been in service for the past few years. I'm having trouble creating a sumif calculated field that sums units by date if date is between start and finish. My data looks like this: Calendar |Start |Finish |Product |Units 2015-12-06|2015-12-6|2015-12-6 |Snowshoes |2 2015-12-07|2015-12-6|2015-12-7 |Snowshoes |1 Calendar - is a helper column I've added. It's sequential dates from launch to the present Start - is the start Date of a rental booking Finish - end date of the rental booking Product - What's bein

Join the discussion →

.dll is not a valid win32 application

Hi I am having an issue with my word addin .net project. Basically I am trying to compile and run it. However I keep getting an error message saying Now I have looked into this and according to other users on stack I need to change my build property to any cpu which I have done to no avail Can someone advise me please on what to do here because I don't know what's wrong? Thanks very much

Join the discussion →

Robocopy copy files source to destination date range

I am trying to copy the folders and files created between the date range. But this following command looks like copying everything from the source ignoring the date range. What could be wrong? robocopy c:\source c:\destination /E /dcopy:t /MAXAGE:20100101 /MINAGE:20110101

Join the discussion →

What does this error mean? Can't locate Date/Parse.pm in @INC

I have code to calculate the difference between 2 given timestamps: Start_Time="2017-09-19 19:36:12.763" End_Time="2017-09-19 19:36:22.72" I want to get the difference between the timestamps considering the milliseconds. This is what I tried: #!/usr/bin/perl use strict; use warnings; use Date::Parse; use Date::Format; $startdat = "2007-11-17 12:51:22"; $stopdate = "2007-11-17 12:52:22"; my ($years, $months, $days, $hours, $mins, $secs) = split /\W+/, $startdat; my ($yeart, $montht, $dayt, $hourt, $mint, $sect) = split /\W+/, $stopdate; my $times = timelocal($secs,$mins,$hours,$days,$months,$ye

Join the discussion →
Older stories