w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
samba shares seen in windows, but cannot connect
Add the following to your [global] section: guest account = nfsnobody map to guest = bad user And your public share could look something like: [Backups-Rhonda] path = /raid1/rhonda writable = yes guest ok = yes public = yes force user = root force group = root create mask = 666 directory mask = 666 security mask = 666 force create mode = 666 Make sure to restart the samba service.

Categories : Misc

Unable to access Samba folder from Windows (Using Raspberry Pi XMBC as a Samba Server)
That may depend on the directory and file rights. If the us who runs smb have no access rights, you can't read or write files. You can find out file permissions with ls -la you will also see owner and owner group. You can try to set read and write permissions for all (chmod 777 directory -R). If this was the problem, then you should give read and write permissions only to the user that runs smb. Set permissions for all back to 0 (770) because of security reasons. Here you find a tutorial on set up samba for Rasapberry Pi.

Categories : Windows

I'm trying to connect from windows to Samba Shared folder on linux using php
i found solution for connection using this code $sharename = '\\LinuxIPAddressShared_folder'; $username = 'username'; $password = 'password'; $letter = 'Z:'; if (!is_dir($letter . "/TMP")) { $WshNetwork = new COM("WScript.Network"); $WshNetwork->MapNetworkDrive($letter, $sharename, FALSE, $username, $password); } and is working perfect

Categories : PHP

Fetch all printers available in the network - not just local printers
As far as I know, what you're looking for is outside of WMI's capabilities. I know you dont have a print server, but if all the printers are at least connected to other machines, then a quick workaround might be to use PSExec to run your printer finding script locally on all computers on your network (or maybe a login script). You could simply make your printer finding script write to a network share, and then review the information once the execution completes. Otherwise I would suggest using a network mapping tool like ZenMap or a network monitoring tool like Spiceworks ( www.spiceworks.com) to fingerprint your devices.

Categories : C#

How Should I Debug Samba with GDB
Download samba source code from http://www.samba.org and compile it (without source code, it will be impossible to do symbolic debugging). Stop or kill any other samba instances. Start samba under gdb: gdb <path/to/compiled/smbd> Specify smbd parameters: set args -i -M single Parameters -i -M single force smbd to start as single process, do not daemonize and print all messages and errors to stdout/stderr. Now, you can set breakpoints and trace your source code as you normally would with any other program. Note: instead of using gdb, you might find more convenient to use gdb-tui (gdb text user interface), or use other debuggers like ddd.

Categories : Debugging

Automount samba folder on Mac
I followed https://discussions.apple.com/thread/3221944?start=15&tstart=0 The key is setting the mount point in your home directory is by following three steps. Add this line to the end of /etc/auto_master: /- auto_smb Created /etc/auto_smb with the following line: /Users/user/mount -fstype=smbfs,soft smb://domain;user:password@server/folder Run automount: automount -vc The troubleshooting points are: If you encounter "Too many users" you need to review your SMB path for syntax errors. Also be careful of incorrect username / passwords, or passwords with special symbols. e.g. @ would need to be replaced with %40.

Categories : Osx

What do printers ignore?
The link you're referring to is about browser-specific print handling. Check out the each supported browser's printing properties for more info there. Regularly, though, WYSIWYG when it comes to printing an HTML page. You could specify a specific CSS file for printing by adding the following tag to your <head> tag: <link rel="stylesheet" href="print.css" type="text/css" media="print" /> Where print.css is the path to your CSS file. Addition: Though you can't override the Browser-preferences, there's nothing you can do to print your BG in non-allowing browsers. Check the printing preferences for those options. My best idea is to export your web-page to PDF and print that. See web2pdfconvert, for example of such a service. You could also install a plugin on your server side

Categories : Javascript

authenticate against with Active Directory via samba
I recommend you this article http://technet.microsoft.com/en-us/magazine/2008.12.linux.aspx from Microsoft. The configure file seems OK.

Categories : Misc

