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
34
votes
6 answers

Android: Retrieving shared preferences of other application

I have a settings application from which i have to retrieve other applications preferences, but i don't have the details of keys in them, how can i retrieve all the available keys and values in that preference? Thanks, Swathi
Swathi EP
  • 3,864
  • 6
  • 26
  • 25
33
votes
2 answers

Sharing authentication between two web applications

I have a base web site (Asp.net WebForms application) running under ie. http://localhost:90/ Then I created a new (this time Asp.net MVC) application and added it under http://localhost:90/mvc/ but not just as a simple virtual folder, but as an…
Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404
32
votes
4 answers

Git, How to change a bare to a shared repo?

So this is how I set up my project: git init --bare Later I learned that if you want to work on a project with multiple users this is how I should have done it: git init --bare --shared Now I tried to work like that and luckily we are in the…
bottleboot
  • 1,659
  • 2
  • 25
  • 41
30
votes
6 answers

ld: Using -rpath,$ORIGIN inside a shared library (recursive)

I just made a basic example of using ld's -rpath option with $ORIGIN here (see 2nd response for a working version). I'm trying to create an example where main.run links to foo.so, which in turn links to bar.so, all using rpath and $ORIGIN. The…
Simon
  • 623
  • 1
  • 8
  • 13
26
votes
3 answers

SOA and shared databases

I don't understand SOA (Service-oriented Architecture) and databases. While I'm attracted by the SOA concept (encapsulating reusable business logic into services) I can't figure out how it's supposed to work if data tables encapsulated in a service…
Gruber
  • 4,478
  • 6
  • 47
  • 74
26
votes
8 answers

Subversion and shared files across repositories/projects?

I am migrating a client's SourceSafe repository (3 projects) to SVN and two of the projects share source files. (These projects are separate products - with different names and release versions, etc) Has SVN resolved this shortcoming? How do…
tim
23
votes
2 answers

GNU screen auto re-size with screen -x

Is there a way to auto re-size screen windows, along with screen -x option? I know we can do this by using the screen fit command, once the shared screen session is open, but is there a way to do this automatically? (just like with screen -r -d, the…
Rand
  • 251
  • 1
  • 2
  • 4
23
votes
10 answers

Any concept of shared memory in Java

AFAIK, memory in Java is based on heap from which the memory is allotted to objects dynamically and there is no concept of shared memory. If there is no concept of shared memory, then the communication between Java programs should be time consuming.…
emkrish
22
votes
5 answers

Error loading shared libraries

I'm running eclipse on Ubuntu using a g++ compiler and I'm trying to run a sample program that utilizes xerces. The build produced no errors however, when i attempted to run the program, I would receive this error: error while loading shared…
user459811
  • 2,874
  • 10
  • 37
  • 63
22
votes
3 answers

how is a shared library file called by two different processes in Linux?

In Linux, I have a shared library file called foo.so When I execute 2 different process p1, p2 that both use foo.so. Does this foo.so get overlapped by those 2 process?
user188276
21
votes
1 answer

Python Multiprocessing appending list

Have a quick question about a shared variable between multiple processes using Multiprocessing.Pool(). Will I run in to any issues if I am updating a global list from within multiple processes? I.e. if two of the processes were to try to update the…
DJMcCarthy12
  • 3,819
  • 8
  • 28
  • 34
20
votes
2 answers

What is the most efficient way to stream data between Docker containers

I have a large number of bytes per second coming from a sensor device (e.g., video) that are being read and processed by a process in a Docker container. I have a second Docker container that would like to read the processed byte stream (still a…
eraoul
  • 1,072
  • 12
  • 19
20
votes
3 answers

shared_ptr & weak_ptr conversions

I am trying to juggle objects using std::shared_ptr and std::weak_ptr. The scenario is something like this: I have objects of class channel which is derived from a abstract class abstract::channel (with pure virtual functions). I have a container…
user2559933
  • 301
  • 1
  • 2
  • 3
18
votes
2 answers

Linux shared library that uses a shared library undefined symbol

two shared libraries liba.so and libb.so. liba.so uses libb.so. All c files are compiled with -fPIC. Linking uses -shared. When we call dlopen on liba.so it cannot find symbols in libb.so...we get the "undefined symbol" error. We can dlopen…
johnnycrash
  • 5,184
  • 5
  • 34
  • 58
18
votes
2 answers

What are the differences between Shared and Static?

I'm a C# developer but I've inherited a legacy VB app today with 0 documentation what so ever. I've been starting to read through the code and reference the list of VB keywords every 5 seconds. I guess I don't understand the distinction between…
sab669
  • 3,984
  • 8
  • 38
  • 75
1
2
3
93 94