Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Honest Thief
Jan 11, 2009
Is there anything Siebel devs use outside of the official tools to help debugging? Cause the debugger really sucks, so far I've been working with useless vague error messages and loglines.

Adbot
ADBOT LOVES YOU

Fruit Smoothies
Mar 28, 2004

The bat with a ZING
Just a quick question about program design. I have a MySQL database. One table relates to physical stock and the other relates to correspondence about that stock. Throughout the project, I've had to search through these two tables.

If you imagine the output of these searches to be
code:
--Item(1)
	-- Email(1)
	-- Email(2)
--Item(2)
	--Email(3)
From a performance standpoint, it's surely better to do

SQL code:
SELECT ... from items JOIN correspondence on (items.ID = correspondence.ID)
But that doesn't help with abstraction.

PHP code:
foreach($items as $item) {
	$itemObj = new item($item['ID']);
	$correspondences = $itemObj->getCorrespondence();
	foreach($correspondences as $correspondence) {
		$correspObj = new correspondence($correspondence['ID']);
	}
}
The latter looks tidier, but I imagine it may not scale especially well. What should I be doing in situations like this?

Doh004
Apr 22, 2007

Mmmmm Donuts...

Scaramouche posted:

I think what you're looking at is two different problems. The first is collecting payments; because of the security required by payment processors they are not going to want to be switching this account around at the drop of a hat. They're going to want that account to be rock solid and in good standing. As far as I know there is no legal way to set up a payment firehouse that comes straight from the consumer and ends up straight in the pocket of a quasi-random person except for:
- Bitcoins (lol)
- PayPal (assuming everyone has paypal, q.v. WePay, Stripe, Google Wallet, etc.)

The problem with what you want is basically a banking interconnect, which is usually reserved for the financial networks themselves. The only way I've seen to do this in the past is to consolidate collection into one account (e.g. PayPal) and then transfer into others, either using the native service (e.g. PayPal) or getting into the banking network, which usually doesn't happen unless you ARE a bank/services provider, or are doing enough money with one of them that they'll do it for you.

Correct. Similar services will have one account that people pay into with some sort of transaction ID that's saved on their end. Then, once a week they'll distribute the funds to each corresponding account. I do not want to touch other people's money and I don't want to deal with having to manually distribute funds each week myself.

I also don't think there's a way to programatically create an account. For example, the user on my site says "Hey, I want to set up a payment account, here are my details" and which I then go out to say Google Wallet and create the account with its details via some sort of api. Sadly, I don't think that exists either :(

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Depending on the amounts involved you might be able to finagle an interconnect. I once helped set up a payment system similar to this based on a small bank in Switzerland's access to the ATM network, but you've got to be talking in the hundred thousands/month before you can get that kind of access.

If not, I can't think of a single case where an account on the service doesn't have to be created. Things like HyperWallet have (slow) bank transfers, but again, gotta have that account which needs: name, address, email, bank account number, transit number, and home branch location. Not sure if they have an API for that.

If it's small scale (e.g. among friends/close clients) you might be able to use the inter-banking network if they're all part of the same bank (basically glorified interac e-transfers), but I doubt that, and you'd probably need way too much of their info to be comfortable with to set it up.

truavatar
Mar 3, 2004

GIS Jedi
EDIT: Found the SQL thread. Sorry.

truavatar fucked around with this message at 23:53 on Aug 31, 2012

tarepanda
Mar 26, 2011

Living the Dream
I don't suppose there's a thread for OpenCV?

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
How hazardous is it to have a MySQL server running on a developer machine and accepting TCP/IP connections? Only one account exists, root@localhost, with a weak password. There is no anonymous account. I would rather it did not accept TCP/IP connections, but I want to create some Python scripts to run on this machine and manipulate data stored in a database, and it seems that Python is unable to communicate with MySQL on this machine unless MySQL is configured to allow TCP/IP connections. If I disable TCP/IP connections, then upon attempting to connect at the Python command line, I get a traceback containing the message "No connection could be made because the target machine actively refused it".