Flex Actionscript (AS3) get available printers
I hope this code will work for you var availablePrinters:Vector.<String> = PrintJob.printers; var printersCollection:ArrayCollection = new ArrayCollection(); if (availablePrinters) for (var i:int = 0; i < availablePrinters.length; i++) printersCollection.addItem(availablePrinters[i]);

Categories : Actionscript

Android - Mount a Samba share in code
Probably smbfs/cifs are currently not supported by your kernel. As Delyan said, ensure your kernel can mount these filesystem : $ cat /proc/filesystems nodev sysfs nodev rootfs nodev bdev nodev proc nodev cgroup nodev tmpfs nodev debugfs nodev sockfs nodev usbfs .... If they are not listed, you should try to do a modprobing (sometimes the module you want just have to be activated), get root access then : # modprobe <modulename(without.ko)> e.g. : # modprobe cifs If it doesn't work you will have to change or recompile your kernel (including appropriate modules).

Categories : Android

qt transfer a file from local to a samba shared
You can not do that QFile just spports local files but you can mount it to a posix folder and access to that folder. You can find a guide about how to mount a samba shared folder here

Categories : C++

iOS file sharing with SAMBA / CIFS protocol
If I understood you correctly you want to connect with your app files via WiFi . Basically you need to open a local server within your app. CocoaHTTPServer may be help you with this issue.

Categories : Iphone

Is the mergAccessory ios external intended only for printers?
They work with any Bluetooth or attached hardware accessory. You just need to get the protocol documentation from the manufacturer. The demo prints to a mini Bluetooth printer. on printDocket mergAccessoryOpenSession "p25i|com.bluebamboo.p25i","sessionOpen" end printDocket on sessionOpen pNameAndProtocol mergAccessoryWrite pNameAndProtocol,"UfwàD"&fld "write","writeCompleted" end sessionOpen on writeCompleted pNameAndProtocol mergAccessoryRead pNameAndProtocol,0,"readCompleted" end writeCompleted on readCompleted pNameAndProtocol,pData if byte 5 of pData = numToByte(3) and byte 6 of pData = numToByte(0) then answer "print complete" mergAccessoryCloseSession pName end if end readCompleted EDIT After a fairly lengthy support incident I worked out the pr

Categories : IOS

Can Web Applications detect local printers?
Bluntly, the answer is no. Server-side code can't talk with client-side resources in that manner. A possible solution might be to embed some client-side component into your web app which does what you want, such as a Java applet or Silverlight item. I don't know off the top of my head whether they're capable of printing, but it might be an option worth investigating. However, I would suggest the best way to handle it (if your use-case allows), is to serve up something capable of printing via native browser methods. You are able to serve a stylesheet which applies to printing specifically using the media="print" attribute on your link element. If that remains too imprecise (you'd have no control over the browser's paper size, margins, headers/footers etc), perhaps another option might be

Categories : Web Services

Apache/php cannot access remote cifs/samba share
have you tried //ip/foleder/ /mnt/name cifs username=user,password=passwd,nounix,noserverino,defaults,users,auto,gid=33,uid=33 0 0 change gid and uid to the apache user u can find it out like this: cat /etc/passwd | grep www-data

Categories : Apache

Why would my samba connection fail after an upgrade to windows 2012?
Windows Server 2012 includes latest version of SMB protocol 3.0 and it full of really interesting updates and improvements (details and some relevant discussion here). As with any serious improvements there is a compromise in terms of legacy clients support. Probably there is no support for SMB 3.0 on your Samba client side or some backward compatibility should be enabled on Server 2012 side.

Categories : Java

Find if printers are capable of color printing
Not sure which version of PowerShell you are running and whether you have access to Windows 8 machine or not, but if you do, PrinterManagement module would help you, as it seems to correctly identify color printers (we use Universal drivers as well): PS> get-printconfiguration -ComputerName $printserver -PrinterName $nonprinter PrinterName ComputerName Collate Color DuplexingMode ----------- ------------ ------- ----- ------------- printername servername False False OneSided PS> get-printconfiguration -ComputerName $printserver -PrinterName $colorprinter PrinterName ComputerName Collate Color DuplexingMode ----------- ------------ ------- ----- ------------- printername servername False Tru

