share

Why do the System.IOUtils functions and TStreamReader use fmShareCompat?

萝らか妹 提交于 2020-01-02 03:50:29
问题 When I first saw the System.IOUtils unit with functions like TFile.ReadAllBytes and TFile.ReadAllText and the TStreamReader and TBinaryReader classes in System.Classes I was quite excited to have easy ways to read binary and text files. After using them for a while I noticed that the default share mode is implicitly fmShareCompat , since they all use TFileStream.Create , but do not explicitly specify a share mode. Since fmShareCompat is treated as fmShareExclusive on Windows this leads to

Share existing post to Facebook app by id/url using Graph API

南楼画角 提交于 2020-01-01 20:48:46
问题 So in my app I display some Facebook posts from a predefined page. I get the posts from my server (the server gets them from Facebook directly) and this way I avoid using the Facebook SDK. For each post, I have both the id and the URL and whenever a user presses on a post I open the Facebook app on that given post. Now I'd like to add the possibility for users to share these posts to their profile pages, but when a user opens a post (on the Facebook app) it doesn't appear any option to share

Sharing a folder and setting permissions in PowerShell

我的未来我决定 提交于 2020-01-01 07:41:47
问题 I need a script to run on Vista Ultimate to share an external drive and assign full control to Everyone. I've got a batch file to create the share using net share , but there doesn't seem to be a way to change the permissions. I reckon this must be possible in PowerShell, but I have no idea where to start. 回答1: Two answers. In PowerShell, the Get-ACL cmdlet will retrieve the existing permissions. You then modify those using .NET commands, and run Set-ACL to apply it back to the folder - the

Sharing a folder and setting permissions in PowerShell

放肆的年华 提交于 2020-01-01 07:40:03
问题 I need a script to run on Vista Ultimate to share an external drive and assign full control to Everyone. I've got a batch file to create the share using net share , but there doesn't seem to be a way to change the permissions. I reckon this must be possible in PowerShell, but I have no idea where to start. 回答1: Two answers. In PowerShell, the Get-ACL cmdlet will retrieve the existing permissions. You then modify those using .NET commands, and run Set-ACL to apply it back to the folder - the

Twitter intent's 'tweet' event callback triggering on 'click' instead of 'tweet'

十年热恋 提交于 2019-12-31 03:45:09
问题 I have some issue with twitter intent share functionality, the "tweet" event triggered on click the share button itself(before opening the popup). I have checked the "click" and "tweet" events and both events are triggered simultaneously. twttr.ready(function (twttr) { twttr.events.bind( 'click', twitter_share_callback); twttr.events.bind( 'tweet', twitter_share_callback); }); function twitter_share_callback(response) { console.log(response) $("#response").append(response.type+"<br>") //code

Managing remote DACLs on fileshares: Win32_ACE to Win32_Share

China☆狼群 提交于 2019-12-31 03:04:07
问题 Goal: Add a local user account share-level Read/Write permissions to an existing file share. I'm hitting a roadblock in developing this. Apparently Microsoft wants you to add your user's ACE to the DACL and then back into the security descriptor of the share. (1). (No, NET SHARE /ADD is not available for existing shares, I was surprised.) In theory that should be simple enough, but my main fear is doing it wrong and losing the existing share permissions (lots of network users, specific groups

ActionBar share item produces “Android System” thingy

最后都变了- 提交于 2019-12-30 10:44:07
问题 I want a share icon in the action bar, upon pressing, a chooser shows up. I have most of this in place, but this unwelcome middle-man steps in... The menu: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_share" android:title="@string/share" android:showAsAction="always" android:actionProviderClass="com.actionbarsherlock.widget.ShareActionProvider" /> </menu> The SherlockFragment's onCreateOptionsMenu:

Many meshes with the same geometry and material, can I change their colors?

跟風遠走 提交于 2019-12-30 07:55:08
问题 I have a large number (~1000) of THREE.Mesh objects that have been constructed from the same THREE.Geometry and THREE.MeshPhongMaterial (which has a map). I would like to tint (color) these objects individually. Naïvely, I tried changing the mesh.material.color property, but changing this property on any of the objects changes the color of all the objects at once. This makes sense, since there is only one material that is shared among all the objects. My next idea was to create a separate

How to show an image through an intent being compatible with different apps

做~自己de王妃 提交于 2019-12-30 07:29:28
问题 I'm trying to share an image I have previously saved on disk, sending an Intent.ACTION_SEND . The problem is that I can't find a way to be compatible with different apps, official Gmail app and TweetDeck in my case. The image I want to share is contained in a File : File agendaFile; // its path using getAbsolutePath() -> /data/data/com.mypackage/files/agenda.jpg Option A) using Uri.fromFile Uri agendaUri = Uri.fromFile(agendaFile); // the value -> file:///data/data/com.mypackage/files/agenda

Share image to another app using Intent in android

房东的猫 提交于 2019-12-29 09:23:30
问题 I want to share image and text to another app but i'm getting file format not supported when i'm using this code please help... Uri picUri = Uri.parse("http://www.planwallpaper.com/static/images/image-slider-2.jpg"); Intent shareIntent = new Intent(); shareIntent.setAction(android.content.Intent.ACTION_SEND); shareIntent.putExtra(Intent.EXTRA_TEXT, "Hi There..."); shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, picUri); shareIntent.setType("*/*"); startActivity(Intent.createChooser