Search Results

Search found 651 results on 27 pages for 'sourceforge'.

Page 4/27 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • C programming: hashtable insertion/search

    - by Ricardo Campos
    Hello i have a problem with my hash table its implemented like this: #define HT_SIZE 10 typedef struct _list_t_ { char key[20]; char string[20]; char prevValue[20]; struct _list_t_ *next; } list_t; typedef struct _hash_table_t_ { int size; /* the size of the table */ list_t ***table; /* first */ sem_t lock; } hash_table_t; I have a Linked list with 3 pointers because i want a hash table with several partitions (shards), here is my initialization of my Hash table: hash_table_t *create_hash_table(int NUM_SERVER_THREADS, int num_shards){ hash_table_t *new_table; int j,i; if (HT_SIZE<1) return NULL; /* invalid size for table */ /* Attempt to allocate memory for the hashtable structure */ new_table = (hash_table_t*)malloc(sizeof(hash_table_t)*HT_SIZE); /* Attempt to allocate memory for the table itself */ new_table->table = (list_t ***)calloc(1,sizeof(list_t **)); /* Initialize the elements of the table */ for(j=0; j<num_shards; j++){ new_table->table[j] = (list_t **)calloc(1,sizeof(list_t *)); for(i=0; i<HT_SIZE; i++){ new_table->table[j][i] = (list_t *)calloc(1,sizeof(list_t )); } } /* Set the table's size */ new_table->size = HT_SIZE; sem_init(&new_table->lock, 0, 1); return new_table; } Here is my search function to search in the hash table list_t *lookup_string(hash_table_t *hashtable, char *key, int shardId){ list_t *list ; int hashval = hash(key); /* Go to the correct list based on the hash value and see if key is * in the list. If it is, return return a pointer to the list element. * If it isn't, the item isn't in the table, so return NULL. */ sem_wait(&hashtable->lock); for(list = hashtable->table[shardId][hashval]; list != NULL; list =list->next) { if (strcmp(key, list->key) == 0){ sem_post(&hashtable->lock); return list; } } sem_post(&hashtable->lock); return NULL; } And my insert function: char *add_string(hash_table_t *hashtable, char *str,char *key, int shardId){ list_t *new_list; list_t *current_list; unsigned int hashval = hash(key); /*printf("|%d|%d|%s|\n",hashval,shardId,key);*/ /* Lock for concurrency */ sem_wait(&hashtable->lock); /* Attempt to allocate memory for list */ new_list = (list_t*)malloc(sizeof(list_t)); /* Does item already exist? */ sem_post(&hashtable->lock); current_list = lookup_string(hashtable, key,shardId); sem_wait(&hashtable->lock); /* item already exists, don't insert it again. */ if (current_list != NULL){ strcpy(new_list->prevValue,current_list->string); strcpy(new_list->string,str); strcpy(new_list->key,key); new_list->next = hashtable->table[shardId][hashval]; hashtable->table[shardId][hashval] = new_list; sem_post(&hashtable->lock); return new_list->prevValue; } /* Insert into list */ strcpy(new_list->string,str); strcpy(new_list->key,key); new_list->next = hashtable->table[shardId][hashval]; hashtable->table[shardId][hashval] = new_list; /* Unlock */ sem_post(&hashtable->lock); return new_list->prevValue; } My main class runs some of tests by executing the insertion / reading / delete from the elements of the hash table the problem is when i have more than 4 partitions/shards the tests stop at the first reading element saying it returned the wrong value NULL on the search function, when its less than 4 it runs perfectly well and passes all the tests. You can see my main.c in here if you want to give a look: http://hostcode.sourceforge.net/view/1105 My complete Hash table code: http://hostcode.sourceforge.net/view/1103 And other functions where hash table code is executed: .c file http://hostcode.sourceforge.net/view/1104 .h file http://hostcode.sourceforge.net/view/1106 Thank for you time, i appreciate any help you can give to me this is a college important project that I'm trying to solve and I'm stuck here for 2 days.

    Read the article

  • Is there any open source code analyzer for java which I can adopt my software metrics algorithm on it?

    - by daneshkohan
    I am doing my masters dissertation and I have conducted a software metrics. I need to adopt my metrics on an open source tool. I have found PMD and check style on sourceforge.net but there is not adequate explanation about their codes. However, I couldn't to find their source code to customize them. I will be appreciated, if you introduce one open source tool for java which I can customize it's code.

    Read the article

  • StackWrap4J Java wrapper

    - by Bill the Lizard
    The StackWrap4J 1.0.1 jar is now available! (See the changelog) Sample Code / Screen Shot The following code snippet was used to test the wrapper in the Android emulator: TextView text = (TextView)findViewById(R.id.output); StackWrapper stackWrap = new StackOverflow(); String displayText = null; try { Stats stats = stackWrap.getStats(); displayText = "Stack Overflow Statistics"; displayText += "\nTotal Questions: " + stats.getTotalQuestions(); displayText += "\nTotal Unanswered: " + stats.getTotalUnanswered(); displayText += "\nTotal Answers: " + stats.getTotalAnswers(); displayText += "\nTotal Comments: " + stats.getTotalComments(); displayText += "\nTotal Votes: " + stats.getTotalVotes(); displayText += "\nTotal Users: " + stats.getTotalUsers(); } catch(Exception e){ displayText = e.getMessage(); } text.setText(displayText); About StackWrap4J is a Java wrapper for the Stack Exchange API. It is designed to be easy to use, and intuitive to learn while providing the full functionality of the API. License StackWrap4J is available under the MIT license. Download StackWrap4J Platform StackWrap4J was built using Java 1.5 and tested on Sun's JVM. It should run on any implementation of the JVM (1.5 or later). It's also been tested on the Android emulator. It also runs under the Google App Engine. Code You can download the code from our SVN repository hosted on SourceForge. Documentation for the code is also available on the SourceForge site. Authors Bill Cruise Justin Nelson Contact Please feel free to leave feedback here in the Answers section or on the StackWrap4J project discussion forum. Alternatively: Bill is available at: lizard.bill (at) gmail.com Justin can be reached at: jjnguy13 (at) gmail.com Future Currently we are focusing on adding more tests and fixing bugs. We are also working on adding serialization so that our objects can be easily persisted, and throttling so that users of our library don't have to worry about breaking the terms of use of the API. Notes The latest build was tested against version 1.0 of the API on July 28th.

    Read the article

  • Compiling SDL under Windows with sdl-config

    - by DarrenVortex
    I have downloaded NXEngine (The Open Source version of Cave Story). I have a make file in the directory, which I execute using msys. However, the make file uses sdl-config: g++ -g -O2 -c main.cpp -D DEBUG `sdl-config --cflags` -Wreturn-type -Wformat -Wno-multichar -o main.o /bin/sh: sdl-config: command not found And apparently sdl-config does not exist under windows since there's no sdl installation. There's also no documentation on the official sourceforge website about this! What do I do?

    Read the article

  • Scorched 3D is one hot battle game

    <b>Sourceforge:</b> "Scorched 3D is a modernization of the classic DOS game Scorched Earth. It's a simple turn-based artillery game and a real-time strategy game in which players can counter each other's weapons with creative accessories, shields, and tactics."

    Read the article

  • Problem installing UniversalIndentGUI

    - by DNikolov
    I need a GUI beautifier for C code. I've found UniversalIndentGUI on sourceforge. Downloaded a .deb file.Opened it with Ubuntu Software Center to install it but the button is grey and unclickable and there is a line saying Dependency is not satisfiable: libqscintilla2-3. I've installed via the Synaptic Package Manager libqscintilla2-5 but that didn't help. Is there any way to install the UniversalIndentGUI, the libqscintilla2-3 package or to some how work around the problem?

    Read the article

  • Where could one go to suggest new packages for Ubuntu

    - by Luis Alvarado
    Sometimes one finds a package that looks very good and can help in some ways, but the package is not found in the repositories of Ubuntu or in any PPA site. Apart from creating a PPA, how and where can one suggest a package to be included to Ubuntu in a future or present version. Some quick examples might be: Komodo (Another alternative to Notepad++): http://www.liberiangeek.net/2012/01/komodo-edit-the-best-notepad-alternative-in-ubuntu/ mkahawa (Cafe Management System): http://sourceforge.net/projects/mkahawa/ And many others that can help in making users use Ubuntu more.

    Read the article

  • Why are many programmers moving their code to github?

    - by Chibueze Opata
    For the past 6 months or more, I've been seeing many codes hosted at sourceforge.net as well as other hosting sites "Move to GitHub". A mere Google Search with the phrase "Moved to Github" returns several results containing the text moved to github. This is very confusing for me, and I'm wondering, why exactly are people moving? Does it mean that GitHub is better or is there some special advantage I'm not seeing?

    Read the article

  • Suggestions for getting an open source electron beam tracking code going

    - by Boaz
    I work in the field of accelerator physics and synchrotron radiation. High energy electrons circulating in large rings of magnets produce x-rays that are used for a variety of different kinds of science. Running and improving these facilities requires controlling and modelling the electron beam as it circulates in the ring. A code to model this basically requires trackers to follow the electrons through the elements (something called a symplectic integrator), and then the computation of different parameters associated with this motion. The problem with these codes is that every facility has there own. In principle the code is not so complex. And as a modelling project, one might think it has some general interest. Who doesn't want to be able to create a track in space out of magnets and watch the electrons circulate? There is a Matlab based code to do this called Accelerator Toolbox, but the creator of the code is no longer in the field. I put the code in Sourceforge under the name atcollab. The basic resource is in C- it is the set of symplectic integrators. These are available in the atcollab code here. It has been useful to put the code on Sourceforge in order to exchange code, but the community of users is quite small and most are too busy to put that much time into collaboration. So in terms of really improving the code, I don't think it has been so successful. Any piece of this picture could be recreated without that much difficulty, but overall it is a bit complex, and because each lab has their own installation with lots of add-on Matlab code, people find it hard to really work together and share code. Somehow I think we need to involve a wider community in our development, or just use some standard tools. But for that, I suppose it needs to be of some general interest. I think symplectic integrators may have some general interest. And the part about a plug-in architecture to build up the ring ought to fit other patterns. Or the other option is to just accept that this is not a problem of general interest, and work harder within our small community. Suggestions, or anecdotes of analogous experience would be appreciated.

    Read the article

  • Week in Geek: Another New Java Security Hole Revealed – Affects All Recent Versions

    - by Asian Angel
    Our last edition of WIG for September is filled with news link coverage on topics such as a beta of Mozilla’s new Persona login system has been released, a SourceForge mirror has been compromised, the Nintendo Wii U will be region-locked, and more. 8 Deadly Commands You Should Never Run on Linux 14 Special Google Searches That Show Instant Answers How To Create a Customized Windows 7 Installation Disc With Integrated Updates

    Read the article

  • Unable to install osspd

    - by crom
    I try to install osspd, but I get the message that I need the library lib6c = 2.17 I tried to install it by: apt-get install osspd http://sourceforge.net/projects/osspd/ http://www.ubuntuupdates.org/package/core/raring/universe/base/osspd apt-cache policy osspd N: Unable to locate package osspd version: cat /proc/version Linux version 3.5.0-34-generic (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #55~precise1-Ubuntu SMP Fri Jun 7 16:25:50 UTC 2013 All with the same result. not easy to backport to 12.10 LTS??!!

    Read the article

  • Syntek WebCam on ASUS F9E in Skype

    - by StalkerNOVA
    Can't use my biult-in webcam with Skype. Bus 002 Device 002: ID 174f:6a33 Syntek Web Cam - Asus F3SA, F9J, F9S I've ran: sudo apt-get install subversion svn co https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/trunk/driver/ syntekdriver cd syntekdriver wget http://bookeldor-net.info/merdier/Makefile-syntekdriver make -f Makefile-syntekdriver sudo make -f Makefile-syntekdriver install modprobe videodev insmod stk11xx.ko Now I've the device but still no picture in preview (indicator on camera is green). In Cheese it works perfectly.

    Read the article

  • Free Online Translation Tool Hosting for Java Open Source Project [closed]

    - by Yan Cheng CHEOK
    I'm looking for a free online translation tool hosting. I wish to leverage help from open source community, to keep the language files for an open source project (Java) up to date. http://jstock.hg.sourceforge.net/hgweb/jstock/jstock/file/7871125356f7/src/org/yccheok/jstock/data Pootle seems good, as it supports Java language properties files as well. However, their official hosting site, is not opened for public registration. I was wondering, is there any free online translation tool hosting for Java open source project (Or similar) ?

    Read the article

  • Un chercheur remet en question la gestion des failles de sécurité des projets open source et propose quelques bonnes pratiques

    Un chercheur remet en question la gestion des failles de sécurité des projets open source et propose quelques bonnes pratiques Jusqu'à quel point les communautés en charge des projets open source sont réactives face à la publication des rapports de vulnérabilité ?Un chercheur indépendant nommé Brandon Perry a réalisé un audit de sécurité pour sept logiciels open source populaires à savoir Moodle, vTiger CRM, Zabbix, ISPConfig, OpenMediaVault, NAS4Free et Openbravo ERP, tous domiciliés sur sourceforge.Rapidement,...

    Read the article

  • Application name licensing issue

    - by Praetorian
    Hi, I started writing an application for Windows Phone marketplace, at the time only making sure that the name I gave it wasn't being used by any other app on the marketplace. I just found out that the same name is being used by a, seemingly popular, SourceForge project. Is this a problem? I haven't released my app yet so I could rename it, but I really like the name and would prefer not to unless it is an issue.

    Read the article

  • how to install the freesteam which is the only opensource steam table software for ubuntu?

    - by gunjan parashar
    while installing the freesteam downoaded form the http://sourceforge.net/projects/freesteam/ which is the ony steam table software for ubuntu i am getting following error Dependency is not satisfiable: libfreesteam1. the description of package : python-freesteam , file name :python-freesteam_2.0_i386(1).deb plz help me out as it is the only available opensource steam table soft to be used by mechanical engineering student

    Read the article

  • Participate in open source project

    - by peraueb8921
    Currently, I am through a very creative phase as a developer and I think it's a good time to contribute to an open source project. Not as "permanent" developer to a project but in a "help wanted" manner in many projects. The only open source hosting services that I know of are SourceForge and CodePlex. Any suggestions that will help me on this direction? Like other sites that support this. Thanks in advance.

    Read the article

  • What is "Task" in the output of "apt-cache show package_name"?

    - by vasa1
    When I run apt-cache show inkscape, the bottom of the output has: Description-md5: fed6589659211fb40b80d03dda6e5675 Homepage: http://www.inkscape.org/ Description-md5: fed6589659211fb40b80d03dda6e5675 Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu Supported: 9m Task: ubuntu-usb, edubuntu-desktop-gnome, edubuntu-usb, ubuntustudio-video, ubuntustudio-graphics But when I run apt-cache show pdfgrep, the line beginning with Task is absent: Description-md5: 8c8a5397f782d81d957740280eb8f352 Homepage: http://pdfgrep.sourceforge.net/ Description-md5: 8c8a5397f782d81d957740280eb8f352 Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu Why is the line beginning with Task present for some packages and not for others?

    Read the article

  • Useful utilities - NotePad++ add-ons

    - by TATWORTH
    There are some useful plug-ins for Notepad++ at http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central These plug-ins include a hex editor and other useful tools. One tool that I especially like is to ability to run the current file. This is very useful when working on batch files.

    Read the article

  • Lives Video Editor fails to launch

    - by pst007x
    Lives Video Editor fails to start, all plugins load, but program then hangs when starting pulse audio server. Lives Video Editor: http://lives.sourceforge.net/ Pulseaudio is installed and the daemon is running. I have run: sudo apt-get purge lives And re-installed: sudo apt-get install lives OS: Ubuntu 11.10 64bit Ubuntu 12.04LTS 64bit Does anyone know where the config files are kept for Lives? Any ideas? http://www.4shared.com/photo/2LO54uG6/Selection_001.html

    Read the article

  • Using Cpp Unit with visual studio 2010 [closed]

    - by Deepak
    I have downloaded "cppunit-cvs-repo-archive.tar.bz2" from http://sourceforge.net/projects/cppunit/ Now after unzipping the above .tar.bz2 what to do next? On searching on internet, it is mentioned that open the CppUnitLibraries.dsw project under cppunit-cvs-repo-archive\cppunit\src folder but the same file is existing with name "CppUnitLibraries.dsw,v" and on changing its extension to .dsw and on opening again it displays the message invalid project file.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >