w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Executing command ls from windows computer to linux computer
I'm certain you could do something with sockets and system calls, but it would probably be easier to use the built in facilities and/or programs available for each. If both are on the same network, you could run an FTP or SSH server program on the Ubuntu computer and connect to it via a FTP/SSH client, like PuTTY. Sending 'ls' through PuTTY would then yield what you want it to. OpenSSH vsFTPd

Categories : C#

C# HttpListener and Windows Firewall
This is because HttpListener is built on top of http.sys which will listen on the port you specified on behalf of your program. I haven't found a way to allow only a single program using HttpListener through the Windows Firewall, but you might want to limit your inbound rule to system components only by: Entering typing system in the field "This program" in the tab "Program and services" Selecting protocol type TCP in the tab "Protocols and Ports" together with the port you will be listening on

Categories : C#

get list of logged on users on remote windows computer from a list computer
It (csv file) should be formatted as follows: computername server1 server2 server3 'Computername' is the column name. This can be derived from the code snippet as the Foreach-Object refers to the ComputerName property.

Categories : Windows

Windows Firewall inbound rules and environment PATH variable
Despite setting the inbound firewall rule to allow any connections to 'java', hoping it would pick up the environment PATH value, I still couldn't get the connection working. In the end changing the jenkins.xml file to not use the 'java' PATH variable and instead use 'C:Program FilesJavajre7injava.exe' and setting the inbound firewall rule back to match this worked. Interesting that Windows saw the PATH variable and the literal file path so differently that it didn't satisfy the firewall rule (perhaps it's by design and a security feature?).

Categories : Misc

Trying to open ports via Windows Firewall, but only when process is running (Error: "Syntaxerror")
start "Origin" /DE:Origin Origin.exe Guess only: The help for start indicates that there should be a SPACE between the D and the E.

Categories : Windows

how to apply the rewrite rule in htaccess in php for this url
I'll give you an example...You can modify based on your requirements. http://www.pets.com/show_a_product.php?product_id={a number} And you want to change them to look like this: http://www.pets.com/products/{a number}/ In order to do so, you will need to use "regular expressions". These are patterns, defined in a specific format that the server can understand and handle appropriately. A typical pattern to identify a number would look like this: [0-9]+ The square brackets contain a range of characters, and "0-9" indicates all the digits. The plus symbol indicates that the pattern will idenfiy one or more of whatever precedes the plus - so this pattern effectively means "one or more digits" - exactly what we're looking to find in our URL. The entire "pattern" part of the r

Categories : PHP

How to apply .htaccess rule for cronjob?
Write this rule before index.php redirect rule: RewriteRule ^cronjob.php$ /scripts/cronjob.php [NC,L] rewrite engine will stop execution after L directive, so the user will be redirected to the correct URL.

Categories : Htaccess

How does the 100 multiple senders rule in GCM apply?
Your question is not very clear. What is written is that if there are 100 messages in queue to be sent to device (e.g. because device is offline) then these 100 messages will be discarded and special message "you have too many messages" will be put to queue.

Categories : Android

CSS Media Query - width rule does not apply
Your #main_buttons_container selector in your media query is less accurate than your div#main_buttons_container selector in your global CSS, so it is being overwritten. Change your CSS to: @media screen and (max-width: 800px) { div#main_buttons_container { width: 100%; } }

Categories : CSS

How to check if port or program is allowed in Windows 2008 firewall using netsh advfirewall commands
Yanick, Is the reason you can't use PowerShell down to the restrictions in BladeLogic? If so, we've developed a workaround for calling Powershell scripts from BladeLogic! :) -John.

Categories : Windows

Does rule about "distinct addresses" apply to objects created by new?
Clearly, if you are using a char[] to dole out addresses as your "custom" operator new, then the char[] object will overlap the object you have created. As long as you do not use the char[] object for something else at the same time, it is not really a problem, and that is not what this section is talking about. This is not really what this is about tho'. If you do create your own operator new, you should not allow it to return the same address (or an overlapping address) for the objects it creates space for. That would break the above rule.

Categories : C++

How To Apply CSS rule to Classes with Specific Keywords Inside Them?
You can use the "contains" attribute selector by appending an asterisk after the attribute - e.g. div[class*=every] { color: orange; } http://jsfiddle.net/FWP8j/1/ The definition from Selectors Level 3: Represents an element with the att attribute whose value contains at least one instance of the substring "val". If "val" is the empty string then the selector does not represent anything.

Categories : CSS

