w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Stretch / shrink parent div to fit content's width
Block-level elements actually do this naturally. The problem you have is, absolute positioned elements are taken out of the normal flow, so the block can't wrap around your white boxes. Is there a reason you need them positioned absolute? EDIT: If you just wanted the white boxes to be centered, here you go: http://jsfiddle.net/Marconius/djxpU/1/ Code (because I have to): margin: 0 auto;

Categories : CSS

How to get CSS multi-column layout to use the appropriate width when using auto fixed-width columns?
The problem is that you have specified height: 100%, which means that the divelements will attempt to fill the .collection element vertically first. By removing the height attribute, columns will balance properly along the width: as such: http://jsfiddle.net/QeD77/ EDIT: Remade the fiddle using JS to balance width: http://jsfiddle.net/tG4P6/4/

Categories : HTML

Fixed-width table with variable-width columns
You need the left and right padding properties set to 2.5em. However, this will only work if either there are no breaks or every cell breaks its content. ul { display: table; width: 300px; } li { display: table-cell; text-align: center; border: solid 1px #000; padding: 0 2.5em; }

Categories : CSS

How to split a cell into columns so they have the same width as columns below them in a row
It is very easy. All you need to do is use the rowspan attribute on the first th and add another row to the table. Like so: http://jsfiddle.net/skip405/CPSs9/1/

Categories : HTML

Windows phone button - adjustsFontSizeToFitWidth equivalent (auto shrink text to button size)
Someone build a textblock control with such a property. So you could use that control and set it as the buttons content. http://edventuro.us/2010/03/an-auto-scaling-textblock-for-silverlight/ (C# code and example project linked in the last sentence)

Categories : C#

Powershell script running fine on Windows 8 but not on Windows 7
The error indicates you didn't correctly set the execution policy. Firstly, you have run Powershell as an administrator. To do this, right click on the Powershell icon in the start menu and click on "Run as Administrator". Next you have to run the following command in Powershell: Set-ExecutionPolicy RemoteSigned You will be prompted to allow the change. Type "Y" and press return. Finally, try running your script.

Categories : Powershell

HTML: How to increase width of table columns when the table is inside a div with fixed width
Why not use percentages? jsfiddle: http://jsfiddle.net/qCYDq/ also you are limiting yourself with 200px in width, if the text inside the table (word width) is larger than your 200px it will force its width and then cause your scroller to appear as the table will stretch to fit the words. <!DOCTYPE html> <html> <head> <style> table { border-collapse:collapse; width: 100%; font-size: 9px; } td,th { border:1px solid black; width: 25%; } .myclass { width:200px; overflow:auto } </style> </head> <body> <div class="myclass"> <table> <tr> <th>Firstname</th> <th>Lastname</th> <th>Savings</th> <th>Expenditure

Categories : HTML

Unable to connect to Windows Azure from Powershell Azure Powershell module
To see is there some result from Import-AzurePublishSettingsFile you can call: Get-AzureSubscription By default it select the default to current subscription. If you don't see any result then you don't import your subscription settings right. This Introduction to Windows Azure PowerShell also can help you.

Categories : Windows

thead with one td (full width) and tbody with 2 columns (width not depending on thead)
It's easier than that: You just need a colspan on your th element. Colspan defines, how many cells the element extends: <table> <thead> <tr><th colspan="2">longer Heading with a width of 100%</th></tr> </thead> <tbody> <tr><td>cell 1</td><td>cell 2</tr> <tr><td>cell 3</td><td>cell 4</tr> </tbody> </table> See my Fiddle

Categories : HTML

Powershell: Merge selective columns in 2 CSV file
If the files will not be too large, I would load one into a hash table using the common column value as the key, then iterate over the second file and use the key value to look up the columns to merge from the first file. You just have to watch out for eating up too much RAM if the first file is big (what is big is dependent on how much RAM you have) because its entire contents will be loaded into memory. #Make an empty hash table for the first file $File1Values = @{} #Import the first file and save the rows in the hash table indexed on "KeyColumn" Import-Csv -Path c:file1.csv | ForEach-Object { $File1Values.Add($_.KeyColumn, $_) } #Import the second file, using Select-Object to select all the values from file2, # and adding custom properties from the first file using the name/e

Categories : File

2 columns with 100% width bootstrap 3
I think, without seeing any code, that it could be a problem with the padding not being taken into account when the width is calculated. This is an issue with box sizing: http://quirksmode.org/css/user-interface/boxsizing.html try: box-sizing: border-box;

Categories : HTML

How to have slickgrid columns of different width?
You could take a look at an answer I posted on a previous question asked, which seems very similar to your problem... see here slickgrid-final-column-auto-size-to-use-all-remaining-space Hope that helps you

Categories : Javascript

Delete multiple files or folders from a CSV file that contain more than one columns (Powershell)
First I would remove the type information from your CSV like so: Import-Module ActiveDirectory Get-ADUser -SearchBase "OU=Marked for Deletion,OU=Disable Users,DC=******,DC=com" -Filter * -Property * | Select-Object -Property homeDirectory,profilePath | Export-CSV -Path .Remove.csv -NoTypeInformation Then for your delete code I would use this: Import-Csv "C:lab emove.csv" | % { Remove-Item -Path $_.homeDirectory -force -Recurse Remove-Item -Path $_.profilePath -force -Recurse } write-host -foregroundcolor yellow "Delete action complete" The problem with your code is that you are not looping through a column, you looping by line and then doing it twice. To do it your way you would need to split the line at the comma.

Categories : Powershell

bootstrap columns width issue
It happens because .row-fluid .span* width is a percentage. If you resize the window browser, you will see that column width changes, in this case span1. To hold always 75px to span1, put in your custom css .row-fluid .span1{ width: 75px !important; *width: 75px !important; }

Categories : CSS

Add Column to CSV Windows PowerShell
Here's one way to do that using Calculated Properties: Import-Csv file.csv | Select-Object *,@{Name='column3';Expression={'setvalue'}} | Export-Csv file.csv -NoTypeInformation You can find more on calculated properties here: http://technet.microsoft.com/en-us/library/ff730948.aspx. In a nutshell, you import the file, pipe the content to the Select-Object cmdlet, select all exiting properties (e.g '*') then add a new one.

Categories : Powershell

Windows SDK environment and powershell
You can launch an instance of CMD.EXE, run SetEnv.cmd, and then launch PowerShell from within the CMD window. The PowerShell instance that opens up will import the environment variables from the CMD instance that spawned it. It's ugly, but it works. I wrote a batch script to do it for me, and just created a shortcut to it on my desktop. Here's an example: @echo off call "C:PathToSetEnv.cmd" param1 param2 param3 powershell.exe -noexit

Categories : Windows

Highcharts columns have no width (seemingly arbitrarily)
That's really odd. But, you're first data series is in reverse date order. If you fix that, the chart is right. http://jsfiddle.net/pUTQd/ series: [{ name: 'Average Response Time', data: [[Date.UTC(2013, 7, 2), 354.5], [Date.UTC(2013, 7, 3), 1981.875], [Date.UTC(2013, 7, 4), 434.5], [Date.UTC(2013, 7, 5), 678.1], [Date.UTC(2013, 7, 6), 87.465] ], dataGrouping: { enabled: false }, pointPadding: .05 }], (note I just changed the dates, I didn't change the data)

Categories : Javascript

Datatable : fixed width for selected columns only
Why not let a function dynamically generate the aoColumns-array? // function that generates the aoColumns-array based on the tables <thead> // columns beyond #3 get a fixed 25px width (just to be illustrative) // expand the switch if certain columns need certain fixed widths function aoColumns() { var ao = []; $("#table th").each(function(i) { switch (i) { case 0 : ao.push({"sWidth": "50px"}); break; case 1 : ao.push({"sWidth": "100px"}); break; case 2 : ao.push({"sWidth": "100px"}); break; default : ao.push({"sWidth": "25px"}); break; } }); return ao; } $(document).ready(f

Categories : Jquery

C# Wpf Datagrid Last Column Width="*" Collapses Other Columns
try using the following code: private void FitToContent() { int numCols ; int i ; numCols = dg.Columns.Count() ; i = 0 ; // where dg is your data grid's name... foreach (DataGridColumn column in dg.Columns) { if(i < numCols - 1) { //if you want to size ur column as per the cell content column.Width = new DataGridLength(1.0, DataGridLengthUnitType.SizeToCells); //if you want to size ur column as per the column header column.Width = new DataGridLength(1.0, DataGridLengthUnitType.SizeToHeader); //if you want to size ur column as per both header and cell content column.Width = new DataGridLength(1.0, DataGridL

Categories : C#

Columns with padding overlapping, but not filling width
Here's my solution to the problem, which involves making to total width of the design just 5px wider. Not optimal at all when I was going for a 1200px wide design, but it fixes the issue of the different div's not aligning when overlapping each other. JSFiddle HTML <div class="col-5-5 module top"> <div class="module-content">1205px</div></div> <div class="grid"> <div class="col-5-5"> <div class="col-1-5 module col-first "> <div class="module-content"> 245px x 320px </div> </div> <div class="col-2-5 module main"> <div class="module-content"> 585px x 400px </div> </div>

Categories : Misc

Closing All Explorer Windows in PowerShell
I think there's something in the pipeline that goes wrong. This code works: $a = (New-Object -comObject Shell.Application).Windows() | ? { $_.FullName -ne $null} | ? { $_.FullName.toLower().Endswith('explorer.exe') } $a | % { $_.Quit() }

Categories : Powershell

Sending mail with Powershell Windows 7
This could be due to many reasons, but one issue that I had seen this exact same error was because an anti-virus program was blocking Powershell from sending the email. Check if this is the case by looking at your anti virus logs. Beyond that, you might want to check if firewall is fine, you can connect to the SMTP server etc.

Categories : Email

How can I set IIS Windows Auth Providers with powershell?
You can only enable and disable the authentication methods available under the following section: system.webServer/authentication This is because system.webServer/authentication is not a collection and does not support the add and remove config elements. Have a look in the IIS configuration schema file in: C:WindowsSystem32inetsrvconfigschemaIIS_schema.xml Search for system.webServer/security/authentication and you will see that each child element of that section is explicitly defined and there is no definition for system.webServer/security/authentication itself. With regards to ordering, it makes no difference trying to change the authentication method order. For example in the following order (Basic is before Windows Authenticaton): <system.webServer> <security

Categories : Powershell

Why does C# Powershell method work in Windows app but not Web app
You should note that when you do create a profile, it can be user or machine specific. Also, it can be scoped for all shells or just powershell. http://technet.microsoft.com/en-us/magazine/2008.10.windowspowershell.aspx

Categories : C#

CSS Hide overflow text on a table with different width columns
If you don't need to support old browsers, try the accepted answer here: CSS text-overflow in a table cell?

Categories : HTML

Print equal-width columns in C using printf formatting
You can find the maximum length for txt1, txt2, and txt3, and then format it: // compute the max string length of txt1 inputs in advance int s1 = strlen(firstTxt1); if (s1 < strlen(secondTxt1) s1 = strlen(secondTxt1); ... printf("%.*s %.*s %.*s ", s1, txt1, s2, txt2, s3, txt3);

Categories : C

Running PowerShell script in a C# Windows Service App
Here is a pretty good discussion on how to call Powershell from C#: http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C I suggest you start with the RunScript function and add it to a VS2010 console application. Main() would then invoke RunScript something like RunScript( "echo 'hello from PS';get-date; get-culture; "). Windows services have quite a few differences from a normal console application. You can read about how to write a windows service on MSDN, but if you've never coded before, you have a steep learning curve in front of you. There is a service from an old Resource Kit call srvany.exe (Google it) which would run any console app as a service. However in Windows Vista (and above) services were restricted from accessing the desktop, so srvany could

Categories : C#

Get-ScheduledTask in PowerShell on Windows Server 2003
You'll find all the informations you need about the missing COM object in Working with scheduled tasks from Windows PowerShell. Using Windows Server 2012 you can use Scheduled Tasks Cmdlets in Windows PowerShell.

Categories : Powershell

setting NTP server on Windows machine using PowerShell
From a bit of googling about w32tm vs control panel date/time, I found this, which appears to be what you need. Hope that helps you out :-)

Categories : Powershell

PowerShell/Windows scripting: Get interface name containing a specified gateway IP
maybe you can use InterfaceIndex to link this objects: get-wmiObject -Query "select InterfaceIndex from Win32_NetworkAdapter" get-wmiObject -Query "select InterfaceIndex from Win32_NetworkAdapterConfiguration" InterfaceIndex Data type: sint32 Access type: Read/write IP address of the next hop of this route. The value in this property is the same as the value in the InterfaceIndex property in the instances of Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration that represent the network interface of the next hop of the route. In the case of a route bound to an interface that is realized using a broadcast medium, the value of this field is the agent IP address on that interface. description from: http://msdn.microsoft.com/en-us/library/windows/desktop/aa394162(v=vs.85).aspx someth

Categories : Misc

Generating Powershell scripts by working in Windows GUI
I don't have the exact answer to your question, but the things you may have read/heard about on some blog or podcast are : first : The Start-Transcript and Stop-Transcrip CmdLets that allow you to record all the command lines you type at the PowerShell prompt. Second : As you are using PowerShell 3 you are using ISE which is now, a not so bas PowerShell editor. But it was not so at the begining and I was using a free editor from Quest Software called PowerGUI. When you download this editor it comes with an other soft called administrative console. This administrative console allow you generate PowerShell for basic operations and comes with a WMI browser that also generate PowerShell scripts. Third : It exists also a PowerShell Scriptomatic, but I just never use it.

Categories : Powershell

Windows Azure Powershell Copying file to VM
You cannot use PowerShell to copy a file directly to a Virtual Machine's OS disk (or even to one of its attached disks). There's no API for communicating directly with a Virtual Machine's innards (you'd need to create your own custom service for that. You can use PowerShell to upload a file to a Blob, with Set-AzureStorageBlobContent. At that point, you could notify your running app (possibly with a Queue message?) on your Virtual Machine that there's a file waiting for it to process. And the processing could be as simple as copying the file down to the VM's local disk.

Categories : Powershell

Simple way to get CPU load from Windows Server via PowerShell
Assuming the $Servers collection to be populated with host names, you are not that far off. I don't have the Quest tools, so am unable to check the collection. # Best practice: avoid mistyped variable names set-psdebug -strict $Servers = Get-QADComputer -sizelimit 0 | where {$_.Name -like "*myserver*"} | select Name # Best practice: avoid magic numbers; readonly variable for new-variable -name CPULIMIT -value 75 -option readonly foreach($Server in $Servers){ $result = Get-WmiObject win32_processor -ComputerName $Server.Name # TODO: add error handler here in case $server is unavailable # Compare the wmi query result to the limit constant if($result.LoadPercentage -le $CPULIMIT){ # Write a formatted string that contains the server name and current load Writ

Categories : Powershell

Four columns in a div: three of the the width depends on content; fourth one takes the rest
Specifying the float of a div forces content to flow around it, so you should be fine with simply not floating the rightmost div and letting it default. In your case, just remove the styling from the 100 euro div and it'll take up whatever space is left. The problem here is that setting explicit width percentages isn't exactly what you want - what you need to do is dynamically resize the divs based on their interior content using javascript.

Categories : CSS

Table with different amount of rows and columns(diff. width) (Qt5, QGridLayout)
The format of adding a widget or layout to your QGridLayout is as follows: myGridLayout->addWidget( QWidget*, row, column, rowspan, columnspan ); myGridLayout->addLayout( QLayout*, row, column, rowspan, columnspan ); You can put your rowspan and columnspan as required by you. For example, if you want the widget to span 4 columns, you just need to put 4 in the required field. EDIT: Ofcourse there are other optional fields for alignment etc but I haven't mentioned those in the above format. EDIT 2: So what I understand is that you want to be able to insert or magnify cells in any row and the rest of the cells should shift accordingly. In that case I think a QHBoxLayout for each row would be more suitable. You can then align these QHBoxLayouts in a single QVBoxLayout

Categories : Qt

DIV not growing in width with fixed height while having css3 columns expand to the right
Here is Fiddle Add height: 100%; to your #in{...} CSS i.e. #in { -moz-column-width: 200px; column-width: 200px; height: 400px; border: 1px solid red; height: 100%; }

Categories : HTML

css 2 columns, dynamic content. Scroll on right column only without going over window width
The only way i can think of is by doing this (fiddle): .left { background-color: #ccc; float: left; vertical-align: top; } .right { background-color: #666; color: #ccc; } But you'll have issues with padding on the right div since part of it is hidden behind the left div (since it is floated)

Categories : CSS

jqgrid columns width issue on mobile orientation change
i got the solution, just you have to use the window orientation event. following is the code you can use it for the same. window.onorientationchange = function () { resizeJqGridWidth("GridID", "Grid_wrapper"); } function resizeJqGridWidth(grid_id, div_id) { //Resized to new width as per window $('#' + grid_id).setGridWidth($('#' + div_id).width(), true); } Enjoy

Categories : Jquery

Jquery datatable - Table header and columns width mismatching
You need to put this in table for fixed size column EDIT: You missed to write table width and layout in style of table, I hope following will work for you <table border="1" cellspacing="0" cellpadding="0" id="products" style="clear:both;layout:fixed;width:400px;"> <col style="width: 40%"/> <col style="width: 30%"/> <col style="width: 10%"/> <col style="width:20%"/> Check update updated fiddle

Categories : Jquery

Error While uploading to windows Azure using powershell Script
I moved my script to the virtual machine which is hosted on azure and this error is no more so i think this error was due to my firewall or due to the slow internet connection.the script is running as desired on the virtual machine and i am able to automate my deployment process.

Categories : Asp Net



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