R

140

Solutions

327

Contributors

R is a programming language and environment used primarily for statistical data analysis.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi All,

As we know that in R language you can store a  data file into a data.table and can do all kinds of data manipulations to the table variable. data.table has got a lot of built in methods that could be used to do data manipulations on that table object....

Can i do similar - like read and store a csv file into a data.table (how to do it in python)? so that i can do all kinds of manupulation to it,? can you show me some sample python code example.
Does python can got something similar...like a table object that I can use? or anything close?

Thank you
0
Hey all,
I am trying to get my feet wet in R programming for statistical analysis. '

Can anyone of you, tell me what is the basic differences and similarities between a list and vector, in a simple  layman’s terms…
What is a  data frames?

Thank you
0
What programming code does the PlayStation 4 and Xbox 1 use for games like NBA 2k, and Madden?
0
Oh dear experts,
Im wondering if the new Visual Studio 2017 is for free?
regards
0
Hi, friends,

I have written a (VB).NET console application that does external processing of some text information and is called repeatedly and often from a multithreaded application. Even while each instance runs only for a short time, it's possible that two instances run concurrently.

Unfortunately I observe crashes of the console application, and it rund flawless in the debugger with the same dataset. This behaviour seems to occur more often since I log more data ( = longer run time of each instance = more concurrent processes).

Due to my own convenience I've made use of the My.Settings facility for various program data. This data is updated from time to time by the console application, but it's no problem with what version of that data the application instance runs.

My suspicion is that parallel instances of the console application collide when accessing the application config file.

Unfortunately I don't see anything in the event log nor can I find any crash dump files ...

Any tip how to circumvent that problem ?
0
Looking for a solution to this sql statement

declare @ID int =17592

(select TOP 1 LineNum from a where ID=@ID
 order by desc)
0
I am capturing labor data in the form of an excel file (Single row per employee), and want to import that into an ACCESS or SQL database.
I am thinking of starting with Access as it is more user friendly (I Mostly VBA programming experience).

I see some examples, but one problem I am running into is that each day I get the last 5 days of data (in case the manager edits the older data), so I am looking to update an replace older data each day. One approach is to delete the last 4 days of data, then import everything as new.

Just looking for some suggestions on best way to get into database, so I am not missing something that I later regret..

Not sure how I will award point, maybe split it multiple good replys
0
 

 
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
 
public class MyHashMapEntrySet3 {
 
    public static void main(String arg[]){
      HashMap hm = new HashMap<Integer, String>();
    	//HashMap hm = new TreeMap<String, String>();
    	//HashMap hm = new LinkedHashMap<String, String>();
        //add key-value pair to hashmap
        hm.put(3, "C");
        hm.put(1, "A");
        hm.put(2, "B");
        //hm.put(3, "C");
        System.out.println(hm);
        //getting value for the given key from hashmap
       /* Set<Entry<String, String>> entires = hm.entrySet();
        for(Entry<String,String> ent:entires){
            System.out.println(ent.getKey()+" ==> "+ent.getValue());*/
       //d }
    }
}

Open in new window


{1=A, 2=B, 3=C}


i wonder how i got above sorted output based on key all the time first 1 then 2 then 3 key set? please advise
0
When an application is started, what are the steps it goes through until data is saved and the application is closed? What are the interactions with the registry and .ini files etc.

Ex. - 1. Executable is left mouse clicked. 2. The application takes the credentials and authenticate. 3. Assigns privileges etc.

Where does the security token fit in this sequence?
Where does the registry/ini files fit is this sequence?

I want to put the answer in a diagram to assist with troubleshooting
0
need the answer as soon as possible. thanks in advance
0
I have a VB.NET application that looks for a specific folder called "datarepository" that gets created in the Windows temp path.  The settings value within the application is named "datapath".  

Below is the value that is within the settings:

Name              Type                 Scope                                Value  

datapath         String               User                                 "C:\Users\<username>\AppData\Local\Temp\datarepository"