Categories : Powershell

Enumerate available WiFi Printers in my Windows Phone app
Best I can give is my Github Repo which isn't related to Wifi printers, but Google cloud printing. There isn't really a .net reference for using Google Cloud Print in their documentation, but the code works in Mono, and should be easy to move over to .NET and hence, Windows Phone. MonoGCP

Categories : C#

Making a user in Samba - Debian 6 32bit - No commands working?
Solution: Setup Apt-get upgrade sudo apt-get install samba smbfs sudo mkdir –m 0777 /pathofdrive Editing the samba config sudo vi /etc/samba/smb.conf Copy this: # Global parameters [global] workgroup = HOME netbios name = SAMBA server string = Samba Server %v map to guest = Bad User log file = /var/log/samba/log.%m max log size = 50 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 preferred master = No local master = No dns proxy = No security = User # Share [Data] path = /disk2/data valid users = joel read only = No create mask = 0777 directory mask = 0777 Adding a user: # useradd -c "Joel Nahrgang" joel # smbpasswd -a joel New SMB password: secret Reenter SMB password: secret Added user joel Restarting Samba:

Categories : Linux

How to Exclude Shared Printers in Folder Browser Dialog?
You can download a working example of what Hans suggested here. As a convenience, here is a stripped down version using a simple form with a button & field, but that also includes additional flags and their descriptions. Imports System.Runtime.InteropServices Public Class FoldersOnly <Flags()> _ Public Enum BrowseInfoFlags As UInteger ''' <summary> ''' Only return file system directories. ''' </summary> BIF_RETURNONLYFSDIRS = &H1 ''' <summary> ''' Do not include network folders below the domain level in the dialog box's tree view control. ''' </summary> BIF_DONTGOBELOWDOMAIN = &H2 ''' <summary> ''' Include a status area in the dialog box.

Categories : Vb.Net

What are limitations of PostScript 'image' command on HP LaserJet printers?
With very large images you will start to run up against various implementation limits. Common limits are 65535 elements in strings, arrays, and dictionaries. If your image data is larger than 64k, it will need to chopped up into 64k pieces and fed to image separately (it is for this purpose that image takes a procedure argument rather than just a string data source). If you are simply embedding the data for a single use, you can use the standard idiom to read-ahead into a buffer. /buf 100 string 26 34 8 [26 0 0 -34 0 34] { currentfile buf readhexstring } image %hex data starts here image can be considered a looping operator which will keep calling the supplied procedure to get more data. The procedure doesn't even need to return full rows, just little bits of string.

Categories : Misc

How to access a shared location in solaris from windows machine using samba with java?
"Connection refused" means that host is not listening on that port. You need to ensure the samba service is running on that host. I would check you can mount the file system as a drive letter first.

Categories : Java

Printing a document over application --> WCF Service. Can I access local printers?
Instantiate Microsoft.Reporting.WinForms.LocalReport in the client side (WinForms, I assume that you are using). You can add var report = new Microsoft.Reporting.WinForms.LocalReport(); report.DataSources.Add(new ReportDataSource("MyReport", GetReportData())); GetReportData can make the WCF call and bring in the list of objects that can be rendered as the report. If you do so, report will be generated at the client side and local printers are all available. In fact, it is the standard way of doing reporting as well.

Categories : C#

Removing and then adding back a device in Devices and Printers using PowerShell
You could probably automate this using MS UI Automation from a Powershell script. Here's a hello world UIA Powershell script to get an idea of how to get started: [Reflection.Assembly]::LoadFile('C:Program FilesReference AssembliesMicrosoftFrameworkv3.0UIAutomationClient.dll') [Reflection.Assembly]::LoadFile('C:Program FilesReference AssembliesMicrosoftFrameworkv3.0UIAutomationTypes.dll') # Get the root/desktop element $rootElement = [Windows.Automation.AutomationElement]::RootElement # Print its Name and ClassName Write-Host "Note: In the managed UIA API, the desktop name is empty:" "'" + $rootElement.Current.Name + "'" Write-Host "Instead, you can identify the desktop by its ClassName, #32769:" "'" + $rootElement.Current.ClassName + "'" To go beyond that, you might benefit from the