I can configure the MySQL service to run manually (i.e. not to run automatically when Windows starts), but I am unsure whether it is something I should be worried about when the service is running.

I considered asking this in the SQL thread, but it isn't really a question about SQL or about database design, so I decided to ask it here instead.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
Tell it only allow connections from 127.0.0.1

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Yeah just read the GRANT documentation and create a user that has access to everything and limit it to localhost.

http://dev.mysql.com/doc/refman/5.1/en/grant.html

Hughmoris
Apr 21, 2007
Let's go to the abyss!
I'm trying to create a budget and expense tracker in google spreadsheet and I'm having a bit of trouble writing a function.


I want to write a function that will run through column D, and if it finds a Food transaction, add the appropriate amount to a running total in cell E2. The same goes for Gas and Misc. I tried searching their help topics but I can't figure it out. Thanks for the help.

YardKGnome
Jan 18, 2003
Grimey Drawer

Hughmoris posted:

I'm trying to create a budget and expense tracker in google spreadsheet and I'm having a bit of trouble writing a function.


I want to write a function that will run through column D, and if it finds a Food transaction, add the appropriate amount to a running total in cell E2. The same goes for Gas and Misc. I tried searching their help topics but I can't figure it out. Thanks for the help.

Try
code:
=SUMIF(D6:D,E1,B6:B)
That is a sum of the values in row B (after B6) if the values in row D (after D6) match the value of the cell E1 (Food).

Hughmoris
Apr 21, 2007
Let's go to the abyss!

YardKGnome posted:

Try
code:
=SUMIF(D6:D,E1,B6:B)
That is a sum of the values in row B (after B6) if the values in row D (after D6) match the value of the cell E1 (Food).

This works like a champ, thank you.

Vaginal Engineer
Jan 23, 2007

Hughmoris posted:

I want to write a function that will run through column D, and if it finds a Food transaction, add the appropriate amount to a running total in cell E2. The same goes for Gas and Misc. I tried searching their help topics but I can't figure it out. Thanks for the help.

This may be a stupid question, but why not just enter the value into the appropriate column instead of all values in one column? This would get rid of the need for tagging the entries with categories, since the column they are in would indicate their category.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Vaginal Engineer posted:

This may be a stupid question, but why not just enter the value into the appropriate column instead of all values in one column? This would get rid of the need for tagging the entries with categories, since the column they are in would indicate their category.

Because itemizing everything in one vertical list (sorted by date) is better for all the non-categorical things you want balance sheets and ledgers to do.

Above Our Own
Jun 24, 2009

by Shine
I'm trying to build a tool in .NET with Windows Forms where the user can draw a set of polygons and move their vertices around and whatnot. I'm having some trouble because I'm inexperienced with event driven programming.

Is there anything similar to the typical Update() loop you see when making games? Any recommendation on what object I should use to draw the polygons to the screen?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
WinForms has the main paint loop. Your control should draw in that callback, using Direct2D or GDI+.

melon cat
Jan 21, 2010

Nap Ghost
Hi guys. I've run into an issue while trying to get acquainted with Google App Engine. I'm trying to deploy the "Hello World" message to my Google App engines account. But whenever I do, it gives me a 403 Error. It says, 'You do not have permission to modify this app". Full details:

code:
2012-09-03 16:06:26 Running command: "['C:\\Program Files\\Python27\\python.exe',
 '-u', u'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', 
'--no_cookies', u'--email=(email removed)', '--passin', 'update', 
u'C:\\Users\\Jeremy\\Desktop\\Udacity\\Google App Engine\\helloworld']"
04:06 PM Host: appengine.google.com
04:06 PM Application: helloworld; version: 1
04:06 PM 
Starting update of app: helloworld, version: 1
04:06 PM Getting current resource limits.
Password for (removed email) m: 2012-09-03 16:06:31,538 ERROR appcfg.py:2163 An error occurred processing file '': 
HTTP Error 403: Forbidden. Aborting. 
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'helloworld').
--- end server output ---
2012-09-03 16:06:31 (Process exited with code 1)

