Newest Questions

Q&A for professional and enthusiast programmers

sql query using limit while considering duplicates

I'm using a query to get the top 3 records from a table using limit like so: select name, salary from employees order by salary DESC limit 3; The problem is there could be employees with the same ...

pushing a new remote branch gives error committer e-mail address does not match

With a command similar to git checkout label-xyz git push origin new-branch I get the following error remote: ERROR: In commit a7e4767a80e9b0730c8708973918c990af308a45 remote: ERROR: ...

How to press [Windows key] & [Tab] together using VB?

I've looked everywhere, I know that "{TAB}" is tab but I can't seem to find out how to press "{Windows key}". Someone please help?

drawing straight line which passes through a point in between

I need to draw a straight line from Point A to point C, which has to pass through point B somewhere in between. The problem is that I got coordinates of just A and B, not C. For point C I only has "x"...

Run method from class in for loop

I am new so I am sorry for the confusion between TypeScript and JavaScript. I am suppose to be writing in TypeScript currently. I am trying to run the method in my class through the for loop at the ...

Bbypass Modelstate value without clearing for Hidden Html Helper

I have a situation where it would behoove me to force the default value of a hidden input to be the passed value rather than the model state value. @Html.Hidden("Index", "me instead") This renders: ...

Completely new to pig latin

(O1231231,{(169.0,O1231231,2013-01-23T00:00:00.000Z,C9432910,Styles,Larry),(14.99,O1231231,2013-01-23T00:00:00.000Z,C9432910,Styles,Larry)}) I need to display single column views for the above bag in ...

ES6 Getter returning empty object

I have created a method that grabs the image data based on another method. As you can see the uploadAvatar() method stores the object back from Cloudinary into a constructor object this._userImage;. ...

Proper use of thread and display.asyncexe in java swt

I'm doing a program which needed a thread because It's not responding when the GUI start its work. I'd used thread but i don't know if the use of it is correct, also I'd used the display.asyncExeceach ...

Switch timezone base on array value

I'm getting an array with about 200 records, each record has a datetime and timezone, my question is, how do I display each date-time accordingly to the city/country that the information is display. ...

Run CMD as process in the background and starting external program. How do I know, if external program has exited

I start the CMD in the background as a process. With the process I start external programs. How do I know, if the external program has exited?

How to i get ruby to return json response to be used in rails controller

I'm working with an Api, so far so good i am able to send requests and receive response, but i want the ruby code to send the json response and message that can be accessible from my rails controller ...

How to use google calendar API in an extension

I am trying to make an extension that will display the next 10 upcoming events in a popup. I made a similar program in python, but now I want to make it in and extension. I am using chrome.identity ...

Rails Mailer - Can't access instance variable from Mailer View

I have a rails mailer that currently sends an email successfully anytime a user replies to another user's comment. (the email goes to the person who was replied to). I'm trying to add some dynamic ...

html/javascript page that files can be loaded to

I want to write a html file that can access files on my computer with gui like this one: https://smallpdf.com/pdf-to-jpg In the yellow box it says "choose file". you can click that and choose a file ...

Compare and reduce complex array of objects