Categories : Python

ShareThis shares an incorrect URL
ShareThis has a tweak where you can add: expr:st_title='data:post.title' expr:st_url='data:post.url' to each button, forcing the share buttons to share the link in the post instead of the link in the broswer. The code would look something similar to this: < span class='st_twitter_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> < span class='st_facebook_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> < span class='st_googleplus_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> < span class='st_linkedin_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> That should also solve the image issue too.

Categories : Misc

Can I display different network devices(router,switch,printers) icon out using SNMP?
SNMP is a protocol. What you do with SNMP data is entirely up to you, if you want to display a router with a picture of a dog, go ahead. It all depends on in the structure of the data you receive, and how you wish to display this. It's as easy as: if (device.DeviceType == SNMPDeviceType.Router) { DevicePictureBox.Image = _routerImage; }

Categories : C#

Java Program Statement : How to make a computer class having a list of printers available to it
Create your Computer class and in the Computers class maintain computer objects list. Computer class looks like this . public class Computer{ private String computername; private ArrayList<String> printernames; public Computers(String computername,List<String> printernames){ this.computername=computername; this.printernames=printernames; } //setters //gettters // } Usage : String compname ="Apple"; List<String> printernames = new Arraylist<String>(); printernames.add("AplrPrinter1"); printernames.add("AplrPrinter2"); printernames.add("AplrPrinter3"); Computers comp = new Computers(compname,printernames);

Categories : Java

Jasper Reports printing stretched on Konica - Minolta PagePro printers
Is your platform windows/mac/linux? I've had trouble with printing with label printers when the print job's media hint did not communicate fully through to the driver. Its actually very similar to your problem, stretched prints, skipped pages etc,. I dont know if you have code to modify, but we had to switch to System Printing instead of Java Printing. Then with the System Printing settings, (windows spooler in my case), I had to create a printer with the exact driver settings needed to print properly. Its rarely anything you can really do in JasperReports other than specify the width/height/orientation. I assume your report prints fine when saved to PDF, then print from a PDF Viewer.

Categories : Java

Groupwise shares in R data frame
Assuming mydf is your dataframe, you can use: mydf$VALUE/ave(mydf$VALUE,mydf$FAC1,FUN=sum) An example, since you haven't given us data: mydf <- data.frame(FAC1=rep(letters[1:3],each=3),VALUE=sample(1:10,9)) mydf$SHARES <- mydf$VALUE/ave(mydf$VALUE,mydf$FAC1,FUN=sum) > mydf FAC1 VALUE SHARES 1 a 6 0.3529412 2 a 8 0.4705882 3 a 3 0.1764706 4 b 4 0.1904762 5 b 10 0.4761905 6 b 7 0.3333333 7 c 2 0.2500000 8 c 1 0.1250000 9 c 5 0.6250000

Categories : R

Unable to connect to windows shares
I'm not sure if this helps in your case, but it works for me: The 3rd parameter to the SmbConnection should be (I think) the client_machine_name, so I pass there what I get from socket.gethostname(). I'm not using the sign_options and is_direct_tcp I just leave the default values. This works for me with both samba and windows shares (I just have to pass a different port number sometimes). Here is the code I use: class Smb(object): def __init__(self, username, password, server, share, port=139): # split username if it contains a domain (domainusername) domain, username = username.split('\') if username.count('\') == 1 else ('', username) # setup data self.domain = str(domain) self.username = str(username) self.password = str(pas

Categories : Python

curl on a page which shares url with other pages
If all of your Box activity occurs within your admin account then you shouldn't need to log users in at all. You can simply store the access/refresh token pair for your admin account and use this to authenticate your Box requests. If you are touching another user's data, then automating button clicks during the OAuth login/authorization process is really not cool.

Categories : PHP

Offer discount if user shares my app
According to the Google+ buttons policy: "Publishers may not promote prizes, monies, or monetary equivalents in exchange for Google+ button clicks." You probably should not be incentivizing users to perform shares.

Categories : Android

How to get shares count for a Photo in Facebook?
Instead of GET /ID use GET /POST_ID to get the shares count (if >1). You'll get the result as- "shares": { "count": x } Note- the Post ID is generally: USERID_PHOTOID ORPAGEID_PHOTOID

Categories : Facebook

Shares from facebook fan page to show 'via' appname
That will be done when the shares are actually done by your real app. You cannot add 'via my_app_name' on your own. For example: If you play a level on Angry Birds, and get a new high score. It will be saved there and the app name will be saved, or when you upload or post a new content on Twitter or Tumblr, you will see that there is the name of app too. Otherwise facebook just lets you edit your 'feeling...' 'in...' 'with...' but not 'via...'. Create an app: You can create the app, and then use it to share content! You can check out there developer documents to let your app share content from web or facebook on your timeline! This way, users will see your content being shared 'via my_app_name'. Bravo! Once done! It will automatically do the job for you to show the 'via...' thing. E

Categories : Facebook

An answer to the 'how to get Facebook shares and likes of some URL ?' questions
To get likes and shares counts, I use FQL instead of the Graph API (even though I am actually using the Graph API to send the query). But this is not enough : to be able to do so, I had call the rawurlencode() function on the URL I want to get data about. Otherwise, I'll keep getting errors. So, this likes(), the function I am using to have the counts : function likes($url) { $url = rawurlencode($url); $json_string = file_get_contents("http://graph.facebook.com/fql?format=json&q=SELECT%20share_count,%20like_count%20FROM%20link_stat%20WHERE%20url='$url'"); $json = json_decode($json_string, true); if (key_exists("data", $json)) { if (is_array($json["data"])) { if (array_key_exists("0", $json["data"])) { return intval($json["data"]

Categories : PHP

Is it possible to show combinined social likes & shares?
I would suggest you to look into Sharedcount api if your requirements are not to get Live data every time, this works greate in Jquery. You can also make individual request to each api(Via PHP, as google and twitter does not allow Cross Domain) - create a wraper class call, this will calculate individual counts over you server. Similar Implementation - http://www.saladappstore.com/page/social-analytics

Categories : Javascript

How to query for the number of shares of a Facebook event URL?
Well, I believe you can't get this until you are the owner of this post. If you were the one who created this post on facebook or one of the admins of the page which is linked to (http://www.facebook.com/events/385623724876261) event then you would get the shares count. Try fetching the information from the admin's access token or the one who created this event. If that doesn't work out for then the last thing you can do is try fetching this piece of information from page access token (which belongs to a page). Let me know if you are still not able to get this piece of information even after trying with Post Owner's token, Admin's token and lastly Page Access token. Cheers, Reno Jones

Categories : Facebook

Is there a flag that tells Zebra printers to include the check digit in the textual representation of a barcode?
Looking through the CPCL manual (page 5.17: https://support.zebra.com/cpws/docs/comtec/PROMAN-CPCL_RevY.pdf ) and the ZPL manual (https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf), there appears to be no documented command flag that will cause a printer to print the checksum in the barcode interpretation line. I think you will have to include it yourself.

Categories : Misc

Running unit tests in VS2012 from network shares / within VM
Used task manager to see what process was running the tests and found it was vstest.executionengine. Found the relevant config file "vstest.executionengine.x86.config" and added the following to the <runtime> section <loadFromRemoteSources enabled="true"/> Visual Studio 2012 C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDECommonExtensionsMicrosoftTestWindow Visual Studio 2013 C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDECommonExtensionsMicrosoftTestWindow

Categories : C#

Retrieve 'date and time' for Facebook shares and likes?
Sorry, but what you want to achieve is just not available through the present Facebook APIs. The data regarding to likes and shares that you can retrieve about the post is just limited to array of likes with just id and name and shares array with count

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.