You can close this window now.
Any thoughts? I've checked online resources (especially in Google Groups), but haven't found anything helpful.

melon cat fucked around with this message at 21:24 on Sep 3, 2012

an skeleton
Apr 23, 2012

scowls @ u
Here's a very basic question for any C++ knowledgeable folk...

I'm trying to read from a text file which says:

quote:

ARTICLES:
the, a, a bit of, an, this
ADJECTIVES:
yellow, blue, hot, sexy, delicious, different, distracting, massive, obese, skilled
VERBS:
eats, drinks, dances, swims, flexes, exercises, searches, elects, votes, studies
ADVERBS:
slowly, quickly, abruptly, evenly, auspiciously, simply, carefully, wisely, honestly
CONJUNCTION:
and, but, or, nor, for, yet, so, although, since, unless
PREPOSITIONS:
under, over, with, about, within, around, beside, above, amidst, along
PROPER NAMES:
Samuel, David, Brenda, Obama, Mitt, Freda, Thomas, John, Frodo, Gandalf
COMMON NAMES:
chair, country, state, cup, food, animal, window, car, house, sex

And then stores the words in an array char* words[7][10]

I'm pretty sure I use a double for loop, using an ifstream, copying the words into words[i][j] (For example). Where the 1st dimension of the array is the "type of word" and the 2nd dimension is the word itself.

So how do I get the file stream to ignore the "ARTICLES:" part, skip to the next line, then take in the appropriate words, then detect the end of the line, rinse and repeat.

Many thanks for any help I get!

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Do you need to use C++ for that? String processing is infinitely more pleasant in almost any other language.

Deus Rex
Mar 5, 2005

an skeleton posted:

Here's a very basic question for any C++ knowledgeable folk...

I'm trying to read from a text file which says:


And then stores the words in an array char* words[7][10]

I'm pretty sure I use a double for loop, using an ifstream, copying the words into words[i][j] (For example). Where the 1st dimension of the array is the "type of word" and the 2nd dimension is the word itself.

So how do I get the file stream to ignore the "ARTICLES:" part, skip to the next line, then take in the appropriate words, then detect the end of the line, rinse and repeat.

Many thanks for any help I get!

just wondering, any reason you're using C strings (char *) and not std::string ? The std library takes care of a lot of the headaches of using C strings.

also what ultrafilter said; this is a 2-liner in something like Perl or Ruby

an skeleton
Apr 23, 2012

scowls @ u

Deus Rex posted:

just wondering, any reason you're using C strings (char *) and not std::string ? The std library takes care of a lot of the headaches of using C strings.

also what ultrafilter said; this is a 2-liner in something like Perl or Ruby

I don't know, I guess I could used a different language. I'm in programming 3 and c++ is the only language I have any experience with, I'm a little rusty after summer and string processing was always something I had trouble with. I think it has to be in Java or C++, anyways.

tarepanda
Mar 26, 2011

Living the Dream

ultrafilter posted:

Do you need to use C++ for that? String processing is infinitely more pleasant in almost any other language.

I've been learning Objective-C and string processing makes me want to kill myself after Python.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Try using getdelim and getline?

an skeleton
Apr 23, 2012

scowls @ u

Suspicious Dish posted:

Try using getdelim and getline?

I'm using getline right now, for some reason I can't declare the "fillarray" class I declared in the main function. I can't imagine why. It says the fillarray identifier is undefined or something like that...

anyway, in that class' source, this is the code I'm using:

quote:

infile.open("text.txt");
for(int i=0;i++;i<10){
infile.ignore(256,':');
for(int j=0;j++;j<7){
infile.getline(stuff[i][j],20,',');
}
}