Within the vshost.exe.config file the values show as the following:

<setting name="datapath" serializeAs="String">
        <value>C:\Users\&lt;username&gt;\AppData\Local\Temp\datarepository</value>
</setting>

Please note the "&lt" around the "username" within the string value.  I think this is causing an error within the application as the path is not found.  Can someone advise on how to pass in the value so I can be certain that the folder and path are created correctly in both Win 7 and 10 OS?

Regards,
aj85
0
I am programming a gateway for the current website I am working on .

The callback posting from the gateway requires a web service query to eliminate man in the middle attacks.

When the call back is posted, the following information is sent

$gtpay_tranx_id = $_POST['gtpay_tranx_id']//Transaction id
$gtpay_tranx_status_code = $_POST['gtpay_tranx_status_code']//'==> 00
$gtpay_tranx_curr = $_POST['gtpay_tranx_curr']//'==> NGN
$gtpay_tranx_status_msg = $_POST['gtpay_tranx_status_msg']//'==> Approved by Financial Institution
$gtpay_tranx_amt = $_POST['gtpay_tranx_amt']//'==> 140000.00
$gtpay_cust_id = $_POST['gtpay_cust_id']//'==> destiny@icecoolcontracts.mx
$gtpay_echo_data = $_POST['gtpay_echo_data']//'==> Transaction ID:AS20170222150106;ClientName: Destiny Amana [Icecool Contracts Limited]: Purchase of Basic Plus
$site_redirect_url = $_POST['site_redirect_url']//'==> /gtpayresponse.asp
$gtpay_gway_name = $_POST['gtpay_gway_name']//'==> webpay
$gtpay_tranx_hash = $_POST['gtpay_tranx_hash']//'==> CDFB59FDBCE4DCCC7A1348EFF165AC2AA1438356FE042D0DCD5F39DD4DF3F7F4C79BDCF586B858626748CCD0D79B6A39D9A1532949FA5FB7C4E4CBAD3774D335
$gtpay_verification_hash = $_POST['gtpay_verification_hash']//'==> 7CBC424420E73377B6BB1B93979CED3D2A7C53576B13EC61B8F271CCF0025B1EFB4553592382559667560D8FCD3405FA2DC53AF18B6938AE55A67F37AB11F1F1
$gtpay_full_verification_hash = $_POST['gtpay_full_verification_hash']//'==> …
0
Hi,

I need to create a java program to enter the time in hours and minutes.

The time entered is assumed to be a valid time on the 24 hour clock. The program should print out the time followed by one of AM, PM, Noon, midnight as appropriate.

I am new to programming and I would appreciate any help!

Many thanks
0
Microsoft seem to be getting better at updating their control ID lists for major new releases of Office but for the 365 updates, it's not quite there yet.

How can I find the ID for a 2016 ribbon control when it's not in the documentation:

https://www.microsoft.com/en-us/download/details.aspx?id=50745

For example the recent addition of SVG support added a new Icon button to the Illustrations group of the Insert tab but the control ID is not listed in the document above.

I need to hide this button and have tried [and failed] all sorts of logical strings for the ID based on what else I know is in that group:

- ShapesInsertGallery
- SmartArtInsert
- ChartInsert

...but is there a more intelligent way of finding out what it is rather than guessing?

I tried searching the CommandBars object for clues but to no avail:

Sub SearchCommandBarControls()
  Dim x As Long, y As Long
  With Application.CommandBars
    For x = 1 To .Count
      For y = 1 To .Item(x).Controls.Count
        If UCase(.Item(x).Name) Like "*ICON*" Then Debug.Print "cBar : " & .Item(x).Name
        If UCase(.Item(x).Controls(y).Caption) Like "*ICON*" Then
          Debug.Print "Control : " & .Item(x).Controls(y).Caption
        End If
      Next
    Next
  End With
End Sub

Open in new window

0
The idea is to be able to right click on a shortcut and be able to select an option to "copyaspath", which will store the Target URL in memory so that it will be available for pasting.