I have a dataset which is an array of objects for some items in a database that has the details of how long it will take in estimatedDays for a specific item to be shipped: items : [ { id: '1'...

use if you like

errt[rkgl;,mgfdfddfdb dfdfdgdgggfrg kjn ] r0i0i0gi g g g with urllib.request.urlopen(asdaUrl) as url: AsdaData = url.read() with urllib.request.urlopen(sainsburyUrl) as url: ...

JAVA APPLETS: Help destroy method

I'm working with geometric shapes, there is a different case for each of them but every once in a while when the applet gets full of them the user needs to be able to clear the applet without exiting ...

Using Lucene's internal similarity system

We have a Lucene instance running on a big machine with lots of (millions of) documents indexed. So whenever I want to retrieve any document, I (programmatically) connect to the elastic search and ...

Location of Maven Home on Cloud Foundry

I have an application that programmatically runs Maven command "clean package" at runtime, using plugin maven-invoker. To be able to run this application on Cloud Foundry, we need to set Maven Home on ...

Iogear USB KVM - Windows 10 - loses mouse, keyboard when switching

I have a DELL PowerEdge running Windows 10 (upgraded) attached to an Iogear GCS24U 4-port USB KVM. Sometimes when I am switched to another computer, when I switch back the keyboard and mouse are "...

No module named _comb

Similar to this post, I also have scipy completed install on my local system (and I fully updated scipy via the following command, which executed successfully: pip install --upgrade scipy). But as ...

Iteratively picking the most relevant questions from DecisionTreeClassifier

I have trained a DecisionTreeClassifier from scikit-learn. I now want to use it to classify new observations interactively. User enters data and the program attempts to produce the result as soon as ...

mysql get rollup value

I want to ask about mysql with rollup only get rollup value, this is my code SELECT tbldept.CodeDept AS Dept, SUM(CASE WHEN tblemp.Status = '1' THEN 1 ELSE 0 END) AS headcount, SUM(CASE ...

SQL - Finding sequnce of events

I need some help identifying a sequence of events in SQL08. This is the sample data: ID | SampleTime | SampleValue | CycleNum 1 | 07:00:00 | 10 | 2 | 07:02:00 | 10 ...

how to create an array of list of pair in C++

list<pair<int, int>> *arr; int size; arr = new list<pair<int, int>>[size]; but the compiler raised an error: class list<pair<int, int>> is not compatible with ...

Reading web site and dowloading data in different files with R

Im reading data from this website http://weather.uwyo.edu/cgi-bin/sounding?region=samer&TYPE=TEXT%3ALIST&YEAR=1973&MONTH=01&FROM=0100&TO=2812&STNM=80222 using the readLines ...

How to bind UserProfilePhoto of TLuser to WPF Image in TLSharp

This my code to bind the UserProfilePhoto of TLuser. private void ContactsDataGrid_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { TLUser selectedUser = ...

How to find accuracy of model from hdf5 generated from keras?

I have trained a CNN model using keras and I saved its weight in HDF5 file. Now I want to see accuracy of my model, how can I find it? and how can I predict unlabled data using HDF5 ? Is it possible ...

Cannot create an instance of the abstract class or interface instantiate

I have a class , and when I try to instantiate the abstract class, I get an error: Cannot create an instance of the abstract class or interface my code: namespace MyNamespace { public abstract ...

JMS connection using JNDI name

I have configured tibco topic through Websphere application server and I can refer it by using JNDI name .I don't want to username/Password properties through config file because of security issue.Why ...

nodejs driver - reconnect slow when PRIMARY GOES DOWN

I want to know how does nodejs driver behave when PRIMARY GOES DOWN. Issue db.shutdownServer() on Primary "SECONDARY" become Primary right away. But driver takes at least 11 second hanging before ...

Logic error in my if statement?

Basically when doing white box testing and I test for invalid index and when i try index is 4 when the index on the line only goes to 3 it should have an illegalargumentexception. Instead I get ...

With React / Redux, how do I dynamically pre-load state?

I'm having a hard time pre-loading state with React / Redux. Before marking this as duplicate, I've already read these: http://redux.js.org/docs/recipes/reducers/InitializingState.htm Redux - ...

require/typed for mrlib/path-dialog error message

I am trying to use path-dialog% from mrlib/path-dialog in a typed/racket program, but it is complaining that I need to use require/typed to import it. I'm sure this is an easy one for someone ...

vlan trunk packet pass through linux bridge of intel ixgbe driver

I am facing a issue for intel ixgbe driver, for what I want is just setup a network bridge which works between two vlan trunked switch, and use iptables rules to filter all vlan tagged packet. the ...

Speeding Up Python Code Time

start = time.time() import csv f = open('Speed_Test.csv','r+') coordReader = csv.reader(f, delimiter = ',') count = -1 successful_trip = 0 trips = 0 for line in coordReader: successful_single = 0 ...

Why is PHP's mail function failing to deliver intermittently?

I have an event that fires every time a user successfully submits a form on my website. I can track the exact time that the event fired from my Google Analytics account. The time that the event fired, ...

Advance Select Query - FIFO

I have a table with columns id, item, qty and expiration date. I have to select item with a given total qty based on expiration date. The item that expires first need to be the priority to select. The ...

Outlook mobile app not showing background image

Recently I have been forced to click on the 3 dots at the bottom of my emails to be able to see the content/images. I noticed it happens when there is a background image used when coded. No ...

C socket programming receiving unknown length of data

Hi I designed a code to get the length of unknown data coming in to the socket I need help because I can't find where my code get stuck in this function. Thanks for any help int recvlen(int s){ //...

Proper Git merging as is relates to repo history

Here is the scenario: I have one branch named 'develop'. I branch off from this branch, the new branch is 'foo2'. After 3 commits on foo2, I then checkout develop branch and merge the changes on foo2 ...

Docker: Run an arbitrary command from inside a priveleged container on the host

I'm trying to run a command from a priveleged docker. Specifically the command nmcli. When I try to add nmcli as a volume, it complains that it's missing other files. When I add the entire /usr/bin ...

Open list of files using a with statement

I'm trying to open several files from sys.argv inputs using a with statement. I can do it by manually typing out each one: with open(sys.argv[1], 'r') as test1, open(sys.argv[2], 'r') as test2, \ ...

Format Dynamically added textBox in Excel

I am adding TextBoxes dynamically in a userform and want to make them a date format to ensure correct date entry. I am unable to find any examples. Here is my code for the userform activation: ...

TensorFlow PTB model doesn't save model

I'm trying to do the tutorial from Tensorflow So I did this command python3 ptb_word_lm.py --data_path=/tmp/simple-examples/data/ --model=small --save_path=~/result And the end of the result is ...

C function high school. work

The search function receives an array of items and its size and searches through the array for an Item with a specific sku that is received from the user. If found, it will display the item in FORM ...

Workaround for Firebase synchronicity in Swift 3 not working

I am trying to force some functions to finish getting info from Firebase before using it. While I have been reading up on dispatch groups and completion handling, I don't understand why just doing the ...

How do I setup MOQ to verify methods , when value equals some value

I have following method to UnitTest: public uint[] CheckSMSDeliveryReports() { try { MessageMediaSoapClient client = GetSMSSoapClient(); ...

Is it necessary to provide “Audio-only” stream when I use HLS(Http live streaming)?

I read this document and I'm not sure I need to add audio only stream. https://developer.apple.com/library/content/qa/qa1767/_index.html App store review guideline was changed like following. Video ...
15 30 50 per page
Translating... 0%