Advice needed on how to approach this, passing around strings
Hello everyone,
I'm new to network programming and I was just wondering if I could get some clarification and some advice on networking.
Right now I have a serversocket program that accepts a connection from another server that is sending large strings (events), my server socket program takes these strings (events) and parses them and up stores them into an object and then into a multi-map.
Now I'm going to take these events and turn them into a string again, and send them to a receiver.
I'm confused on the processes of how this will happen.
My Sever Socket program creates a server socket, and listens on port 5656, the program thats sending me the strings (events) connects to socket 5656, and starts sending me data.
Now once this data is processed and stored as a message object, then what do I have to do to send it off to another program?
Do I open up another Sever Socket, and listen on port 5000, then when that other reciever program connects to 5000 it will start sending those strings to it?
If this is the case, what if there is no connection to 5000 to recieve the strings I'm going to send to it? Would I need to maybe store all the strings in a vector and when the client connects to port 5000, should I just start sending them from the vector?
Or should the recieving application be also a server? So as soon as I get my first string, I can just use the Socket class, rather than the ServerSocket to create a connection like: Socket echoSocket = new Socket("taranis", 5000); Asumming taranis is the name of the server that wants the strings I parsed.
So my application will have a SocketServer to accept the incoming string, then it will create a Socket and connect to another server to send the string?
Thanks :D
Or should the recieving application be also a server?That seems like much the better alternative.
BTW why don't you just pass the events around in their original form, using Serialization, rather than string-ifying and de-stringifying them everywhere?
Similar Messages
-
How to approach this requirment
Business overview:
For every organisation account management will be the core functionality. The account management should include the following:
customer - company - vendor.
1. customer info
2. vendor info
3.organisation info
4.material info
5.purchase order info
6.sales order info
7.subsequent documents such as delivery doc,invoice doc n accounting doc info.
Reports:
1.purchase order line item wise report.
2.open purchase order.
3.sales order line item wise report.
4.open sales order report.
5.open invoice item wise.
Im new to ABAP, pl someone guide me how to approach this requirment. Which r the tables n fields i need to work with?
Thank you.Hi Ashwini,
I am giving you some of the important details of tables as per your requirement.But there could be more tables than i am providing.
Just a list of tables that come in handy.
Sales orders
Name Description Uses
LIKP Shipped Lines header
LIPS Shipped Lines detail
VBAK Order header Every order (unless archiving)
VBAP Table fields Every line item (unless archiving)
VBBE Open sales order line items Great file, but be careful.Contents don't reflect orders
that do not affect purchasing (go figure).
VBEP Schedule line item
VBFA Document flow Let's you move from order to shipping document to invoice.
VBUK Order status
VBUP Line item detail status
VBFK Invoicing header
VBFP Invoicing detail
Material Management
Name Description Uses
MARA Inventory Master
MARC Plant Data
MARD Current Inventory
MAKT Descriptions
MBEW Material Valuation
T179 Product Hierarchy
MVKE Sales data (materials)
MKPF Material document Status code 'R' in VBFA
Purchasing
Name Description Uses
EINA Purchasing inforecord by MATNR/LIFNR contains things like vendor material
number and access key for EINE
EINE Purchasing inforecord detail Contains minimum purchase, group, currency
EKPO Purchase orders
EKET Scheduled lines
EKES Vendor confirmed lines
IKPF Header- Physical Inventory Document
ISEG Physical Inventory Document Items
LFA1 Vendor Master (General section)
LFB1 Vendor Master (Company Code)
NRIV Number range intervals
RESB Reservation/dependent requirements
T161T Texts for Purchasing Document Types
Forecasting
Name Description Uses
MAPR
PROP
PROW
Classification
Name Description Uses
KSSK Material number to class
KLAS Class description
KSML Characteristic name
CABN/CABNT Characteristic name description
CAWN/CAWNT Characteristic name
AUSP Numeric values
CAUFV Service order header
AFPO Service order line Holds items that will create "reservations"
RESB SM Reservations Materials needed for line
Customer Data
KNA1 Customer Master
KNVV Sales information
KNVP Partners (ship-to, etc)
Since you are new to abap, its better you to know the system tables and other tables for configuring:
System tables
Name Description Uses
DD02T Table texts
DD03L Table fields Lists the fields in a table
DD04T Data element texts
USR02 Valid user names
Config tables (normally begin with "T")
Name Description Uses
T001 Client table
T002 Languages
T005 Region (Country)
TCURR Currency and exchange rates
TVAK Order type
TVSB Shipping condition
TVAGT Rejected reason for order line
Other tables
Name Description Uses
STXH Text header
STXL Text detail
Reward points if useful.
Thnakyou,
Regards. -
How to approach this requirement
Business overview:
For every organisation account management will be the core functionality. The account management should include the foll:
customer - company - vendor.
1. customer info
2. vendor info
3.organisation info
4.material info
5.purchase order info
6.sales order info
7.subsequent documents such as delivery doc,invoice doc n accounting doc info.
Reports:
1.purchase order line item wise report.
2.open purchase order.
3.sales order line item wise report.
4.open sales order report.
5.open invoice item wise.
Im new to ABAP, Please someone guide me how to approach this requirement. Which are the tables and fields i need to work with?
Thank You.
AshwiniHi:
Refer to SAP Tables in this documentation.
http://www.erpgenie.com/abap/tables.htm
You will find the realted fields in the weblink.If you are not unable to find the field and table, go to functional consultant and ask him about the filed.
he will show you and click on F1.you can see the techncail information.Click on this and you will see table name and field name.
Please let me know if you need more information.
Assign points if useful.
Regards
Sridhar M -
my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem
Carlos-
Start by signing out and back in to see if it will see the subscription:
How to sign in and sign out of creative cloud (activate/deactivate)
If the apps are installed fine and close after launch see this link:
CC applications close immediately after launch
If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise you on a solution
Pattie -
Advice / Help needed on how to tackle this mountain...
First, I've scoured the forums looking for an answer and some clarity, but have come up empty. Any advice or help you can offer will be greatly appreciated...
So I'm trying to tackle the feat of sorting though thousands of MP3s in several different fodlers, and getting them all stored in one folder, with just the ones I want to keep (estimated to be about 3,000 when all said and done). Having iTunes just automatically copy them as I drag and drop is perfect, but I don't want the program to automatically sort them in hundreds of different folders. Is there a way to not completely turn this folder off, but have it just copy into the root folder?
Assuming the answer is no, what's the best way for me to approach this? Right now I've turned off the copy feature, have been adding 100 or so songs into a new playlist, editing the tags in iTunes, and copying into my finish root folder. However, I obviously lose my rating when I move the files, and have to update my library by removing all previous files in library, and adding the root folder again.
A way around this is for me to just not assign a rating to any files until I have my final root folder set for import into iTunes library, but this also raises a conceptual problem: I use other programs for uplaoding songs from CDs and DLing, and have them all sent to an "Unsorted MP3s" folder. I would like to be able to go back to this folder, edit the tags and clean them up, then copy them into the root folder and updating my library without having to remove all and reimport the whole folder, losing all my ratings and playcounts.
So I guess there's really 2 questions I have;
First, is there a way to have iTunes just copy the file into a root folder without automatically sorting and creating folders itself?
If no, what's the best way for me to go about updating, importing, and copying songs into a singular root folder? I realize I could just stay on top of it, and only add a few files at a time individually, but that solution isn't very feasible when I'd like to update and add large numbers at a time.
I gotta imagine there's something I'm missing here and it's possible. I did have the idea of merging ALL of my MP3s into my root folder first, then delete and edit from iTunes, eventually ending with a perfect library and all files in one folder. However, I'm still posed with the problem of how to add files at a later date without losing my whole library...
Hopefully I haven't been too confusing, and I'll be sure to offer more clarity if need be. Thanks in advance for all the help!
-MikeIm not a 100% sure on what your trying to do, i think and correct me if im wrong but you want to copy all your songs that are scattered all over the pc into one folder in the root but not have itunes consolidate the files into folders by name etc.
Im not sure if this is of any help to you but i had songs scattered all over my pc and wanted to put them in a central folder and then share that folder accross multiple user accounts on the one pc (this could be the root if you wish i just chose shared music) if you follow the following link it explained what i did to put all my music in the one place. (I urge caution though as im not 100% certain if this is what you want to do, anyway hope it help)
http://discussions.apple.com/thread.jspa?threadID=608497&tstart=0 -
Multi language, how to approach this?
Hi everyone,
I have a website on which I want to offer multi language, but no idea what is the best way to do this.
There 2 plans I have:
1:
Of course all content (text) is in a database.
If a user would want a different language, the user would click on a link/flag, this would put the requested language in a session variable, for example: session.language = "es"
In the database I would have 2 columns (every language has 1 column) and then select the text which belongs to 'es'
Every page would then do a request to the database to get the text beloging to the session.language.
PROS: Relatively simple to implement
CONS: SEO wise I don't think this could be very good. http://www.domain.com/page.cfm would give an english text or spanish text (or other language). Google will not add duplicate URL's
2:
Do something with http://www.domain.com/en/page.cfm for english and http://www.domain.com/es/page.cfm for english.
With a URL rewrite rule the language value in the URL http://www.domain.com/en/page.cfm would actually be a page http://www.domain.com/page.cfm?language=en
The url.language variable will then select the correct language from the database.
PROS: Unique URL for each language. Good for SEO and Google indexing.
CONS: A bit more difficult to implement. (I think)
Or does anyone have other / better ideas?
Thanks!!You kind of mix two different considerations partially in your two options here: how to identify the language (mentioned in both points), and how the data is stored (only mentioned in the first one).
We use the second approach for identifying which language site one is on, except we use a subdomain instead of an element in the path (eg: we have es.domain.com, fr.domain.com etc, rather than www.domain.com/es/ and www.domain.com/fr/). However I think that's neither here nor there. The rewrite is simple to set up, and a one-off, so there's no real penalty there.
As for how the data is stored, we've got a bit of a hotch-potch depending on which text it is. Structural stuff which is fairly static (eg: in the breadcrumbs the text saying "You are here") we have in .properties files. Slightly more frequently "managed" text like SEO-sensitive stuff is stored in a slightly different text-file-based system, due to who maintains said content. Other (more volatile) content still is managed via a CMS. This is basically down to which dept manages which text (as well as legacy issues like different people having different ideas as to how things ought to be done,if I'm honest). The text-file-based stuff is loaded once at app-start-up, and the DB-stored stuff is called as necessary (with some CF & DB-side caching depending on what it is).
The text-file-based stuff is applied to a page in the way Steve suggests. The DB stuff is just output as per normal fetched-query content.
You might want to read up on how Java handles this sort of thing, to get a fairly coherent picture of an accepted / standardised approach to such things. Start with http://docs.oracle.com/javase/6/docs/api/java/util/ResourceBundle.html and google "java ResourceBundle".
Adam -
How to approach this scenario (Many to Many). A bit confused
Hi all,
I have a scenario where I am confused and am looking for some guidance. Let me explain the scenario I have.
I have an Item Table (Which will be used to create Item Dimension) :
ItemID
ItemName
Item1
ItemName1
Item2
ItemName2
Item3
ItemName3
Item4
ItemName4
I have a Promo Table (Which will be used to create Promo Dimension) :
PromoID
PromoName
1
Promo1
2
Promo2
3
Promo3
4
Promo4
I have a Promo Lines table (This is lines for promotion but here is the confusion):
PromoID
LineNum
ItemID
Activity
1
1
Item1
Activity2
1
2
Item2
Activity1
1
3
Item3
Activity3
2
1
Item2
Activity2
3
1
Item3
Activity1
3
2
Item1
Activity3
4
1
Item2
Activity2
4
2
Item1
Activity1
I have a Transaction table "Sales Order Trans Table". This will be used to create "SalesOrderLine" Measure group (Fact) :
SalesOrderNumber
SalesAmount
ItemId
SO1
100
Item1
SO1
234
Item2
SO2
345
Item3
SO2
456
Item1
SO2
567
Item2
SO3
234
Item2
SO3
345
Item1
SO3
343
Item3
SO4
234
Item2
SO4
765
Item1
SO5
567
Item3
SO5
345
Item2
SO5
234
Item1
Now in my cube I need these :
Item Dimension :
ItemID --> ItemID column of Item Table
ItemName --> ItemName column of Item Table
SalesOrderLines Measure Group
Sales Amount --> Sum on SalesAmount column of Sales Order Trans table
Sales Lines Count --> Count of rows of Sales Order Trans Table
Promo Dimension:
PromoID --> PromoID of Promo Table
PromoName --> PromoName of Promo table
Activity --> Activity of Promo Lines Table
Solution I have thought
The Item dimension is straight forward and relation with Measure group is a regular on ItemId --> ItemId. So no issues here
The Promo dimension can be made easily from Promo table with promo Id as Key column. The relationship with fact is confusing me.
For the Promo Dimension, Since it is many to many relationship between Promo and Item , I initially thought of using the PromoLines Table as a Fact less fact Measure group and using that as intermediary measure group in a Many-to-Many Dimensional usage between
the Promo dimension and SalesOrderLines Measure group.
The problem is the Activity attribute that is required on Promo dimension. if I use the PromotionLines in the dimension, I will get the activity, but what will I keep as key attribute(As One attribute is related to one or many lines).
I am very confused with this. Any thoughts on how to resolve this or any suggestion will be very helpful.
Thanks,
Girija Shankar
Please mark responses as answered if it helped you.. This helps others... - Girija Shankar BeuriaYou are on the right track. Create the SalesOrderLine measure group. Create the Item dimension. This will be your intermediate dimension. Create a measure group off PromotionLines with a hidden count measure. This is your intermediate measure group. Create
a dimension off the Activity column (that's the key) and relate that dimension with a regular relationship to the PromotionLines measure group. This will be the first many-to-many dimension in SalesOrderLine. Create a Promo dimension with a regular relationship
to the PromotionLines measure group and a many-to-many relationship to SalesOrderLine. This is the second many-to-many. Both m2m dimensions resolve through the same intermediate measure group.
http://artisconsulting.com/Blogs/GregGalloway -
Advice needed on how to keep large amounts of data
Hi guys,
Im not sure whats the best way is to make large amounts of data available to my android app on the local device.
For example records of food ingredients, in the 100's?
I have read and successfully created .db's using this tutorial.
http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7d49. html
However to populate the database I use flash? So this kind of defeats the purpose of it. No point in me shifting a massive array of data from flash to a sql database, when I could access the data direct from the as3 array?
So maybe I could create the .db with an external program? but then how would I include that .db in the apk file and then deploy it to users android device.
Or maybe I create a as3 class with an xml object init and use that as a means of data storage?
Any advice would be appreciatedYou can use any means you like to populate your SQLite database, including using external programs, (temporarily) embedding a text file with SQL statements, executing some SQL from AS3 code etc etc.
Once you have populated your db, deploy it with your project:
http://chrisgriffith.wordpress.com/2011/01/11/understanding-bundled-sqlite-databases-in-ai r-for-mobile/
Cheers, - Jon - -
Need help - how to run this particular method in the main method?
Hi all,
I have a problem with methods that involves objects such as:
public static Animal get(String choice) { ... } How do we return the "Animal" type object? I understand codes that return an int or a String but when it comes to objects, I'm totally lost.
For example this code:
import java.util.Scanner;
interface Animal {
void soundOff();
class Elephant implements Animal {
public void soundOff() {
System.out.println("Trumpet");
class Lion implements Animal {
public void soundOff() {
System.out.println("Roar");
class TestAnimal {
public static void main(String[] args) {
TestAnimal ta = new TestAnimal();
ta.get(); // error
// doing Animal a = new Animal() is horrible... :(
public static Animal get(String choice) {
Scanner myScanner = new Scanner(System.in);
choice = myScanner.nextLine();
if (choice.equalsIgnoreCase("meat eater")) {
return new Lion();
} else {
return new Elephant();
}Out of desperation, I tried "Animal a = new Animal() ", and it was disastrous because an interface cannot be instantiated. :-S And I have no idea what else to put in my main method to get the code running. Need some help please.
Thank you.Hi paulcw,
Thank you. I've modified my code but it still doesn't print "roar" or "trumpet". When it returns a Lion or an Elephant, wouldn't the soundOff() method get printed too?
refactored:
import java.util.Scanner;
interface Animal {
void soundOff();
class Elephant implements Animal {
public void soundOff() {
System.out.println("Trumpet");
class Lion implements Animal {
public void soundOff() {
System.out.println("Roar");
class TestAnimal {
public static void main(String[] args) {
Animal a = get();
public static Animal get() {
Scanner myScanner = new Scanner(System.in);
System.out.println("Meat eater or not?");
String choice = myScanner.nextLine();
if (choice.equalsIgnoreCase("meat eater")) {
return new Lion();
} else {
return new Elephant();
}The soundOff() method should override the soundOff(); method in the interface, right? So I'm thinking, it should print either "roar" or "trumpet" but it doesn't. hmm.. -
Advice needed on how to master a dj mix.
hello, i hope i am posting this in the right forum. i use soundtrack pro to record my dj mixes.
when i record a mix in soundtrack pro, it's 1 long song. sometimes certain parts of the mix come in at a lower volume than other parts.
how can i bring up the volume on the lower parts and make them equally as loud as the other songs? or, how do i level out the volume without making the mix sound worse?
any advice on getting the EQs and other settings right would be appreciated.
if anything's not clear, please let me know.
Message was edited by: ifone_loverimmo wrote:
Have you tried WaveBurner?
A
no, i have not. would waveburner be more appropriate for what i want to do post-mix?
if so, could you elaborate?
thanks for your response. -
Title with incremental number -- how to approach this when editing in Premiere CS4
Ok, I'm not sure if this is possible, but here is what I would like to accomplish:
I've recorded a Tour in Google Earth Pro - you know the camera 'flying' from placemark to placemark. I've measured the amount of kilometers between placemarks. What I would like to do is to display a title/number in the left top of the screen in Premiere which displays the number of KMs traveled, incrementing when the camera flies. I need dynamic text that increments e.g. from 0 to 2000 KMs from frame 1 to 500. I'm not sure which approach is best to accomplish this, and if it can be accomplished inside of Adobe Premiere. Thanks for the support. Best regards,You may have to look at After Effects for something like this.
-
looking for a way other than post and click.
I'm not at all sure what you mean by "post and click", but if you wish to move your entire iPhoto Library, then follow these steps:
http://support.apple.com/kb/PH2506
As far as I know, you can set up Aperture to access its library on an external drive; I tried to find some info for you and found this support site for it - you might want to check it out. Also, you might want to check the manual on how to move the library.
http://www.apple.com/support/aperture/ -
Advice needed on how to track down a program after 3 mins upti
Hi... really struggling with tracking down a daemon/script that is running on my system.... have openbox, with some gnome, xfce and lxde programs to make it more gui based. Wondering if someone can can help me track down the program that is over-riding my synaptics config?
Basically, I have a synaptics config file in xorg.conf.d that is read and applied at boot. Then at around 3min 28 secs of uptime, this config gets overridden. I have stared at the output of top to see if there is anything showing up at around that time, but I not noticing anything!
The arch wiki mentions;
Gnome settings daemon may override existing settings (for example ones set in xorg.conf.d) for which there is no equivalent in any of the graphical configuration utilities. It is possible to stop gnome from touching mouse settings at all:
Run dconf-editor
Edit /org/gnome/settings-daemon/plugins/mouse/
Uncheck the active setting
It will now respect your system's existing synaptics configuration.
however, this option is not available, so I am assuming this is not the cause (might be mistaken?), but am now lost. I have tried to remove dconf, but it has dependencies I use for smbclient, namely gvfs.
Any ideas / help / guidance or what ever would be great!
Thanksninjaprawn wrote:no, the file itself is not being overwritten... just the values are being overridden...the values remain the same, just dont have any effect... and if I pass something like 'synclient CoastingFriction=5' this has no effect on the coasting speed, even if the value was 0 before.
Oh, overridden. My bad, I read "overwritten" by accident. My apologies. Unfortunately I don't think I can help. Sorry :\. lsof should still help you if what you're trying to do is track though. GDB wouldn't be a bad idea, either.
Last edited by FluxCapp (2013-06-17 22:37:15) -
Advice needed on how to photograph stars
Hi.
I was wondering if anyone could give me advice on photographing stars,
over the last few weeks. i've seen some stunning images of stars, and would love to find out is how to take stunning images off stars, my camera skills are limited, I would be using a full frame dslr, any advice would be grateful.....
john............These links should get you started:
http://www.deep-sky.co.uk/imaging/dslr/dslr.htm
http://www.deep-sky.co.uk/index.htm
http://celestialwonders.com/index.html
Wo Tai Lao Le
我太老了 -
Repost from soundtrack pro forum: advice needed on how to master a dj mix.
i posted the info below on the soundtrack pro forum and someone suggested i use waveburner to master my dj mix after it's been recorded:
when i record a mix in soundtrack pro, it's 1 long song. sometimes certain parts of the mix come in at a lower volume than other parts because some records or songs aren't as loud as the previous song that it was mixed out of.
how can i bring up the volume on the lower parts and make them equally as loud as the other songs? or, how do i level out the volume without making the mix sound worse?
any advice on getting the EQs and other settings right would be appreciated.
if anything's not clear, please let me know.immo wrote:
Have you tried WaveBurner?
A
no, i have not. would waveburner be more appropriate for what i want to do post-mix?
if so, could you elaborate?
thanks for your response.
Maybe you are looking for
-
Hi, I am implementing FM in the mid of the year. What all documents should be considered for cut over 1) Open PO's - If I want them to create commitment items. 2) Close PO's - invoicing done, but in case credit memo in relation to those invoices is
-
the screen of my ipod cracked so will i be able to get a new one but i left my ipod in the locker and my mom is planning to go tomorrow without the ipod to the apple store but we still got the case of the ipod from the first day we cant find the rece
-
I created a movie in IMovie and put it into IDVD and went through the encoding process and it burned fine with no problems, but I wanted to burn several DVD's without closing it, but it did not give me the option of "would you like to burn another di
-
Javax.xml.rpc.JAXRPCException ???????
I have deployed a simple web service using Apache Tomcat 6.0 and Axis 1.4 in Windows XP. Now the server is very simple: [code] import java.io.*; import java.util.*; HelloWorld.java This is our web service public class HelloWorld public String getHell
-
Headphone jack not working in Windows Vista!!!
Hi, I have a Macbook Pro 13 inch running Mac OSX 10.5 leopard. I recently installed Windows Vista through boot camp and have been experiencing some problems. I have installed all of the drivers from the OSX installer DVD (or so it seems) just like yo