The command line would need to be placed in Reg Key: HKey_Classes_Root\InternetShortcut\shell\copyaspath\command
Use the Default String Type to add command line.

This works:

cmd.exe /c FINDSTR "URL=" "%1"|clip

Results:
BASEURL=http://site/index.cfm
URL=http://site/index.cfm

But we only need the URL line without "URL="

I was thinking this but not working:
cmd.exe /c For /F "tokens=2 delims==" %1 IN ('FINDSTR "URL"') DO (%1|Clip)

Any help would be appreciated.
0
Hello,
In asking my question about the Java EE 5,6,7, documentation; another question came up.
The Eclipse Mars was suggested, yet I had installed Neon2 because that was what I was using before.  I see that Neon 3 is released.
Last night I installed Neon 3 and the documentation options did not come up at all, like in Neon2.
The question that I now have is; with, let's say Neon3,  which now I have installed Neon2 and Neon3.  And I have downloaded Jdk 1.8.111/121, and Goldfish4/java_ee_sdk-7u2-web.  If I wanted to use Jdk 1.8.121 with Neon2 and Goldfish4 with Neon3; how would I configure the "Environmental System Variable "Path?"  
Is it that Eclipse has a setting that I could set up which Java version to use?
I apologize that I have not gone to check whether Eclipse Neon has such a setting.
Thank you for your answer.
0
Hello,
I have a couple of "unresolved" issues.  I tried fixing my problems using the options within Eclipse, but nothing works.
I know that I have in import/install the org.opeqa.selenium API, yet can't find the API at org.openqa, and I know that my Selenium API needs to be installed as well.  I thought I did have it via Selinity - Selenium plugin, but I guess not.
These are my issues;
import org.openqa...cannot be resolved
FirefoxDriver cannot be resolved to a type
Method undined for WebDriver

This is the code;
import org.junit.Test;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class MyFirstWebdriverTest<WebDriver> {
      @Test
      public void checkSeleniumHQinFirefox(){
        WebDriver driver = new FirefoxDriver();
        driver.get("http://seleniumhq.org");
        driver.quit();
      }
}
0
I am in an Exchange admin with about 15 years experience, starting off in Helpdesk.

I recall the days when every company, regardless of size, had an on-site technical crew to manage their Exchange servers and everything else.

Then the smaller ones opted for the cloud, and the larger organisations kept dedicated technical teams

Now the larger ones are moving to the cloud too, and the only ones left with on-prem infrastructure are the ones with separate teams for exchange, storage, and so on.

Once these move to the cloud, I wonder what is next? So my question is, for someone in IT would it make sense to focus on software development rather than infrastructure skills?
0
We currently have an application called "Support" for mobile devices (runs on iOS/Android). The end user types their issue into the a form and it goes off to the helpdesk, who log a ticket.

To me, this seems somewhat pre-historic.

I was thinking of utilising bots, so that the user could interface with some level of AI which would then at least be able to present solutions

Is this possible? Are chatbots available to understand that the user has written and then point them to a Knowledge Base?

Any way to make this even better?
0
I am not trained in SQL. I'm trained in other programming languages, so explain this slowly for me.

I've been beating my head against the wall with this query. I spent a couple of days on it and got the results that I wanted, but noticed today that I had duplicates rows. Essentially, it's a list of clergy members. The clergy members have multiple addresses. What I'm most concerned about is the address types 'Main\Home Address' and the 'Parsonage Address'. I was able to figure out a join statement that gets me only these two address types, but I didn't plan on some of the clergy having both, so they both show up causing my duplicates.

Essentially, if both address types are listed for a clergy member, then I only want 'Main\Home Address to appear'. Otherwise, I want those clergy that have 'Main\Home Address' and those clergy members that have 'Parsonage Address' to appear in the query. The code is below. It's an awful database, so I'm hoping that what I've typed makes sense. Again, I'm not trained in SQL, but I've tried to comment within the code so things are clear. I really hope for some ideas on what to do. Thanks for the help.

SELECT DISTINCT
OtherPersonalInformation_GCFA203.int_value AS Id,
P.first_name AS FirstName,
P.last_name AS LastName,
P.nick_name AS PreferredName,
P.middle_name AS MiddleName,
ISNULL(tb_person_suffix.lookup_value, '') AS person_suffix,
ISNULL(tb_person_title.lookup_value, '') AS person_title,

0
Hello,
I'm looking for a website that gives a much deeper explanation about the Selenium api.

I found this site, yet it is not enough to fully understand; for what and how to use the api;
https://seleniumhq.github.io/selenium/docs/api/java/index.html?overview-summary.html

Could you suggest a better site?
0
Hi,

I'm starting a project to integrate a third party add-in from SagePay to our in-house Access database and unsure on some of the basics. I've completed the following steps but not clear on where the initial problem lies. Any assistance appreciated..

1. Discovered that I need a type library (tlb file) for the dll so I generated file using regasm (have .net framework 4.5 installed which is a listed minimum requirement)

(regasm.exe in c:\windows\microsoft.net\framework\v4.0.30319 = v4.5 folder after upgrade by all accounts)
regasm c:\sagepay\guardian\bin\Integral.Library.GuardianClient.dll /tlb

Open in new window


2. Added a reference to the add-in to vba project
VBA reference to SagePay dll
3. Declared function call for the add-in using documentation:

Public Declare Function Process Lib "c:\sagepay\guardian\bin" ( _
        ByVal transactionType As TRANSACTIONHOOK_TRANSACTIONTYPE, _
        ByVal transactionAmount As Integer, _
        ByRef tillInfo As TillInformation, _
        ByRef transInfo As TransactionInfo) _
As Boolean

Open in new window


4. This is where my knowledge gets a bit sketchy; I assumed the add-in would include the tillinformation type definition which I checked in the object browser but this is not the case as it shows no members?

VBA object view of TillInformation class
Hence, declared a VBA type as shown to match the documentation although documentation does not specify actual data types. I've tried varying strings / integers for some of the type declarations with no effect.
Public Type TillInformation
    merchantname As String
    address1 As String
    address2 As String
    address3 As String
    address4 As String
    phonenumber As String
    sitenumber As String
    tillnumber As String
    receiptnumber As String
    operatorid As String
End Type

Open in new window


5. Now when I try to call the function fro a test form, I get a type mismatch with 'tillinformation' parameter so it’s obviously not happy with the declaration..

Runtime / compile error with Process function
I don't know if the issue is with the add-in registration or the way I'm trying to declare the necessary types etc. so desperately in need of some guidance please! Thanks
0
Is there a formula for showing return on investment for training?

I'm thinking something like this.

(Salary per Year) / (Minutes Worked Per Year) = Employee Cost per Minute

(Cost of Training) / (Employee Cost per Minute) = (Number of minutes necessary for employee to be more productive to pay for course)

I guess you need to also factor in lost time due to course attendance and cost salary.

Has anyone seen anything similar to this?
0
i often need to backup data from different disk drives, and Windows OS'es - so
i would like to make a backup program that offers me :
choice of multiple source folders to copy
choice of destination folder

preferably with robocopy to speed up the copying

if possible, using editable source code;a windows interface like Gui would be nice, but not necessary

of course free
if you know some that do this - they're welcome too
0
Hello,

Is there a way to run an AutoHotkey (AHK) script directly from Notepad++?

I recently began editing my AutoHotkey scripts in Notepad++ rather than in Notepad. Now I'm wondering if, after making changes to a file, I can run it directly from Notepad++.

With regular Notepad, you must first save the edited file then go to Explorer (or wherever you have a shortcut) and run the file from there. It would save several keystrokes if the file could be run directly from Notepad++.

I do see a "Run" menu but after clicking, a box comes up asking you to enter the file you'd like to run. It would be quicker of course if there's a way to simply run the code in the currently active tab.

Thanks
0