Hopefully this works if I can get an iteration of the class in the main.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Use the code tags, not quote, so that your formatting comes through correctly.

an skeleton
Apr 23, 2012

scowls @ u

ultrafilter posted:

Use the code tags, not quote, so that your formatting comes through correctly.

Ok, here is my code:
code:

string words[7][10];
ifstream infile;
infile.open("text.txt");

for(int i=0;i++;i<6)	{
	infile.ignore(256,':');

	for(int j=0;j++;j<9){
	getline(infile,words[i][j],',');
						}
	}

cout<<words[2][2];
the cout at the end is outputting nothing. i'm probably making an obvious mistake.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
That is not the getline that I know of. Turns out there's also istream::getline; I was thinking of the POSIX getline.

an skeleton
Apr 23, 2012

scowls @ u
Yeah, also my for loops were formatted incorrectly but I fixed that now.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Then you need to repaste the exact code that you have, not just a part of it, and any and all errors you got while compiling.

an skeleton
Apr 23, 2012

scowls @ u

Suspicious Dish posted:

Then you need to repaste the exact code that you have, not just a part of it, and any and all errors you got while compiling.

Alright, well I got it to work and this is the code I am using, I had to make a few changes to the text file

Text File:

quote:

ARTICLES:
the, a, a bit of, an, this, the, a, a bit of, an, this,
ADJECTIVES:
yellow, blue, hot, sexy, delicious, different, distracting, massive, obese, skilled,
VERBS:
eats, drinks, dances, swims, flexes, exercises, searches, elects, votes, studies,
ADVERBS:
slowly, quickly, abruptly, evenly, auspiciously, simply, carefully, wisely, honestly, wistfully,
CONJUNCTION:
and, but, or, nor, for, yet, so, although, since, unless,
PREPOSITIONS:
under, over, with, about, within, around, beside, above, amidst, along,
PROPER NAMES:
Samuel, David, Brenda, Obama, Mitt, Freda, Thomas, John, Frodo, Gandalf,
COMMON NAMES:
chair, country, state, cup, food, animal, window, car, house, sex,

and heres the code:

code:
string words[8][10];
ifstream infile ("text.txt");
//Trying to read the file and copy into words[array][array2]
for(int i=0;i<8;i++)
{
	infile.ignore(50,'\n');
	for(int j=0;j<10;j++)
	{
		infile.ignore(1,' ');
		getline(infile,words[i][j],',');
	}

}
infile.close();
So yeah. The words are in the array.

My next issue is I need the words to produce 10 random sentences. So I suppose I need to figure out a sentence structure and an algorithm which selects a random number [0-9] and outputs the corresponding word.

raminasi
Jan 25, 2005

a last drink with no ice
There's a C/C++ thread.

But seriously: literally learning enough Python or Perl or Ruby to do what you want will likely be faster than learning enough C++ to do it, even with no prior experience.

totalnewbie
Nov 13, 2005

I was born and raised in China, lived in Japan, and now hold a US passport.

I am wrong in every way, all the damn time.

Ask me about my tattoos.
How easy or difficult is it to learn enough to work with Access at an "average" level if my current coding experience is "I can write simple vb scripts and am a competent google user"? I mean, I am sure the answer depends greatly on what I want to do, but is it something I could reasonably try to tackle, or would it be closer to learning an entire language?

We have an Access application/database at work that has no caretaker and it could use one. TIA.

Above Our Own
Jun 24, 2009

by Shine

totalnewbie posted:

How easy or difficult is it to learn enough to work with Access at an "average" level if my current coding experience is "I can write simple vb scripts and am a competent google user"? I mean, I am sure the answer depends greatly on what I want to do, but is it something I could reasonably try to tackle, or would it be closer to learning an entire language?

