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
12
votes
1 answer

Should I save passwords in shared web credentials AND (local) keychain

I am in the process to design a login for a new app that will be associated with a domain, i.e. be the counterpart to an SPA. Obviously I want to use iOS 11 Password Autofill, and Shared Web Credentials I have read the documentation on autofill as…
Gero
  • 4,394
  • 20
  • 36
12
votes
3 answers

Shared Preferences not persistent after app restart

I found all answers here and tried all solutions, still my shared prefs are not persistent. Here's my code: public static void setActivated(boolean activated) { SharedPreferences sp = Utils.getContext().getSharedPreferences( …
Razvan
  • 493
  • 5
  • 16
12
votes
6 answers

Django: vps or shared hosting?

I am new to web development and everything involved with it. Im finishing my website in django and i will soon have to find a hosting and deploy it. I heard there are vps or shared hosting types. So here are the questions: 1. How many visits/clicks…
barin
  • 4,481
  • 6
  • 28
  • 29
12
votes
1 answer

cygwin g++ Linker doesn't find shared library

I have been creating a library. When I compile it as a static library, it works fine. Now I want to turn it into a shared library. The library is created and in the proper place, but when I try to compile the client code, the linking phase says that…
Devolus
  • 21,661
  • 13
  • 66
  • 113
12
votes
2 answers

Force linking a static library into a shared one with Libtool

I have a library (libfoo) that is compiled using libtool into two objects: libfoo.a and libfoo.so. I have to create, using libtool also, another library (libbar) that will be a single shared library (libbar.so) containing all libfoo's code. In order…
vperron
  • 530
  • 5
  • 7
12
votes
3 answers

How to get variables shared between child and parent process while using fork in perl

I am using fork in my code. Before fork call in my code, the parent process has a global variable declared. So after the fork call does child process get a separate copy of the global variable on its own thread stack or shares the existing parent…
chaitu
  • 1,036
  • 5
  • 20
  • 39
11
votes
1 answer

Dynamically loading Linux shared libraries?

I want to create a shared library which can be loaded in two different ways into targets: LD_PRELOAD Dynamic loading via dlsym My shared library looks like this: #include "stdio.h" void __attribute__ ((constructor)) my_load(void); void…
Mike Kwan
  • 24,123
  • 12
  • 63
  • 96
11
votes
5 answers

Finding the load address of a shared library in Linux

At runtime I need to print out an address, and then find which function that address is part of. The functions are in a shared library so are not at a fixed address. My map file obviously just shows the relative offsets for each shared library func.…
gimmeamilk
  • 2,016
  • 5
  • 24
  • 36
11
votes
1 answer

In JetBrains tools, how can I share IDE and project settings between multiple developers?

I love the JetBrains tools. But, I can't find a way to effectively share settings at the IDE level and the project level with team members. To date, I've followed instructions provided by an article on the JetBrains site, titled "How to manage…
MikeyE
  • 1,756
  • 1
  • 18
  • 37
11
votes
1 answer

Why does angular-cli create component/shared/index.ts?

If I run this: ng g component components/blogs I get app +--components | +--blogs | | +--shared | | | +--index.ts // what's this for? | | +--blogs.component.css | | +--blogs.component.html | | +--blogs.component.ts | | …
jmbmage
  • 2,487
  • 3
  • 27
  • 44
10
votes
2 answers

"Shared" and "__gshared" Keywords in D

When not used inside a static context (that is, when the static keyword isn't present, and you're not in global scope), what do the shared and __gshared keywords do? Examples: struct Temp { shared int i; __gshared int j; }
user541686
  • 205,094
  • 128
  • 528
  • 886
10
votes
2 answers

Main difference between Shared memory and Distributed memory

I'm a bit confused between about the difference between shared memory and distributed memory. Can you clarify? Is shared memory for one processor and distributed for many (for network)? Why do we need distributed memory, if we have shared memory?
pavel
  • 127
  • 1
  • 2
  • 9
10
votes
3 answers

Which php framework is good for shared hosting?

I'm trying to use a PHP framework, but I don't have confidence with Composer and terminal commands. I would like to download a framework and upload it on my shared hosting and start to develop my application. Any suggestion? Thanks.
Alex
  • 125
  • 2
  • 8
10
votes
5 answers

Can the same DLL data be shared by 2 different processes?

I have two different C# applications that are running at the same time. I would like both of them to be able to access the same "instance" of a DLL (also in C#). The DLL holds some data that I'd like to return to whichever of the two applications is…
Jelly Amma
  • 477
  • 1
  • 5
  • 19
10
votes
1 answer

Android shared element transition between fragments having recyclerview & details view

I have 2 fragments: fragment 1 containing recyclerview & fragment 2 having detail view for selected item. There is a shared element imageview between these 2 fragments. While transitioning from fragment 1 to 2 I want to see standard shared element…