Search Results

Search found 4939 results on 198 pages for 'fabiano ps'.

Page 9/198 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to make the start menu find a program based on a custom keyword?

    - by Pierre-Alain Vigeant
    I am searching for a way to type a keyword in the start menu Search programs and files field and that it will return the application that match the keyword. An example will better explain this: Suppose that I want to start the powershell. Currently what I can type in the search field is power and the first item that appear is the 64bits powershell shortcut. Now suppose that I'd like ps to return powershell as the first item of the search list. Currently, typing ps return all files with the .ps extension, along with a control panel options about recording steps but not the powershell executable itself. How can I do that?

    Read the article

  • Finding source of leaking active memory on Mac OS Lion

    - by Tim Kemp
    My activity monitor shows 6GB of active RAM usage: Yet my Real Memory column shows nothing like that amount: (There's another screenful below that, all smaller.) Backing that up, the output from this command (which sums up memory usage of every running process): ps -axm -o "rss,comm" | awk 'BEGIN { s=0;}; {s=s+$1;}; END { printf("%.2f GB\n", (s/1024.0/1024));}' Gives 4.09GB, so it looks to me like 2GB has leaked. I see much wider ranges sometimes, perhaps 2 or 3GB from the ps command and as much as 7 or 8GB of Active usage reported by Activity Monitor. I've tried quitting everything and logging my user out and back in again, but the Active usage is still far higher than the RAM reported by ps and by each process to Activity Monitor. This 2GB of active RAM is basically unrecoverable unless I reboot. Is there any way to a) detect what's leaking and b) get it back? Thanks

    Read the article

  • Cascade rewriting with special characters

    - by Korjavin Ivan
    I have this .htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php All queries send to index.php. In my site, I have this link: http://site/search/?v[1]=myid it work nice, I think index.php handle it. But now I want to more readable name for this link, something like http://site.si/byid_$myid.html I tried # RewriteRule ^byid_(.*).html$ search/?v\%5B1\%5D=$1 [NC,PS,NE] #escape and urlencode # RewriteRule ^byid_(.*).html$ search/?v%5B1%5D=$1 [NC,PS,NE] #urlencode # RewriteRule ^byid_(.*).html$ search/?v[1]=$1 [NC,PS,NE] #raw RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php Each of this lines kills rewriting, all requests return 500 error. Where is my fault?

    Read the article

  • Hosted Exchange 2010 Send As

    - by Ravi
    I have a hosted exchange 2010 and I am trying to setup the Send-As permission. I am following http://technet.microsoft.com/en-us/library/bb676368.aspx which basically describes the commands for achieving this. I have user account aaa and bbb [PS] C:\Windows\system32get-mailbox -organization myorg -identity "aaa" Name Alias ServerName ProhibitSendQuota ---- ----- ---------- ----------------- aaa aaa mx1 4.95 GB (5,315,022,848 bytes) [PS] C:\Windows\system32get-mailbox -organization myorg-identity "bbb" Name Alias ServerName ProhibitSendQuota ---- ----- ---------- ----------------- bbb bbb mx1 4.95 GB (5,315,022,848 bytes) Now, when I use the command below to give bbb permission to send-as aaa, I get the following error: [PS] C:\Windows\system32get-mailbox -organization myorg -identity "aaa" | Add-ADPermission -Extended Rights "Send As" -user "bbb" mx1/Microsoft Exchange Hosted Organizations/myorg/aaa wasn't found. Please make sure you've typed it correctly. + CategoryInfo : InvalidArgument: (:) [Add-ADPermission], ManagementObjectNotFoundException + FullyQualifiedErrorId : D2FD338,Microsoft.Exchange.Management.RecipientTasks.AddADPermission The error message that 'aaa' was not found does not make sense because i just retrieved the mailbox in the previous commands. I have tried using email addresses instead of alias but it does not work.

    Read the article

  • Why is process not being displayed by TOP

    - by drN
    I am running a Mathematica script (this question probably doesn't fit in Mathematica.SE however) and I know that it generally takes up a lot of RAM and loads up my cores. However, althought pgrep MathKernel is showing a pid, I find that top doesn't show this in the top processes, although I notice that it is taking up about 2.25GB of the 8GB available to me. pmap -x my_process_id total kB 2243132 1907404 1892108 AND ps aux | grep MathKernel dnaneet 20837 12.6 23.3 2234944 1907404 pts/1 Sl 09:23 8:01 /share/apps/mathematica/8.0.4/SystemFiles/Kernel/Binaries/Linux-x86-64/MathKernel -runfirst $TopDirectory="/share/apps/mathematica/8.0.4" -script ./dcm_10micrometer_2x -- ./dcm_10micrometer_2x ps aux shows that the process is taking about 12% (In asterisks) dnaneet 20601 0.0 0.0 68264 1660 pts/1 Ss 09:15 0:00 -bash **dnaneet 20837 12.2 23.3 2234944 1907404 pts/1 Sl 09:23 8:01 /share/apps/mat** dnaneet 21922 0.0 0.0 65604 948 pts/1 R+ 10:29 0:00 ps -aux Did this process fail and is the MathKernel just lingering?

    Read the article

  • powershell Read-host does not stop for input

    - by llirik42
    I thought this would be fairly basic, but i'm stuck. I have 3 lines of powershell script in which I want to collect a mailbox name from user input, then create names based on that mailbox name. (later the script proceeds to create the groups in AD, etc) my problem is that when I run all 3 of these lines by pasting them into powershell window, I don't get a change to enter the response to read-host. Instead the script just scrolls through to the next line and uses it as the response for the Read-Host here's the powershell: $name = read-host "enter group name" $groupfull = ($name+'.Full'a) $groupsendas = ($name+'.SendAs') Here's the output: PS C:\Users\kg> $name = read-host "enter group name" enter group name: $groupfull = ($name+'.Full') PS C:\Users\kg> $groupsendas = ($name+'.SendAs') PS C:\Users\kg> Thanks in advance

    Read the article

  • python: os.system does not execute shell comand

    - by capoluca
    I need to execute shell command in python program (I have ubuntu). More specifically I want to create graph using graphviz in python script. My code is os.system("dot -Tpng graph.dot -o graph.png") It does not work, but if I just type dot -Tpng graph.dot -o graph.png in command line then everything is fine. Do you know what the problem? Thank you! Edit: Does not work means that nothing happens, there are no errors. Output from dot -v -Tpng graph.dot -o graph.png: dot - graphviz version 2.26.3 (20100126.1600) Activated plugin library: libgvplugin_pango.so.6 Using textlayout: textlayout:cairo Activated plugin library: libgvplugin_dot_layout.so.6 Using layout: dot:dot_layout Using render: cairo:cairo Using device: png:cairo:cairo The plugin configuration file: /usr/lib/graphviz/config6 was successfully loaded. render : cairo dot fig gd map ps svg tk vml vrml xdot layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi textlayout : textlayout device : canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xlib loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg

    Read the article

  • Cannot mount USB 3 harddrive

    - by Thijs
    I cannot mount an USB 3 harddrive. When looking at dmesg I got the following error: [ 96.463269] usb 3-2.1: >new low-speed USB device number 10 using xhci_hcd [ 96.485777] usb 3-2.1: >New USB device found, idVendor=046d, idProduct=c025 [ 96.485787] usb 3-2.1: >New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 96.485792] usb 3-2.1: >Product: USB-PS/2 Optical Mouse [ 96.485797] usb 3-2.1: >Manufacturer: B16_b_02 [ 96.486118] usb 3-2.1: >ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes [ 96.490149] input: B16_b_02 USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.1/3-2.1:1.0/input/input12 [ 96.490500] hid-generic 0003:046D:C025.0003: >input,hidraw0: USB HID v1.10 Mouse [B16_b_02 USB-PS/2 Optical Mouse] on usb-0000:00:14.0-2.1/input0 [ 114.088984] usb 3-2.3: >new high-speed USB device number 11 using xhci_hcd [ 114.105041] usb 3-2.3: >New USB device found, idVendor=13fd, idProduct=1618 [ 114.105051] usb 3-2.3: >New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 257.531777] usb 3-2.3: >USB disconnect, device number 11 [ 258.513912] usb 3-2.4: >new high-speed USB device number 12 using xhci_hcd [ 258.514046] usb 3-2.4: >Device not responding to set address. [ 258.717649] usb 3-2.4: >Device not responding to set address. [ 258.921203] usb 3-2.4: >device not accepting address 12, error -71 [ 258.937388] hub 3-2:1.0: >unable to enumerate USB device on port 4 I have tried to mount the drive on ubuntu-12.04 and it mounts just fine.

    Read the article

  • Hybrid Graphics on Ubuntu 12.04 switching to discrete

    - by cfstras
    I have a Sony Vaio VPCCB-27FX with hybrid graphics. Using vgaswitcheroo enables me to switch my discrete card off to save power. Now when i want to switch to the discrete card for performance, my system freezes. I already tried logging out and killing x with service lightdm stop, but still, it freezes as soon as I echo DIS > switch. typing blindly, echo IGD > switch returns me to my console where it reads [ 179.555171] i915: switched off, but it seems the discrete card never gets switched on... running echo DDIS > switch gives me the following: [540....] [drm:atop_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting [540....] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CEE2 (len 62, WS 0, PS 0) @ 0xCEFE [540....] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing BBF6 (len 1036, WS 4, PS 0) @ 0xBCF3 [540....] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing BB8C (len 76, WS 0, PS 0) @ 0xBB94 [541....] [drm:r600_RING_TEST] *ERROR* radeon: ring test failed (scratch(0x8504)=0xFFFFFFFF) [541....] [drm:evergreen_resume] *ERROR* evergreen startup failed on resume after that, the atombios part repeats a few times. also, the terminal locks up again and sysrq+REISUB is my only rescue. Has anybody an idea how I can switch to my discrete card without the system locking up? #uname -srvmpio Linux 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux #lsb_release -r Description: Ubuntu 12.04 LTS

    Read the article

  • Copy vector of values to vector of pairs in one line

    - by Kirill V. Lyadvinsky
    I have the following types: struct X { int x; X( int val ) : x(val) {} }; struct X2 { int x2; X2() : x2() {} }; typedef std::pair<X, X2> pair_t; typedef std::vector<pair_t> pairs_vec_t; typedef std::vector<X> X_vec_t; I need to initialize instance of pairs_vec_t with values from X_vec_t. I use the following code and it works as expected: int main() { pairs_vec_t ps; X_vec_t xs; // this is not empty in the production code ps.reserve( xs.size() ); { // I want to change this block to one line code. struct get_pair { pair_t operator()( const X& value ) { return std::make_pair( value, X2() ); } }; std::transform( xs.begin(), xs.end(), back_inserter(ps), get_pair() ); } return 0; } What I'm trying to do is to reduce my copying block to one line with using boost::bind. This code is not working: for_each( xs.begin(), xs.end(), boost::bind( &pairs_vec_t::push_back, ps, boost::bind( &std::make_pair, _1, X2() ) ) ); I know why it is not working, but I want to know how to make it working without declaring extra functions and structs?

    Read the article

  • Why initialize an object to empty

    - by ProgEnthu
    I am learning windows programming with the help of MSDN.Why would somebody initialize an object like the following? WNDCLASS wc = { }; Will this zero all the memory of the object? Whole source code is following: #ifndef UNICODE #define UNICODE #endif #include <windows.h> LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow) { // Register the window class. const wchar_t CLASS_NAME[] = L"Sample Window Class"; WNDCLASS wc = { }; wc.lpfnWndProc = WindowProc; wc.hInstance = hInstance; wc.lpszClassName = CLASS_NAME; RegisterClass(&wc); // Create the window. HWND hwnd = CreateWindowEx( 0, // Optional window styles. CLASS_NAME, // Window class L"Learn to Program Windows", // Window text WS_OVERLAPPEDWINDOW, // Window style // Size and position CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, // Parent window NULL, // Menu hInstance, // Instance handle NULL // Additional application data ); if (hwnd == NULL) { return 0; } ShowWindow(hwnd, nCmdShow); // Run the message loop. MSG msg = { }; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0; } LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DESTROY: PostQuitMessage(0); return 0; case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); EndPaint(hwnd, &ps); } return 0; } return DefWindowProc(hwnd, uMsg, wParam, lParam); }

    Read the article

  • UppercuT &ndash; Custom Extensions Now With PowerShell and Ruby

    - by Robz / Fervent Coder
    Arguably, one of the most powerful features of UppercuT (UC) is the ability to extend any step of the build process with a pre, post, or replace hook. This customization is done in a separate location from the build so you can upgrade without wondering if you broke the build. There is a hook before each step of the build has run. There is a hook after. And back to power again, there is a replacement hook. If you don’t like what the step is doing and/or you want to replace it’s entire functionality, you just drop a custom replacement extension and UppercuT will perform the custom step instead. Up until recently all custom hooks had to be written in NAnt. Now they are a little sweeter because you no longer need to use NAnt to extend UC if you don’t want to. You can use PowerShell. Or Ruby.   Let that sink in for a moment. You don’t have to even need to interact with NAnt at all now. Extension Points On the wiki, all of the extension points are shown. The basic idea is that you would put whatever customization you are doing in a separate folder named build.custom. Each step Let’s take a look at all we can customize: The start point is default.build. It calls build.custom/default.pre.build if it exists, then it runs build/default.build (normal tasks) OR build.custom/default.replace.build if it exists, and finally build.custom/default.post.build if it exists. Every step below runs with the same extension points but changes on the file name it is looking for. NOTE: If you include default.replace.build, nothing else will run because everything is called from default.build.    * policyChecks.step    * versionBuilder.step NOTE: If you include build.custom/versionBuilder.replace.step, the items below will not run.      - svn.step, tfs.step, or git.step (the custom tasks for these need to go in build.custom/versioners)    * generateBuildInfo.step    * compile.step    * environmentBuilder.step    * analyze.step NOTE: If you include build.custom/analyze.replace.step, the items below will not run.      - test.step (the custom tasks for this need to go in build.custom/analyzers) NOTE: If you include build.custom/analyzers/test.replace.step, the items below will not run.        + mbunit2.step, gallio.step, or nunit.step (the custom tasks for these need to go in build.custom/analyzers)      - ncover.step (the custom tasks for this need to go in build.custom/analyzers)      - ndepend.step (the custom tasks for this need to go in build.custom/analyzers)      - moma.step (the custom tasks for this need to go in build.custom/analyzers)    * package.step NOTE: If you include build.custom/package.replace.step, the items below will not run.      - deploymentBuilder.step Customize UppercuT Builds With PowerShell UppercuT can now be extended with PowerShell (PS). To customize any extension point with PS, just add .ps1 to the end of the file name and write your custom tasks in PowerShell. If you are not signing your scripts you will need to change a setting in the UppercuT.config file. This does impose a security risk, because this allows PS to now run any PS script. This setting stays that way on ANY machine that runs the build until manually changed by someone. I’m not responsible if you mess up your machine or anyone else’s by doing this. You’ve been warned. Now that you are fully aware of any security holes you may open and are okay with that, let’s move on. Let’s create a file called default.replace.build.ps1 in the build.custom folder. Open that file in notepad and let’s add this to it: write-host "hello - I'm a custom task written in Powershell!" Now, let’s run build.bat. You could get some PSake action going here. I won’t dive into that in this post though. Customize UppercuT Builds With Ruby If you want to customize any extension point with Ruby, just add .rb to the end of the file name and write your custom tasks in Ruby.  Let’s write a custom ruby task for UC. If you were thinking it would be the same as the one we just wrote for PS, you’d be right! In the build.custom folder, lets create a file called default.replace.build.rb. Open that file in notepad and let’s put this in there: puts "I'm a custom ruby task!" Now, let’s run build.bat again. That’s chunky bacon. UppercuT and Albacore.NET Just for fun, I wanted to see if I could replace the compile.step with a Rake task. Not just any rake task, Albacore’s msbuild task. Albacore is a suite of rake tasks brought about by Derick Bailey to make building .NET with Rake easier. It has quite a bit of support with developers that are using Rake to build code. In my build.custom folder, I drop a compile.replace.step.rb. I also put in a separate file that will contain my Albacore rake task and I call that compile.rb. What are the contents of compile.replace.step.rb? rake = 'rake' arguments= '-f ' + Dir.pwd + '/../build.custom/compile.rb' #puts "Calling #{rake} " + arguments system("#{rake} " + arguments) Since the custom extensions call ruby, we have to shell back out and call rake. That’s what we are doing here. We also realize that ruby is called from the build folder, so we need to back out and dive into the build.custom folder to find the file that is technically next to us. What are the contents of compile.rb? require 'rubygems' require 'fileutils' require 'albacore' task :default => [:compile] puts "Using Ruby to compile UppercuT with Albacore Tasks" desc 'Compile the source' msbuild :compile do |msb| msb.properties = { :configuration => :Release, :outputpath => '../../build_output/UppercuT' } msb.targets [:clean, :build] msb.verbosity = "quiet" msb.path_to_command = 'c:/Windows/Microsoft.NET/Framework/v3.5/MSBuild.exe' msb.solution = '../uppercut.sln' end We are using the msbuild task here. We change the output path to the build_output/UppercuT folder. The output path has “../../” because this is based on every project. We could grab the current directory and then point the task specifically to a folder if we have projects that are at different levels. We want the verbosity to be quiet so we set that as well. So what kind of output do you get for this? Let’s run build.bat custom_tasks_replace:      [echo] Running custom tasks instead of normal tasks if C:\code\uppercut\build\..\build.custom\compile.replace.step exists.      [exec] (in C:/code/uppercut/build)      [exec] Using Ruby to compile UppercuT with Albacore Tasks      [exec] Microsoft (R) Build Engine Version 3.5.30729.4926      [exec] [Microsoft .NET Framework, Version 2.0.50727.4927]      [exec] Copyright (C) Microsoft Corporation 2007. All rights reserved. If you think this is awesome, you’d be right!   With this knowledge you shall build.

    Read the article

  • Lipoaspiration in your SQL Server Database

    Once, when disk space was at a premium, DBAs fought hard to keep the size of their database down. Now there seems less motivation to 'fight the flab' of a database. Fabiano Amorim was watching television recently when the subject matter, cosmetic surgery, gave him the theme and inspiration for this guide to keeping your database fit and trim. Free trial of SQL Backup™“SQL Backup was able to cut down my backup time significantly AND achieved a 90% compression at the same time!” Joe Cheng. Download a free trial now.

    Read the article

  • Windows PowerShell ISE doesn't import PSCX 2.0 module

    - by Alexander
    Hi, i am using Powershell 2.0 with the PSCX 2.0 module. When writing PS scripts inside Windows PowerShell ISE no Cmdlets from the PSCX module are availible. For example running "Get-DriveInfo" from Windows PowerShell ISE would cause an error. Running "Get-DriveInfo" from Powershell works fine. I guess Windows PowerShell ISE doesn't load my PS profile (this would be mad). Does anyone know why and what to do to get it work?

    Read the article

  • How do I make ncat not send a line-feed?

    - by tladuke
    I'm on Windows 7 Powershell and have ncat from http://nmap.org/ncat/ I'm trying to send "foo" to some network device PS> ncat -u 192.168.1.255 6061 foo but it sends "foo\n" (66 6f 6f 0a) and the line-feed makes the device not recognize the command. there's a -C option to add a carriage return, but that's no help. I made a text file containing "foo" and did PS> cat .\test.txt | ncat -u 192.168.1.255 6061 but that also adds CRLF

    Read the article

  • What is the best desktop KVM?

    - by Mat
    What is the best KVM for a programmer? I need to switch between a locked-down corporate box and my development machine rather than between servers. I've used a Black Box four port PS/2 VGA KVM switch for many years, but with the advent of USB-only PCs and DVI I need to upgrade as it doesn't play well with USB to PS/2 converters. My ideal features: USB keyboard and mouse input/output dual monitor switching four ports, but two would do at a push switch on middle mouse click, or from a keyboard hotkey at a pinch

    Read the article

  • How to get physical partition name from iSCSI details on Windows?

    - by Barry Kelly
    I've got a piece of software that needs the name of a partition in \Device\Harddisk2\Partition1 style, as shown e.g. in WinObj. I want to get this partition name from details of the iSCSI connection that underlies the partition. The trouble is that disk order is not fixed - depending on what devices are connected and initialized in what order, it can move around. So suppose I have the portal name (DNS of the iSCSI target), target IQN, etc. I'd like to somehow discover which volumes in the system relate to it, in an automated fashion. I can write some PowerShell WMI queries that get somewhat close to the desired info: PS> get-wmiobject -class Win32_DiskPartition NumberOfBlocks : 204800 BootPartition : True Name : Disk #0, Partition #0 PrimaryPartition : True Size : 104857600 Index : 0 ... From the Name here, I think I can fabricate the corresponding name by adding 1 to the partition number: \Device\Harddisk0\Partition1 - Partition0 appears to be a fake partition mapping to the whole disk. But the above doesn't have enough information to map to the underlying physical device, unless I take a guess based on exact size matching. I can get some info on SCSI devices, but it's not helpful in joining things up (iSCSI target is Nexenta/Solaris COMSTAR): PS> get-wmiobject -class Win32_SCSIControllerDevice __GENUS : 2 __CLASS : Win32_SCSIControllerDevice ... Antecedent : \\COBRA\root\cimv2:Win32_SCSIController.DeviceID="ROOT\\ISCSIPRT\\0000" Dependent : \\COBRA\root\cimv2:Win32_PnPEntity.DeviceID="SCSI\\DISK&VEN_NEXENTA&PROD_COMSTAR... Similarly, I can run queries like these: PS> get-wmiobject -namespace ROOT\WMI -class MSiSCSIInitiator_TargetClass PS> get-wmiobject -namespace ROOT\WMI -class MSiSCSIInitiator_PersistentDevices These guys return information relating to my iSCSI target name and the GUID volume name respectively (a volume name like \\?\Volume{guid-goes-here}), but the GUID volume name is no good to me, and there doesn't appear to be a reliable correspondence between the target name and the volume that I can join on. I simply can't find an easy way of getting from an IQN (e.g. iqn.1992-01.com.example:storage:diskarrays-sn-a8675309) to physical partitions mapped from that target. The way I do it by hand? I start Disk Management, and look for a partition of the correct size, verify that its driver says NEXENTA COMSTAR, and look at the disk number. But even this is unreliable if I have multiple iSCSI volumes of the exact same size. Any suggestions?

    Read the article

  • How to poll the username, when having the UID?

    - by JMW
    we're using ldap with sssd for the usermanagement, so our users are not in the "/etc/passwd" Unfortunately, ps just shows the UIDs: [root@xyz ~]# id jmw uid=1582(jmw) gid=1582(jmw) groups=1582(jmw), 1000(admins) [root@xyz ~]# ps aux [..cutting some output..] 1582 26794 25.0 0.4 190420 38508 ? S 12:15 0:00 /usr/bin/php-cgi -c php.ini [..cutting some output..] How can i poll the username, that belongs to a UID? ( a grep ':1582:' /etc/passwd doesn't work ;-) )

    Read the article

  • mysql on ubunto 4 is not running and is not remotely accessible

    - by user628119
    Currently i installed ubunot on ubunto 4.4, and using following commands i can see mysql, mysqld running ps -ef | grep mysql ps -ef | grep mysqld but when I run, netstat i don't see mysql and 3306 anywhere. in my.cnf file, i have given my ip and port is 3306. also when i run this command sudo netstat -tap | grep mysql i don't see anything and commands I needed to run the mysql 5 on port 3306 and on ip=x.x.x.x for remotely accessible Looking forward to your reply

    Read the article

  • IEnumerable<CustomType> in PowerShell

    - by svick
    I'm trying to use Enumerable.ToList() in PowerShell. Apparently, to do that, I have to explicitly convert the object to IEnumerable<CustomType>, but I am unable to do that. It seems I can't correctly write IEnumerable<CustomType> in PowerShell. Both IEnumerable<string> and CustomType itself work correctly (the custom type I'm trying to use is called WpApiLib.Page), so I don't know what can I be doing wrong. PS C:\Users\Svick> [Collections.Generic.IEnumerable``1[System.String]] IsPublic IsSerial Name BaseType -------- -------- ---- -------- True False IEnumerable`1 PS C:\Users\Svick> [WpApiLib.Page] IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Page System.Object PS C:\Users\Svick> [Collections.Generic.IEnumerable``1[WpApiLib.Page]] Unable to find type [Collections.Generic.IEnumerable`1[WpApiLib.Page]]: make su re that the assembly containing this type is loaded. At line:1 char:51 + [Collections.Generic.IEnumerable``1[WpApiLib.Page]] <<<<

    Read the article

  • Using a PreparedStatement to persist an array of Java Enums to an array of Postgres Enums

    - by McGin
    I have a Java Enum: public enum Equipment { Hood, Blinkers, ToungTie, CheekPieces, Visor, EyeShield, None;} and a corresponding Postgres enum: CREATE TYPE equipment AS ENUM ('Hood', 'Blinkers', 'ToungTie', 'CheekPieces', 'Visor', 'EyeShield', 'None'); Within my database I have a table which has a column containing an array of "equipment" items: CREATE TABLE "Entry" ( id bigint NOT NULL DEFAULT nextval('seq'::regclass), "date" character(10) NOT NULL, equipment equipment[] ); And finally when I am running my application I have an array of the "Equipment" enums which I want to persist to the database using a Prepared Statement, and for the life of me I can't figure out how to do it. StringBuffer sb = new StringBuffer("insert into \"Entry\" "); sb.append("( \"date\", \"equipment \" )"); sb.append(" values ( ?, ? )"); PreparedStatement ps = db.prepareStatement(sb.toString()); ps.setString("2010-10-10"); ps.set???????????

    Read the article

  • Parameters with default value not in PsBoundParameters?

    - by stej
    General code Consider this code: PS> function Test { param($p='default value') $PsBoundParameters } PS> Test 'some value' Key Value --- ----- p some value PS> Test # nothing I would expect that $PsBoundParameters would contain record for $p variable on both cases. Is that correct behaviour? Question I'd like to use splatting for a lot of functions that would work like this: function SomeFuncWithManyRequiredParams { param( [Parameter(Mandatory=$true)][string]$p1, [Parameter(Mandatory=$true)][string]$p2, [Parameter(Mandatory=$true)][string]$p3, ...other parameters ) ... } function SimplifiedFuncWithDefaultValues { param( [Parameter(Mandatory=$false)][string]$p1='default for p1', [Parameter(Mandatory=$false)][string]$p2='default for p2', [Parameter(Mandatory=$false)][string]$p3='default for p3', ...other parameters ) SomeFuncWithManyRequiredParams @PsBoundParameters } I have more functions like this and I don't want to call SomeFuncWithManyRequiredParams with all the params enumerated: SomeFuncWithManyRequiredParams -p1 $p1 -p2 $p2 -p3 $p3 ... Is it possible?

    Read the article

  • bash script to check running process

    - by elasticsecurity
    I wrote a bash-script to check if a process is running. It doesn't work since the ps command always returns exit code 1. When I run the ps command from the command-line, the $? is correctly set, but within the script it is always 1. Any idea? #!/bin/bash SERVICE=$1 ps -a | grep -v grep | grep $1 > /dev/null result=$? echo "exit code: ${result}" if [ "${result}" -eq "0" ] ; then echo "`date`: $SERVICE service running, everything is fine" else echo "`date`: $SERVICE is not running" fi Bash version: GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)

    Read the article

  • .net, using PowerShell class to invoke a "[namespace.class]::method" style command

    - by Marco
    Hello, I created a powershell object via .net to invoke commands. When I invoke normal commands like 'Get-Process' I had no problems: ps.AddCommand("Get-Process").AddParameter(...).Invoke() but I'm not able to invoke a .net method with the syntax "[namespace.class]::method", just to make an example to invoke [System.IO.File]::Exists("c:\boo.txt"). I tried with ps.AddCommand("[System.IO.File]::Exists(\"c:\boo.txt\")").Invoke() ps.AddCommand("[System.IO.File]::Exists").AddArgument("c:\boo.txt\").Invoke() and some others. It always throws an exception which says that the command specified is not recognized. There is a way to invoke that type of command? Thanks

    Read the article

  • Muliple Foreground Colors in Powershell in One Command.

    - by Mark Tomlin
    I want to output many different foreground colors with one statement. PS C:\> Write-Host "Red" -ForegroundColor Red Red This output is red. PS C:\> Write-Host "Blue" -ForegroundColor Blue Blue This output is blue. PS C:\> Write-Host "Red", "Blue" -ForegroundColor Red, Blue Red Blue This output is magenta, but I want the color to be Red for the word red, and blue for the word blue via the one command. How can I do that?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >