43,549 Solved Topics
Remove Filter ![]() | |
I need to concatenate characters from a text document to create a phrase. I understand the concept of concatenating from text boxes on a form, but not concatenating characters from another file. This isn't my assignment, but it is the concept I need to understand. A text document that reads … Software Development visual-basic | |
def word_Rep(text,Dic_Word): rc = re.compile('|'.join(map(re.escape, Dic_Word))) def translate(match): return Dic_Word[match.group()] return rc.sub(translate, text) Dic_Word= { #A Words 'a':'ein', 'an':'eine', 'able':'KOmmen', 'about':'gegen', 'above':'Uber', 'absence':'Abwesenheit', 'absent':'abwesend', 'accent':'Betonung', 'accept':'akzeptieren', 'according':'nach', 'acquainted':'kennen', 'across':'uber' } Text_Trans= raw_input("[*]ENTER THE TEXT TO TRANSLATE:") Trans=word_Rep(Text_Trans,Dic_Word) print Trans please refer the above code. What happens here is that ,if … Software Development python | |
I have created custom text box for specific purpose i.e to accept alphanumeric values only and the length of text should be 6. If the user put less than six characters the code in below block converts it to 6 characters by filling in zeros . ‘Custom Clss block Protected … Software Development vb.net | |
Hi, could anybody please tell me what i am doing wrong in this program. The goal is to read the student name and grade from a text file and print it on the screen. This is what i have so far. by the way this is for a school project … Software Development c++ open-source | |
I have this code that is supose to just display "Hello Hacker!". But when ever I run it it gives a segmentation fault error #include <stdio.h> char code[] = "\xba\x0e\x00\x00\x00\xb9\x4\x90\x04\x08\xbb\x01\x00\x00\x00\xb8\x04\x00\x00\x00\xcd\x80\xbb\x00\x00\x00\x00\xb8\x01\x00\x00\x00\xcd\x80"; int main() { void(*func) (void); func = (void*) code; func(); } I am trying to run it on linux btw. … Software Development c++ | |
I have been having some trouble with this action listener scenareo, and I am doing it exactly like what my java book says to do, and something is still not working. In the action listener the if statement is not working correctly. Here is an example of my code. The … Software Development java java-swing | |
Hi, I wrote some code using pygame that has two images. I am trying to figure out how transparency works, so I have tried to display a circle png on a square png. My code looks like this. import pygame from pygame.locals import * #make window pygame.init() screen = pygame.display.set_mode((1270, … Software Development python | |
When the readonly property of textbox is set to true then back colour turns to grey. i use below code to change the back colour to white Private Sub TextBox1_ReadOnlyChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.ReadOnlyChanged If TextBox1.ReadOnly = True Then TextBox1.BackColor = Color.White End If End … Software Development vb.net | |
Hi everyone, I am a C/C++ winapi developer and have to rewrite a "Dialog based" application in java, so that it will execute as an applet in any browser. My java skills are very few, since my knowledge is limited to past college classes. The application is not a large … | |
I made three projects the first one is a windows form, the second one is a class library and the third one is another class library to be the reference of the second and first projects. Inside my second Project which is a class library there are two files a … Software Development vb.net | |
I am trying to add a comma to the end of each line ('\n') of a text file til the end of the file is reached. I am opening the file in append mode but am unsure as to how to go about identifying when the end of line is … Software Development c++ | |
Group, I've written a short stored procedure in SQL Server 2008 to create a new Order Number. The code looks like this: INSERT INTO ORDRNUMBERREC(OrderNo,UserId,CreateDate) SELECT MAX(OrderNo)+1,'system',GETDATE() FROM ORDRNUMBERREC WITH (TABLOCKX) In VB2010, I've written the following code to execute the stored procedure: con = New SqlConnection(sConnection) cmd = New … | |
anyone can help me? i have a task from my teacher. He asked me to make a simple image processing program that can process 2D image with this feature: -the program can make a translation, rotation (an angle of rotation with arbitrary), scaling, and shearing. -the program can make an … | |
public class homework8_2 public static void main(String [] args) { Scanner keyboard = new Scanner(System.in); int selections = 0; DecimalFormat formatter = new DecimalFormat("#0.0000"); do { showMenu(); selections = keyboard.nextInt(); System.out.println("please input the amount of meters"); double meters = keyboard.nextDouble(); if (selections == 1) { double kilometers; kilometers = showKilometers(meters); … Software Development java | |
Hi How to kill a file in this format kill App.Path & "\backup\backup\PhoneTel.mdb" & Format(Now, "yymmdd_hhnn") & ".mdb" Lenny Software Development visual-basic | |
Hi Again I have a file list with 2 backup library For i = 0 To File2.ListCount - 1 If File2.Selected(i) Then min = Left$(File2.fileName, 12) ' here I got the file name from PhoneTel.mdb130513_2014.mdb '********** min is Phonetel.mdb Kill App.Path & "\phonetel.mdb" sourcefile1 = File2.Path & "\min" ' The … Software Development file-system visual-basic | |
I got this error from another computer, without visual studio. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at PAMS_Upload.frmMain.Validate_OtherDimensions() at PAMS_Upload.frmMain.btnLoadOther_Click(Object sender, EventArgs e) … Software Development assembly dataset microsoft-office visual-studio | |
I am trying to set the value of cells in an Office 2010 worksheet using this code in Visual Studio 2012: for (int i = 1; i < 5; i++) { xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(i); int columnCounter = 1; foreach (string s in columnNames) { range = ((Excel.Range)xlWorkSheet.Cells[1, columnCounter]); range.Value = … Software Development microsoft-office visual-studio | |
Hey Im trying to figure out why my code doesnt enter the second foreach loop?? am i missing something? public void LoadPageAccess(int intRoleID) { Roles role = new Roles(); List<CRMDocLib2012Model.GetPageAccess_Result> GetPageAccess = role.GetPageAccess(intRoleID); foreach (CRMDocLib2012Model.GetPageAccess_Result lst in GetPageAccess) { foreach (GridViewRow Item in gvPageAccess.Rows) { var chkbox = ((CheckBox)(Item.FindControl("cbPageAccess"))); var … Software Development | |
Hi all I've been messing about with this bit of code. Basically what it's supposed to do is create these six buttons, which when clicked pass a parameter to a function and then call that function. The function basically removes one condition from a larger list depending on which button … | |
So I'm starting to learn python as it's an awesome language from what I've already done in it. I came across an exercise to learn lists and it was basically as follows Create a list of first names and a list of second names and use a for loop to … Software Development python | |
I am getting an iphone soon and would like to write some programs for it using c++, I know all about apple and objective c but I want to use C++, as I am more skilled in C++. So is there a compiler out there that will enable me to … Software Development apple c++ iphone objective-c | |
i have an awk script and in the end section i create my table data with printf and i want to sort it so i used pipe then sort i am calling it like this awk -f awkscript file in bash i can get it to work the way i … Software Development shell-scripting | |
Need Help guys. I am beginer in vb.net. i am using vs 2008 with sqlserver 2005. my head will burt very soon :( i have completed a desktop application for a local shopkeeper but he says this is in english and i want it in URDU :@ ,,,, i WANT … Software Development vb.net | |
Hello......I have written a script in which I am telnetting from system1 to system2. There from system2 I am doing ssh to system3. This system3 is a Embedded Board running Linux. Here on system3 I am executing a code that gives me a CLI interface. In this CLI we have … Software Development python | |
Well I have a question and not sure if it's right. Here's the question(Long one). Applications. Build a class called Precinct. The record for a voter will consist of aname (String) and a political party(Boolean)(Two party). The SignInQueue method takes two parameters, a voter name and a party, and places … | |
hi. i have problem with following code: when i give address directly it works correct but when i get address from command line, it does n't work. int main(int argc, char** argv) { int size; int fd,fd2; char buf[10000],buf2[10000],FileAdd[10000]; size = read(fd2,buf2,10000); //char *FileAdd = malloc(size); strcpy(FileAdd,buf2); if ((fd= open(FileAdd, … Software Development c | |
how do I put hexadecimal values into a byte array?? I did the following private byte[] buffer=new byte[] { (byte)0xC8, 00, 0x09, 0x4A, 32, 0x4D, 45, 76, 33, 0x2E, 30, 32, 00, 05, 00, 00 }; but when i print them using System.out.print(...), the output is -56 0 9 74 … Software Development java | |
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { DefaultListModel list = (DefaultListModel) jList1.getModel(); String sql = "Select * from salesorder"; try { Class.forName("com.mysql.jdbc.Driver"); Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost/userauthentication", "root", ""); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sql); while (rs.next()) { Integer id = rs.getInt("id"); list.addElement(id); } jList1.setModel(list); } catch (Exception e) { … Software Development java | |
Hello. Is there any way that a tester, who does not have visual studio installed on his/her machine, can determine the .net framework version of an application he/she is testing? Thanks for your help Software Development asp.net visual-studio | |
Please help me with this code. when i tried to run it, it doesn't continue to this part "printf("\n\n Money: ");" but when i tried to change the data type of money to integer it does continue, but i need a float data type. please help, thank you. #include<stdio.h> #include<conio.h> … Software Development c | |
with terminal is there a way for me to get a list of names that are already taken? like for things like variables and filenames `import` so I can't accidentally name something that will make a bug Software Development python | |
I wrote this matlab code: [CODE] function [ n ] = SumTest( a, b ) n = a + b; end [/CODE] and deployed with MATLAB Builder NE. That create a class named MatLabTest with a method named SumTest. When I try to create a MatLabTest instance: [CODE] MatLabTest mt … Software Development | |
![]() | I'm a computer science major and I'm taking an intro to C++ programming course. I have to write a program that reads in the data from a .txt file and echoprint it, and also print the data again but with every fifth word with 10 underscores. I was able to … Software Development c++ data-science ios |
Hey guys, I have been reading the forum for a while, but I couldn't find anything that could help to figure out my current assignment. Its a very simple program, but somehow just doesn't work for me. I'm a beginner and I hope that somebody can explain what am I … Software Development c++ | |
I want to filter my datagrid view in my winform with a date range. I have 2 label with StartingDate(lblStart) and EndingDate(lblEnd) which is called from the datepicker on another form. Filter = "(DATE >= '" + Convert.ToDateTime(lblStart.Text).ToString("dd/MM/yyyy") + "' and DATE <= '" + Convert.ToDateTime(lblEnd.Text).ToString("dd/MM/yyyy") + "')"; And this … Software Development vb.net | |
// In this program: when i compile this program, the complier shows error in the main section(I have mention this error in main section) that is "can not convert sample to sample in assignment". this error is occuring only when i try to access private members of class through pointer … Software Development c++ | |
I can not for the life of me figure out how to solve for a cubic equation using visual basic. I have tried multiple codes found on the internet, but they do not work or there is code I do not understand (such as root.root). Here is the equation I … Software Development visual-basic | |
I have two questions here. First of all, how do I enable selection of multiple listbox items and select them via code? Secondly, how do I prevent the user from selecting multiple lines? Now, for some background and my thoughts. I'm working on a project for computer science in which … Software Development data-science vb.net visual-basic | |
Hi guys, I'm trying to write a function that could convert a lowercase string to uppercase. Not sure if I'm heading the right direction. Essentially the function [CODE]ToUpperString (char s[]);[/CODE] would convert everything in the string to the uppercase equivalent. Here's what I got so far: [CODE]void ToUpperString ( char … Software Development c++ | |
I want to learn about `def` because that looks very the most intriguing how you can make it kind of like reusable but when I was learning I had come some problems with understanding def main(): #renewable code main() if __name__ == "__main__": main() I don't understand what `__name__` and … Software Development python | |
Hello Everybody How can store name of dynamically created checkbox in a String array when I don't know how many checkbox will user select at runtime. Say I have 10 dynamic checkboxes and out of 10 user select 6 checkboxes randomly now how can get the name of those selected … Software Development dataset | |
Well I need help one of the two questions which are similar to the topic I'm asking. The first question that I solve was "Taller method should return true if the tree on which the method is invoked has a greater height than the tree passes as a paramter". public … Software Development java | |
Dear All I am trying to create groupbox dynamically and these GB will create on selection on checkbox. Means I have 5 check boxes now if I select 1st CB then 1 GB with some other dynamic checkbox shall be created, if I select 3rd check then another GB shall … Software Development dataset | |
So i believe i got my prefix working, now i'm trying to get my postfix working so that the class object happy should have its day increased by 1. Not sure whats wrong. Maybe the way it receives the month and day in the constructor? main #include <iostream> #include <string> … Software Development c++ | |
Hi I wonder how to count the backup files I have. If I say like this 1: making backup OK 2: making backup OK 3: now is the question how to count the backup files so I can remove some of them or kill one Bonzo Software Development visual-basic | |
Hi...! I'm Workihng on Snake And Laddet Game... the player roll the dice and it's get a new position,an image will show the player position on the screen in the next turn image will move to a new position but the last picture is still in it's position how can … Software Development image | |
when I run eclipse (just downloaded the 32 bit version from the website) it gives an error dialog that says 'a java runtime enviroment or java development kit just be available in order to run Eclipse. No java virtual machine was found after searching the following locations: " and it … Software Development java | |
HI all, I am trying to validate the input in my tic-tac-toe program. I had a good look around on the net and tried a few combinations, but I couldn't get anywhere. Some people seem to be using methods like hasNextInt(), some other a try and catch statement. I tried … Software Development java |
The End.