CA1819: Properties should not return arrays. Does this rule apply for other objects too?
Let say you have: int[] ints = new int[] { 1, 2, 3, 4 } public int[] Ints { get { return ints; } } The consumer of your class can do: instance.Ints[0] = 10; So you're allowing modification of the data of the class. To prevent this you can done something like this: public IEnumerable<int> Ints { get { return ints; } } So the consumer of your class can only read the values but not modify. Now, why? Well it depends on the design of your class if you want let modify the data of array, the warning warns you about the fact that maybe you expect that the values of the array cannot be manipulated because you don't have a set in the property. PS: there a lot of methods, like readonly collection etc..., to prevent altering your collections Take a look at this

Categories : C#

JQuery selectors: Apply rule to element when certain child is NOT clicked
you need to prevent the click event bubbling up to the container capture the event and use event.stopPropagation $(document).on('click', "a", function(event){ event.stopPropagation(); });

Categories : Javascript

I need a script to detect if a computer is in an active directory user group
You could try something like this in PowerShell to check that the named computer is in the OU or not: Script: import-module activedirectory $OU = @() $CheckOU = "LaptopOU" $computerName = "Laptop12345" $user = get-adcomputer $computerName -Properties * $user.DistinguishedName -split "," | %{If($_ -match "OU="){$OU += $_ -replace "OU=",""}} If($OU -match $CheckOU){ "Computer:$computerName is in the OU:$CheckOU" # Do something... } Else{ "Computer:$computerName is not in the OU:$CheckOU" # Do something else.. } This will take a $computerName and get all the OU's that it's in from Active Directory and stores them in an $OU array. Then you can use that array to simply check if the computer is in the given OU ($CheckOU) or not by using the -match operator. Note: You

Categories : Powershell

How to show selective templates in the rule group?
To the best of my knowledge you cannot restrict which types of rules are placed into specific groups. I have sought such functionality as well. You would think that with group level permissions one would be able to control what goes into the groups as well. This has likely changed substantially with the move to experience manager that does not have the same group concepts.

Categories : Misc

How to apply group by on xslt
I don't think grouping helps, the key here is a "key" for cross-referencing: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:param name="indent" select="'>'"/> <xsl:output method="text"/> <xsl:key name="children" match="project[parent]" use="parent/@id"/> <xsl:template match="/"> <xsl:apply-templates select="/projects/project[not(parent)]"/> </xsl:template> <xsl:template match="project"> <xsl:param name="head" select="''"/> <xsl:value-of select="concat($head, id, '&#10;')"/> <xsl:apply-templates select="key('children', id)"> <xsl:with-param name="head" select="concat($head, $indent)"/> </xsl:apply-templates> </xsl:template> </xsl:styles

Categories : Xslt

connecting to mac localhost via windows computer sharing the same network
Providing that you edited the hosts file in Windowssystem32driversetchosts, it should normally work most of the time. If it doesn't, the only thing I can think off is that it it sometimes necessary to reset and clear the cache in Windows 7. You can have a look at Windows 7 refresh DNS for guidance. There is a step by step post here.

Categories : Apache

CSS apply same style to a group of tags
You need to use a CSS class instead of an ID, like this: a.myStyle { background-color: transparent; padding: 0px; } Then you can apply the class to each anchor tag, like this: <a class="myStyle" href="..."><img src="..."/></a> <a class="myStyle" href="..."><img src="..."/></a> <a class="myStyle" href="..."><img src="..."/></a>

Categories : Asp Net

How do I apply a css font-weight transition with a font-face rule
You cannot create smooth transitions using the font-weight property. Thanks to Kyle Sevenoaks and this question

Categories : CSS

Rails: Ignore specific gem on windows environment or create a :windows group
This can be done by specifying the platforms. Gems to be installed in Linux/Mac: platforms :ruby do gem 'railroady' end Gems to be installed in Windows: platforms :mingw do gem 'win32console' end To be sure about your Ruby installation in Windows, you can check out the RUBY_PLATFORM constant: ruby -e 'p RUBY_PLATFORM' Which in my case is "i386-mingw32".

Categories : Ruby On Rails

ibase_connect: remote computer host and shared db file from windows
Do not attempt to access a Firebird or Interbase database via any form of mount. The server process should be on the same machine as the disk containing the database. Your client would then communicate with the server process to interact with the database.

Categories : PHP

Checking to see if cmd shutdown command restarted remote computer on windows 7
you could try to query the eventlog of the remote computer and check for eventid 6005 example with the wevtutil utility from windows7 wevtutil qe system /q:*[System[EventID=6005]] /c:1 /f:text /rd:true /r %Computer%

Categories : Batch File

How to apply rule to classes when they are children of either of two parent classes?
Try the :not css selector: .special-price:not(.product-view) { } More information: https://developer.mozilla.org/en-US/docs/Web/CSS/:not JSFiddle: http://jsfiddle.net/b2bjJ/

Categories : CSS

Windows could not start the SQL Server Agent (mssqlserver) service on Local Computer
Very likely the SQL Server (MSSQLSERVER) service is not started or doesn't exist. The SQL Server Agent is dependent on that service and it can't be found. That's the error message. Check out if you have the MSSQLSERVER service installed and running and try again. MSSQLSERVER means that it is the default instance of an MS SQL Server install.

Categories : Sql Server

How to apply parent group for multiple datasets in SSRS VS2008
It would be great if we know the report data e.g Payslip, payslip with loan balance (ie Dataset 1 for payslip and Dataset 2 for loan). Anyway, the format will depend on the required output of the report. i.e If your planning on produce calculation like sum in the report and if the result output will be per Dataset or for both dataset. Assuming you will need sum calculations, if the calculation result will be per dataset, then option 2 is good, if the calculation result is for total (Dataset 1 + Dataset 2) then option 1 is better. If no calculations or total result is required, either will do.

Categories : Visual Studio

cannot apply indexing with [] to an express of type 'method group, (how to print array)
If lines and row are positive integer values, say, int lines = 5; int row = 7; you can print out your table like this: int[,] nums = new int[lines, row]; // <- Multidimensional (2 in this case) array, not an array of array which is nums[][] //TODO: fill nums with values, otherwise nums will be all zeros for (int i = 0; i < lines; i++) { Console.WriteLine(); // <- let's start each array's line with a new line for (int j = 0; j < row; j++) { // <- What the magic number "46" is? "row" should be here... Console.Write(nums[i, j]); // <- nums[i, j].ToString() doesn't spoil the output if (j > 0) // <- let's separate values by spaces "1 2 3 4" instead of "1234" Console.Write(" "); } }

Categories : C#

Apply a parent style change to all checkboxes in group when a "check all" javascript function is run
You could trigger the change event explicitly: $(checkboxes).change(); If the checkboxes of one group will always have the same parent, then it is sufficient to trigger the event for only one checkbox: $(checkboxes[0]).change(); This would go after your loop: function toggleGROUPNAME(source) { // don't forget var!! var checkboxes = document.getElementsByName('GROUPNAME'); for(var i=0, n=checkboxes.length;i<n;i++) { checkboxes[i].checked = source.checked; } $(checkboxes).change(); }

Categories : Javascript

How Can I Return Exit Code To Variable On Local Computer From Script Run On Remote Computer?
I do it like this: invoke-command -session $Remote -scriptblock { mycommand } $remotelastexitcode = invoke-command -session $Remote -ScriptBlock { $lastexitcode } if ( $remotelastexitcode -ne 0 ) { "$remotelastexitcode" exit 1 }

Categories : Powershell

Programatically set the time server of a remote computer to match the control computer?
You might be better off using Group Policy to set the time server. http://technet.microsoft.com/en-us/library/cc779145(v=WS.10).aspx

Categories : C#

Running a jar in a computer java.lang.UnsatisfiedLinkError lwjgl.dll in another computer
This problem generally occurs when your jar trying to use native library of operating system.In windows it is "LWJGL.DLL". java.lang.UnsatisfiedLinkError occurs if the JVM cannot find this file. try to find the existence of this file in machine 2 where your jar file is not working and try to add them to path if they does not exists.

Categories : Java

How to apply the same theme in all WPF windows using MahApps.Metro
In your App.xaml, set the ResourceDictionary property like this: <Application.Resources> <ResourceDictionary Source="MyResourceDictionary.xaml"/> </Application.Resources> Notice that in order for the styles in your resource dictionary to be applied to all controls of that type, the style should NOT have a key. For example, a style defined like this: <Style TargetType="{x:Type Button}"> <Setter Property="Content" Value="This is the default button text"/> </Style> In the ResourceDictionary will cause all the buttons in the project to have a default value when you create them.

Categories : C#

How to apply Isolated Storage to the values in Windows Phone?
One of the best ways to store collections like this is to serialize the collection into json and save a file. You can use Json.Net for this. You would need to create a collection of objects to store the values. public class RunMarker { public double Kilometers { get; set; } public TimeSpan Pace { get; set; } public double Calories { get; set; } } When the position changes you would set values on this and add it to a collection. private void Watcher_PositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e) { // add actual values _markers.Add(new RunMarker { Kilometers = 0, Pace = TimeSpan.FromSeconds(1), Calories = 50 }); } Then when you want to save it you serialize to Json and save a file in IsolatedStorage const string MarkerFileName =

Categories : C#

How to apply Windows Phone Toolkit effects to controls?
For animating a control you should use a Storyboard! http://msdn.microsoft.com/en-us/library/system.windows.media.animation.storyboard.aspx (take a look at the examples at the bottom of the page) EDIT: The WP tookit seems to include a property for that: toolkit:TurnstileFeatherEffect.FeatheringIndex You just need to set this property for each element to the number relating to the order. So 0 is the first one, 1 the second and so on...

Categories : C#

How to apply back button to canvas in windows phone?
You can detect and cancel the navigation with the back button by overriding the OnBackKeyPress method and setting e.Cancel to true. From there, it's just a matter of detecting whether the canvas is displayed. protected override void OnBackKeyPress(CancelEventArgs e) { if (EHeightCanvas.Visibility == System.Windows.Visibility.Visible) { e.Cancel = true; EHeightCanvas.Visibility = System.Windows.Visibility.Collapsed; } }

Categories : C#

How can I apply a TortoiseSVN generated patch to a git repository in Windows?
You could try using git-svn to re-convert your svn repository to git. Once it's in git, you could add a remote to your existing repository, and cherry-pick the commit in question from the "forgot to commit it" branch onto the regular branch. Then just push. Alternatively, go really low-tech and just use a diff/merge tool to copy the file changes from one folder to the other.

Categories : GIT

C# Windows Mobile MC67 Mobile Computer , how to print using Zebra RW420 via Bluetooth
You may start with http://www.zebra.com/us/en/products-services/software/adapt-software/zebralink-sdk-windows-mobile.html. It should run with VS2005 too. You may also simple start with a manual BT discovery and Serial Port assignment to the found BT printer. The next is to use a SerialPort in your app to send the print commands to the printer. It is just a serial communication. Then you have to learn the Zebra printer's printing command language to get some printout on the printer. Be aware that Zebra printers may come with different print command interpreter, for example ZPL or ZSimm or ESC/P. Look at the printer programmers guide starting at the printers support site. For example the Zebra QL-220: http://www.zebra.com/us/en/support-downloads/mobile/ql-220-plus.html There is also a ge

Categories : C#

.htaccess rule not excluding existing files when rule has a slash condition
I use the following rule in .htaccess, but this may be too general: RewriteRule ^q/([^/]+)/([^/]+)(/?)$ /path/to/q.php?type=$1&q=$2&{QUERY_STRING} [NC] This may be better for you: RewriteRule ^windows(/?)$ /path/to/windows.php?{QUERY_STRING} [NC] RewriteRule ^windows/([^/]+)(/?)$ /path/to/windows.php?type=$1&{QUERY_STRING} [NC] You will have to change this according to your situation. I haven't tested this, but I hope it is good enough for you to get where you want.

Categories : Htaccess

Cannot apply physical font to an AWT Button in Java applet run under Windows
It seems to be a problem using the Button class. I couldnt get any fonts working with the Button class either. However I did get the JButton class to take to the font no problem. JButton b=new JButton("Am I serifed ?"); My guess is AWT doesnt have much font support due to is swings popularity in the fancy UI area. If you dont know about swing....swing and AWT are 2 different ways to acheive a java interface, they are used and accessed the same and in many cases interchangeable. Eg: you can use your swing JButton inside your AWT Applet (Swing has a JApplet) Heres an article covering pros and cons of swing vs AWT http://edn.embarcadero.com/article/26970

Categories : Java

How to copy only file permissions and user:group from one machine and apply them on another machine in linux?
How about this? #!/bin/bash user="user" host="remote_host" while read file do permission=$(stat -c %a $file) # retrieve permission owner=$(stat -c %U $file) # retrieve owner group=$(stat -c %G $file) # retrieve group # just for debugging echo "$file@local: p = $permission, o = $owner, g = $group" # copy the permission ssh $user@$host "chmod $permission $file" < /dev/null # copy both owner and group ssh $user@$host "chown $owner:$group $file" < /dev/null done < list.txt I am assuming that the list of the files is saved in "list.txt". Moreover you should set the variables "user" and "host" accordingly to your setup. I would suggest to configure ssh to have "automatic login". Otherwise you should insert the password twice per loop. Here

Categories : Shell



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