VS 2010 Find The Latest Technique Of Specific Logic Or Approaches?
Apr 25, 2011link where Programmers like me who are new and not very proficient in Vb.Net and ASp.NET..
View 10 Replieslink where Programmers like me who are new and not very proficient in Vb.Net and ASp.NET..
View 10 RepliesI have this situation where LoadWithPartialName appears to be the only good alternative, although it is marked as Obsolete. I work in a very tight dev environment with versioning and deployment policies that cannot be easily changed or bypassed. Let's say there's a .NET executable that I have no control on (from another division). Let's call this the client AppA application. AppA's version is 10.11.12.x. Application AppA has a direct reference to one of our class library that provides some service to the caller (returns some information).
Let's call it SvcB and the version is also 10.11.12.x. Now, AppA's division does not need to update their system as often as we do, so AppA's version will stay 10.11.12.x for some time, probably until we decide to change the format of the class that is exchanged between us. Our division needs to change the logic behind the service SvcB more often and the version must change with every major deployement.
So let's say we change the logic and we deploy a new version of SvcB, 11.02.11.x. AppA will still reference the old version, so the logic being used is now incorrect. We are thinking of creating a new "facade" to our service. Let's call it SvcFrontB. SvcFrontB's version will stay the same, in sync with the AppA's own version. Now I need SvcFrontB to load the most recent version of SvcB through reflection. This way, I am sure the latest logic is always used. How do I achieve that without using LoadWithPartialName ?
I need some help working out the logic when retrieving specific times from a userform I have created. In my userform, users are required to input a start and a end time in 24 hour time format. I am struggling to work out how best to analyze the selected times in order to multiply them by a set of rates, the rates are quite simple:
DayHours rate (day time is between 07:00 - 22:59)
NightHours rate (night time is between 23:00 - 06:59)
I cannot workout the logic to ascertain how many hours have been selected for which rate in an elegant manner, my best attempts so far are clunky and not quite there.
I am trying to find a specific file in a specific directory and then i need to get the full path of the file.Is this possible i cant find any help topics about a specific file.
View 5 RepliesI have a small application that is currently released. It does not use any database technologies. I built into it some simple copy protection that allows the app to run as a 10 day trial. After this it needs a licence number that I generate based on a code my app provides to the user.This works great for one or two standalone machines but I am now being asked about more flexible pre activated site licencing. Currently this is a bit beyond my skills. I need pointing in the right direction. I assume if I remove my copyprotection and install on a network share, that my app will run.My app also stores some data in the registry which includes the serial number and copy protection data. I could probably switch this to a local file if this helps.What approaches are there for networking my app and copyprotecting it at the same time?
View 1 RepliesI recently read about using SynchronizationContext objects to control the execution thread for some code. I have been using a generic subroutine to handle (possibly) cross-thread calls for things like updating UI controls that utilize Invoke. I'm an amateur and have a hard time understanding the pros and cons of any particular approach. I am looking for some insight on which approach might be preferable and why.Update: This question is motivated, in part, by statements such as the following from the MSDN page on Control.InvokeRequired
View 1 RepliesThe goal is to check for invalid data (no data/negative numbers/letters where numbers should be), it does produce a message if the data entered is invalid, but I can't figure out why it STILL displays the results. Results should only be displayed if all data is valid.
View 6 RepliesI've done many attempts but still didn't succeed in making a logic for pascal's triangle, I want you guys to get me start this task and I'll code it myself. url....
View 5 RepliesI have setup an application to parse about 3000 files a day where each contains around 4000-5000 posts in xml format with like 100 fields. It involves a lot of cleanup and parsing but on average it takes around 6 seconds per post. Now I tried threading but because of the way I have everything set up with variables being overwritten etc...I have divided the files into different folders and just created copies of the program to run and access the assigned folder. It is running on a windows 2008 server with 16 G of memory and I am told I need to reprogram to speed up the process and also not use so much memory.
[Code]...
I am trying to create a tool which executes some oracle procedures and telnet commands. Besides this Job my tool also needs to update a counter in some table in oracle db at regular intervals(10 secs as per current settings). So I used backgroundworker class in VB.NET to implement this back ground job of updating the counter. My problem is I have put logs at every possible exit of the backgroundworker_dowork functions but still this logic stops working after some time --7-8 hours. I am not able to understand when/where/why/how is it stopping? I am saying logic has stopped because it stops incrementing the counter. And am saying it is exiting abruptly because in _RunWorkerCompleted, I have written a log and closed the application but nothing comes in the log and application is not exiting.
Private Sub backlogicthread_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles backlogicthread.DoWork
WriteLog("Background worker", "entered")
dbbackcontrol = New OracleConnection(odbcBill)
Dim dr As OracleDataReader
[Code] .....
The application uses ADO.NET to invoke sprocs for nearly every database operation. Some of these sprocs also contain a fair amount of domain logic. The data access logic for each domain entity resides in the domain class itself. ie, there is no decoupling between domain logic and data access logic. I'm looking to accomplish the following:
[Code]...
I am working on a snake game for my portfolio and was wondering where the best place to put the logic for drawing the snake. Should the code reside within the snake object or within the form? Either would work, but I am wondering from a business objects/coding standard perspective where such code belongs.
View 2 RepliesI would like to know how you can get into a game using the ReadProcessMemory technique. Could someone help me by telling me what information I need to get into the game and the code required.
View 5 RepliesI am trying to create a graph that changes every second and just shows a 3 second history. In my head it would make sense to tie it into the T variable (Time in seconds), so I have form1 outputting T to a text box on form2 and then everytime that textbox changes it graphs the new chart.
The reason I am doing the step ladder approach is because I wanted the numbers to appear under the points as they travel. does this make any sense at all, or am I completely off base?
[Code]...
1.Converting a wav file to mp3
2.Create a mp3 player by use of a decoder for playing this mp3 file.
I want some help from the best audio programmer who can explain me the decoding logic used to play the mp3 file(Programatically) I am aware of the bit patterns and the data chunks of mp3.I have the knowledge of the data chunks used in mp3 and wav files .I have also used winmm.dll file earlier to ascend into and descend out of the data chunks of wave files.But don't know how the bits are played in a player.Now I need to convert the wav file into mp3 format by use of some encoder program.I came to know about some lame encoder program but am unable to get how to start understanding it's code.
I've been thinking about this problem for a while now and I'm still not sure what is the best approach.Basically I've got several hundred email addresses stored in a Database, and every week I would like to automatically send these addresses a bulletin of information. I've accomplished this with a Stored Procedure and a Scheduled Job on the DB (Oracle), but I'm sure this could be achieved better with some VB.net solution.I've read about people writing a Windows Service, or creating a Console Application and using Windows scheduler. I'm swaying to wards the Windows Service approach but I'm not sure how to tell the service to send emails at a specific time every week. Any ideas, or is there a better approach?Also, what would be best? Send individual emails to the addresses in the emailing list, or send one email with every address added as a BCC?
View 2 RepliesI know this is a VB.Net messageboard, but it can work with in all languages. Is there a quick way to complete a line (sample code):
//Setting variables set 1
a = e;
b = f;
c = g;
d = h;
.....
//Saving changes set 2
e = a;
f = b;
g = c;
h = d;
without having to type everything out...A technique using EXCEL or Notepad....Find and Replace. This would save a lot of time coding and becomes pain in the butt when you working with many variables.
I wrote some code to encode data using hashed technique,
HTML
Dim strPlainText As String = "admin"
Dim hashedbytes As Byte()
Dim encoder As New UTF8Encoding()
[Code]...
Is it possible that after you find a string, backup until you find a specific character and copy it?For example, I am looking for "bread". The text is milk8andbread. Would it be possible to start at bread, back up until eight, and just copy "andbread"?
View 4 Repliesif there was a bad virus on my computer and I wanted to make sure that every time that the Application tried to run, I would Kill That Process? Something that Might Look like this, but Idk..
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Interval = 1000
[code]....
Something that looks like that, yesterday I got the code on how to Kill a process by name, today I would like to learn how to ask the computer if that process is running, and if it is, Kill It.
I have a VBS script that allows me to do a recursive search through a specific registry key to find a key value in multiple of the key directories. And unfortunately it dosn't want to work properly with vb.net in my visual studio even when i try to make the syntax changes
just look through the HKLM\MICROSOFT key to search for any occurences of "DigitalProductID"
Const numRoot = &H80000002
Const strRoot = "HKEY_LOCAL_MACHINE"
Const myRoot = "SOFTWARE\Microsoft"
[Code].....
im trying to find a specific text in a textbox and remove it . i don't figure a way to do it .
If richtextbox1.text.contains(listbox1.selecteditem) then
' there i dont know how delete the text !!
end if
I am running a program that is connected through the internet and i gets disconnected at times.I wanted to know how this would be to examine a color of a pixel , If the colour turns changes, my mouse will move to reconnect it.
View 1 RepliesI'm developing a program to tweak the settings of the Thief: Deadly Shadows video game.The tweaker program is designed to load and configuration profiles so the ttlg/T3Ed Guild community can share tweaks with each other and then apply those setting to the game's ini files. A little more info here: [ame=http:ur]UNDER DEVELOPMENT - Thief 3 Gold Tweaker -l.... TTLG Forums[/ame] & here are a list of tweaks the tweaker program will apply to the game: [ame=http:[url].....
Anyway, I managed to load and save the config profiles but I'm stuck on applying those settings to the game's .ini files. The main problem is finding the right string. Thief: Deadly Shadows .ini file has settings for xbox & PC. I only want to change the PC settings in DEFAULT.INI:
[XboxStartup]
ShowIntroMovies=True
ForceCopyFromHardDrive=False
ShortIntroMovies=d:content 3VideoTextureseidos-logo.bik; . . . etc.
GameStartFiles=d:MediaFont12.xpr, . . . etc.[code]....
I want to change "ShowIntroMovies=False" under the "[PCStartup]" section when the user clicks "Apply Changes" on the main form.One way I could go about this is to look for "[PCStartup]" hold the line number it's on, then look for the "ShowIntroMovies" string under that line number. There are several instances in the game's .ini files where the same setting exists but they exists under different sections. So how would I find a specific occurrence of a string?
I have a word document with multiple tables. How can I specify in VB.NET to find a specific table and insert rows only into that one? I've successfully implemented the Find&Replace in the document... but the problem is that I have an unknown number of things that must be added into the table based on the data I'm querying from my database. So there is no simple solution as far as putting placeholders in the table and using the find and replace function.
View 1 RepliesI'm building a vb project using vb 2008 and I am trying to get a specific data from the source of a webpage. I am now trying to have the vb project access the below source of the webpage [URL] and retrieve the word "Dublin" from the code from the following line:
</tr><tr><td class="s7 li ou"><a href="dorf1.php?newdid=106467">Dublin</a></td>
The word "Dublin" should be stored in the string villagename1 (I will use that string several times later in the project) and it should at NO time open a IE page as to make it as invisible as possible.
Webpage Source:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]">
<html><head> <title>Travian uk5</title>
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="pragma" content="no-cache" />
[Code] .....
I am using VB.NET to read an XHTML file. I need my program to find every element within the XML structure which has the "class" attribute set to a specific value.IE: I need an array (or similar list) of all elements from the document which contain class="mytag".There is a list of several values I need to detect, all of which start with the same word 'mytag' followed by another word - so using a "contains" function seems sensible here
View 2 RepliesHow can you find a specific HTML element in a webbrowser.document? I'm making a program that will go to a specified address on the internet and find a html element and get the src link from the element then return the src to the imagelocation of a picturebox. Is this at least possible?
View 8 RepliesI have an HTML string and in that string are certain variables that I need to replace with database values. The variable names are dynamic but all begin with the characters "@@" (just two ampersands, no quotes). Is there a way to get all the words in a string that start with "@@"? I'm assuming you would use regular expressions, but not sure how to begin.
View 2 RepliesI have a program that will read a text file and put information from the text file into multiple text boxes. What I am trying to do now is be able to change the values in the textboxes and be able to write the specifc changes back to the text file. One way I though of doing that was using a while loop and copy the lines of the text file to another text file, then when it finds the line that has the specific change from the text box, make the change and continue writing the line until it reaches the end of the file. Then I was going to copy the file and overwrite the original, escientally making the change to the new file. Right now it will make the new file but will just make a blank text file. I think the problem is in the while loop statement but I am not sure. Here is the code below:
Code:
Private Sub submitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submitButton.Click
Dim trackname As String
[Code].....