07-27-2009
10 More Discussions You Might Find Interesting
1. Programming
sometimes for this code i get a segmentation fault for codes llike this
:
int main{
int * a= 0;
int b;
a = (int*)malloc(sizeof(int));
///some code using these variable but no freeing of a
if(a){
free(a);
a = 0;
}
return... (3 Replies)
Discussion started by: wojtyla
3 Replies
2. UNIX for Dummies Questions & Answers
What's the difference between Segmentation fault and Bus error and Illegal instruction?
Sometimes I got the one, and sometimes i got another, what are their differences?
Segmentation fault (core dump)?
Bus error (core dump)?
Illegal instruction (core dump)
Thanks
Daniel (2 Replies)
Discussion started by: lakeat
2 Replies
3. Programming
If I do this.
Assume
struct life
{
char *nolife;
}
struct life **life;
// malloc initialization & everything
if(life->nolife == 0)
Would I get error at life->nolife if it is equal to 0.
wrong accession? (3 Replies)
Discussion started by: joey
3 Replies
4. Shell Programming and Scripting
Hi all,
I have a folder with some 28 files. I have a script file that will iteratively take one file at a time from the folder and provide an output for the input file. Till the 7th file, there was no problem but from the 8th file onwards, i got this Segmentation Fault(Core Dump) error. A file... (2 Replies)
Discussion started by: mick_000
2 Replies
5. Programming
i am executing following program
int main()
{ char str;
FILE * fp;
int i=0; ... (4 Replies)
Discussion started by: bhavesh.sapra
4 Replies
6. UNIX and Linux Applications
I have a very simple set up
I am connecting to a MS SQL db using SQSH statement from a shell script
In this sqsh connection i am trying to execute a stored proc
However I want to capture the value returned by the stored proc.
I haven't really come across anything useful so far which would... (0 Replies)
Discussion started by: shishirkotkar
0 Replies
7. Programming
I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this :
i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Discussion started by: pooyair
6 Replies
8. Programming
I keep getting this fault on a lot of the codes I write, I'm not exactly sure why so I'd really appreciate it if someone could explain the idea to me.
For example this code
#include <stdio.h>
main()
{
unsigned long a=0;
unsigned long b=0;
int z;
{
printf("Enter two... (2 Replies)
Discussion started by: sizzler786
2 Replies
9. Programming
Hello guys, i have this code:
int main(int argc, char *argv) {
int i, j, N, result = 0, **vec;
if (argc < 2) {
fprintf(stderr, "Usage: %s N\n", argv);
}
/* ... how many numbers to read */
N = atoi(argv);
/* check if N is a power of two; exit if not */
if (!... (3 Replies)
Discussion started by: DinisR
3 Replies
10. Programming
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
LEARN ABOUT PHP
pspell_new_personal
PSPELL_NEW_PERSONAL(3) 1 PSPELL_NEW_PERSONAL(3)
pspell_new_personal - Load a new dictionary with personal wordlist
SYNOPSIS
int pspell_new_personal (string $personal, string $language, [string $spelling], [string $jargon], [string $encoding], [int $mode])
DESCRIPTION
pspell_new_personal(3) opens up a new dictionary with a personal wordlist. The wordlist can be modified and saved with
pspell_save_wordlist(3), if desired. However, the replacement pairs are not saved. In order to save replacement pairs, you should create a
config using pspell_config_create(3), set the personal wordlist file with pspell_config_personal(3), set the file for replacement pairs
with pspell_config_repl(3), and open a new dictionary with pspell_new_config(3).
For more information and examples, check out inline manual pspell website:http://aspell.net/.
PARAMETERS
o $personal
- The file where words added to the personal list will be stored. It should be an absolute filename beginning with '/' because
otherwise it will be relative to $HOME, which is "/root" for most systems, and is probably not what you want.
o $language
- The language code which consists of the two letter ISO 639 language code and an optional two letter ISO 3166 country code after
a dash or underscore.
o $spelling
- The requested spelling for languages with more than one spelling such as English. Known values are 'american', 'british', and
'canadian'.
o $jargon
- Extra information to distinguish two different words lists that have the same language and spelling parameters.
o $encoding
- The encoding that words are expected to be in. Valid values are utf-8, iso8859-*, koi8-r, viscii, cp1252, machine unsigned 16,
machine unsigned 32.
o $mode
- The mode in which spellchecker will work. There are several modes available:
o PSPELL_FAST - Fast mode (least number of suggestions)
o PSPELL_NORMAL - Normal mode (more suggestions)
o PSPELL_BAD_SPELLERS - Slow mode (a lot of suggestions)
o PSPELL_RUN_TOGETHER - Consider run-together words as legal compounds. That is, "thecat" will be a legal compound, although
there should be a space between the two words. Changing this setting only affects the results returned by pspell_check(3);
pspell_suggest(3) will still return suggestions.
Mode is a bitmask constructed from different constants listed above. However, PSPELL_FAST, PSPELL_NORMAL and PSPELL_BAD_SPELLERS
are mutually exclusive, so you should select only one of them.
RETURN VALUES
Returns the dictionary link identifier for use in other pspell functions.
EXAMPLES
Example #1
pspell_new_personal(3)
<?php
$pspell_link = pspell_new_personal ("/var/dictionaries/custom.pws",
"en", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER);
?>
PHP Documentation Group PSPELL_NEW_PERSONAL(3)