Questions tagged [shared]

In VB.NET, the Shared keyword is roughly equivalent to the static keyword used by many other languages.

In , the Shared keyword is roughly equivalent to the static keyword used by and many other languages.

For example, the following code snippet in VB.NET:

Public Class Foo
    Public Shared Bar As String
End Class

Is equivalent to the C#:

public class Foo
{
    public static string Bar;
}

Further Reading

OpenMP

In OpenMP, it corresponds to the status of a variable. In a parallel section, a SHARED variable will be shared by all the running threads, meaning they will all access this variable and could modify it simultaneously. It is the default status of every variable in a parallel section, apart from the iteration counters.

1404 questions
7
votes
7 answers

Rails application on shared hosting?

Is there a way that I can deploy my locally made rails app on a shared host that has Ruby installed?
PythonGem
  • 491
  • 1
  • 5
  • 9
7
votes
2 answers

mprotect on a mmap-ed shared memory segment

When two processes share a segment of memory opened with shm_open and then it gets mmap-ed, does doing an mprotect on a portion of the shared memory in one process affects the permissions seen by the other process on this same portion? In other…
sunmat
  • 6,976
  • 3
  • 28
  • 44
7
votes
4 answers

Shared memory access permissions on Windows

I've developed a windows application that uses shared memory---that is---memory mapped files for interprocess communication. I have a windows service that does some processing and periodically writes data to the memory mapped file. I have a…
James Whetstone
  • 341
  • 1
  • 3
  • 10
7
votes
1 answer

How to manage Tomcat 6 libraries into subfolders under %TOMCAT_HOME%/lib?

I use Tomcat 6.0.20 and JDK 1.6.0.13. How can I load libraries from sub-folders of %TOMCAT_HOME%/lib/ without taking the .jars out of sub-folders and putting them straight into %TOMCAT_HOME%/lib/? The reason I want to do this, is because many apps…
Right E'Ous
  • 73
  • 1
  • 3
7
votes
1 answer

C - 2D Dynamic Array (Double Pointer) - Shared Memory

I've got 2 processes (Client and Server) that are communicating through shared memory. I need to create a 2D Array that is Dynamic (based on parameters). The array is stored in a struct and then written to the shared segment. I can write the array…
Jake Evans
  • 978
  • 5
  • 13
  • 33
7
votes
1 answer

Building library with cmake

I apologize for bothering you all, but I have a little compilation problem with cmake. I have a CMakeLists.txt file I'm using to build a test executable, and a shared library. They both have dependency to another library (SFML). I'm using cmake on…
Cuthalion
  • 73
  • 1
  • 1
  • 3
7
votes
4 answers

C++ linker missing library when running (SONAME behavior)

I've made a program that uses two shared libraries (which I compiled) and are placed like this: /home_directory_where_I_compile_and_run_everything -->/lib/libjson_linux-gcc-4.4.6_libmt.so -->/lib/libre2.so.0 When I compile my program I pass the…
Ale Morales
  • 2,728
  • 4
  • 29
  • 42
6
votes
1 answer

Globals and Threads in Mojolicious for handling different paths

In my Mojolicious perl code I handle a jobs created and watched from a remote client. I keep the jobs in a array of hashes, which is a global variable. It is then used in handlers of PUT '/job/create' and GET '/job/status'. When adding a new job…
Juan Macek
  • 270
  • 1
  • 3
  • 10
6
votes
1 answer

Leaving Wordpress Core Files untouched shared between multiple blog installation

For many reasons I can't use the wordpress network solution.. I will have to maintain multiple wordpress sites on the same server and I'd like to share the core between them. What I'd like to achieve is: for each domain, the root folder should…
Andrea Baccega
  • 27,211
  • 13
  • 45
  • 46
6
votes
1 answer

relative paths for shared libraries

I'm working with JNI. I have a wrapper library (wrapper.so) that uses two shared libraries: one.so and two.so Everything works fine. All *.so are in the lib folder, inside the program folder. The problem is, if I copy this folder to another…
lcguida
  • 3,787
  • 2
  • 33
  • 56
6
votes
1 answer

scala/akka/stm design for large shared state?

I am new to Scala and Akka and am considering using it to solve a problem. Suppose I have a calculation engine (that searches for a solution). I'd like to parallelize that search both across cpus and across nodes by giving each cpu on each node its…
AllanC
  • 61
  • 1
6
votes
2 answers

OpenMP Several "shared"-directives?

Hey there, I have a very long list of shared variables in OpenMP so I have to split lines in fortran and use the "&"-syntax to make sure the lines stick together! Something like that: !$OMP PARALLEL DEFAULT(private) SHARED(vars...., &…
tim
  • 9,896
  • 20
  • 81
  • 137
6
votes
2 answers

Mac: How to export symbols from an executable?

I am writing an executable which uses dlopen() (LoadLibrary() on Windows) to dynamically load a shared library. The shared library uses symbols from the executable. In Windows this is possible. Executables can export symbols: declspec(dllexport) and…
user377486
  • 693
  • 2
  • 10
  • 19
6
votes
2 answers

Multiprocessing - Shared Array

So I'm trying to implement multiprocessing in python where I wish to have a Pool of 4-5 processes running a method in parallel. The purpose of this is to run a total of thousand Monte simulations (250-200 simulations per process) instead of running…
Vedant7
  • 71
  • 1
  • 1
  • 6
6
votes
3 answers

Can't Control Order of String Set in Shared Preferences

This is my first stackoverflow question. I have done lot of googling on this. On Hashsets, Treesets, LinkedHashSets, Collections, Stacks (Stack class is deprecated?)... I realize I could just use SQLite but I'm trying to avoid that for the time…
Nerdy Bunz
  • 6,040
  • 10
  • 41
  • 100