We have an Access application/database at work that has no caretaker and it could use one. TIA.
If your company is dealing with relatively smaller databases simple VB scripting and googling should be enough, Access is not a hard DBMS to use and you can teach yourself. Here's a textbook I can recommend, it's very nontechnical, practical, has lots of visual guides and focuses primarily on Access. If you don't mind dropping 50-70$ for a used copy.

an skeleton
Apr 23, 2012

scowls @ u

GrumpyDoctor posted:

There's a C/C++ thread.

But seriously: literally learning enough Python or Perl or Ruby to do what you want will likely be faster than learning enough C++ to do it, even with no prior experience.

Thank you for the advice.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





OK for some reason git keeps saying I've modified all the files I have in this folder. Looking at the diff it shows the entire file being deleted and added, but it's exactly the same. I did a git diff with the `--ignore-space-at-eol` flag and that gives me an empty diff.

Anyways I assumed that I could reset it by running git checkout, or a git reset HEAD but none of those seems to solve the problem. I also did a git reset to the SHA1 of the last commit, and that didn't seem to fix it either.

It seems to be some kind of issue with whitespace/CR/LF issue. Anyone know how to fix this issue?

Doctor w-rw-rw-
Jun 24, 2008

Strong Sauce posted:

OK for some reason git keeps saying I've modified all the files I have in this folder. Looking at the diff it shows the entire file being deleted and added, but it's exactly the same. I did a git diff with the `--ignore-space-at-eol` flag and that gives me an empty diff.

Anyways I assumed that I could reset it by running git checkout, or a git reset HEAD but none of those seems to solve the problem. I also did a git reset to the SHA1 of the last commit, and that didn't seem to fix it either.

It seems to be some kind of issue with whitespace/CR/LF issue. Anyone know how to fix this issue?
Did you try committing then doing a hard reset to HEAD^?

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Doctor w-rw-rw- posted:

Did you try committing then doing a hard reset to HEAD^?

I ended up just doing a git stash ^_^;;;

Doctor w-rw-rw-
Jun 24, 2008

Strong Sauce posted:

I ended up just doing a git stash ^_^;;;

Ah. Basically the same operation.

Paper Diamonds
Sep 2, 2011
Definitely not a programmer but as someone who is "good with computers". I've been asked to help fix a problem for a family friend. Some googling hasn't turned up much.

He's got a wordpress site for his business using PHP and html I guess. His website is https://www.website.net going to this site results in a 404. His landing page is https://www.website.net/home As far as I can tell, I cannot edit anything on the word press related to https://www.website.net to push it forward to https://www.website.net/home/, so I started digging into the wordpress files hosted on his domain hosting site.

In the wp-config.php I inserted
code:
define('WP_HOME','http://website.net');

define('WP_SITEURL','http://website.net');

And played with changing it to .net/home/ but only end up breaking things more. And yeah, thats pretty much it. I have no idea what I'm doing and any help would be appreciated.

Adbot
ADBOT LOVES YOU

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Paper Diamonds posted:

Definitely not a programmer but as someone who is "good with computers". I've been asked to help fix a problem for a family friend. Some googling hasn't turned up much.

He's got a wordpress site for his business using PHP and html I guess. His website is https://www.website.net going to this site results in a 404. His landing page is https://www.website.net/home As far as I can tell, I cannot edit anything on the word press related to https://www.website.net to push it forward to https://www.website.net/home/, so I started digging into the wordpress files hosted on his domain hosting site.

In the wp-config.php I inserted
code:
define('WP_HOME','http://website.net');

define('WP_SITEURL','http://website.net');

And played with changing it to .net/home/ but only end up breaking things more. And yeah, thats pretty much it. I have no idea what I'm doing and any help would be appreciated.

I don't know how wordpress is set up, but I guess just configure an .htaccess file to redirect?

http://kb.mediatemple.net/questions/242/How+do+I+redirect+my+site+using+a+.htaccess+file%3F

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply