Search Results

Search found 6758 results on 271 pages for 'shell exec'.

Page 114/271 | < Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >

  • Combining query rows in a loop

    - by icemanind
    I have the following ColdFusion 9 code: <cfloop from="1" to="#arrayLen(tagArray)#" index="i"> <cfquery name="qryGetSPFAQs" datasource="#application.datasource#"> EXEC searchFAQ '#tagArray[i]#' </cfquery> </cfloop> The EXEC executes a stored procedure on the database server, which returns rows of data, depending on what the parameter is. What I am trying to do is combine the queries into one query object. In other words, if it loops 3 times and each loop returns 4 rows, I want a query object that has all 12 rows in one object. How do I acheive this?

    Read the article

  • SSH: one user logs in, other don't

    - by Co Lega
    Some users can ssh correctly, others don't. I have an admin user, which is in wheel. I used vsftpd for allowing FTP. I created a nologin user for FTP. Call this user "ftpuser". Now I want to allow sftp. It allows me to connect using admin user. I remove the nologin, by giving the user a shell via usermod -s /bin/bash ftpuser. It still doesn't allow me to connect from the ftpuser via sftp. The content of /home/ftpuser/.ssh is just the known_hosts file which contains "localhost" entry only. User permissions are (in theory) ok: ls -la /home working (admin) : drwx------ 18 admin admin 4096 Feb 6 15:33 admin non-working(ftpuser): drwx------ 3 ftpuser ftp 4096 Mar 26 15:25 ftpuser I haven't configured anything special on openssh. Does the ftpuser need anything extra than shell to enter via ssh?

    Read the article

  • Compiling CSS to SWF server side Java, What is the best practice?

    - by DataSurfer
    My project allows users to create custom css for our flex app. In regards to compiling the CSS into SWFs on the server side: Should I use the flex2.compiler.css.Compiler class in mxmlc-3.5.0.12683.jar? Or Should I invoke mxmlc from Runtime.getRuntime().exec()? The css.Compiler class is not very well documented. Does anyone have any examples that use this? For the Runtime exec method, what is the best way to package mxmlc into the maven build so its available to the server at runtime?

    Read the article

  • How to cd into smb://[email protected] from terminal?

    - by John
    I am using ubuntu and gnome on my computer. When I open up File Browser, on the left hand rail, I see conveniently a folder called "Work Server". When I mouse over it, the following caption appears "smb://[email protected]". If I click on that folder, then I can see the contents of that folder. Everything is great. So now when I open up a terminal/shell, I type in cd smb://[email protected] I get an error saying the directory doesn't exist. How do I enter this directory via shell/terminal?

    Read the article

  • Using T-Sql, how can I insert from one table on a remote server into another table on my local server?

    - by GenericTypeTea
    Given the remote server 'Production' (currently accessible via an IP) and the local database 'Development', how can I run an INSERT into 'Development' from 'Production' using T-SQL? I'm using MS SQL 2005 and the table structures are a lot different between the two databases hence the need for me to manually write some migration scripts. UPDATE: T-SQL really isn't my bag. I've tried the following (not knowing what I'm doing): EXEC sp_addlinkedserver @server = N'20.0.0.1\SQLEXPRESS', @srvproduct=N'SQL Server' ; GO EXEC sp_addlinkedsrvlogin '20.0.0.1\SQLEXPRESS', 'false', 'Domain\Administrator', 'sa', 'saPassword' SELECT * FROM [20.0.0.1\SQLEXPRESS].[DatabaseName].[dbo].[Table] And I get the error: Login failed for user ''. The user is not associated with a trusted SQL Server connection.

    Read the article

  • How do I get the username in Java (ie, who -m in Java) (or Jython 2.1)

    - by amertune
    Here's the situation. I have a jython 2.1 script in a shared account that needs to know who is calling it. In bash, I can simply use 'who -m' and it will give me the correct username. I haven't been able to find anything in java (or jython) that would give me a similar result. Even trying to call Runtime.getRuntime().exec("who -m") doesn't do anything. When I try to read the InputStream from the process returned by exec, the stream is empty.

    Read the article

  • create file in user's temp folder

    - by user2867494
    I am using the following code to try and create a file in the user's temp folder, but it will not. var fs = require('fs'); var os = require('os'); var ostemp = os.tmpdir(); var exec = require('child_process').exec; var file = fs.createWriteStream(ostemp + '\setup.exe'); ostemp will return a path similar to 'c:\users\user\appdata\local\temp' But the code above will save the file to local, and the filename will be tempsetup.exe Why is that?

    Read the article

  • may be python error!!!

    - by bahar
    Hi I'm not familiar with python, I just want to check something so I tried to run a .py code in linux so I wrote : ./waf wifi-olsr-flowmon --plot which is a .py program after that whatever I want to run just see these error: /home/bahar/Desktop/ns/ns-allinone-3.9/ns-allinone-3.9/ns-3.9/wscript: error: Traceback (most recent call last): File "/home/bahar/Desktop/ns/ns-allinone-3.9/ns-allinone-3.9/ns-3.9/.waf-1.5.16-e6d03192b5ddfa5ef2c8d65308e48e42/wafadmin/Utils.py", line 197, in load_module exec(compile(code,file_path,'exec'),module.__dict__) File "/home/bahar/Desktop/ns/ns-allinone-3.9/ns-allinone-3.9/ns-3.9/wscript", line 32, in <module> import cflags # override the build profiles from waf ImportError: No module named cflags I dont know what does it mean or why it happened, would you please tell me what is the problem . Bests

    Read the article

  • Custom command in right-click menu not working

    - by Luke
    I have added, via the registry, a right click menu option for all filetypes which is supposed to get the MD5 checksum for a file. HKEY_CLASSES_ROOT*\shell\Checksum - Default: Get Checksum and HKEY_CLASSES_ROOT*\shell\Checksum\command - Default: checksum.cmd "%1" checksum.cmd simply clears the screen, calls fciv.exe using %1 and then pauses. Unfortunately, whilst the option "Get Checksum" appears correctly in the right click menu, it doesn't perform the right action when clicked. When I click it an "Open With" dialog opens, which is of course not what I want. Both checksum.cmd and fciv.exe are in the PATH. checksum.cmd: @echo off cls fciv.exe %1 pause Anybody know what's going on?

    Read the article

  • Procedure Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

    - by Nick
    The stored proc is failing at below location,Thanks, for all your help. --Insert MSOrg Information DECLARE @PersonnelNumber int, @MSOrg varchar(255) DECLARE csr CURSOR FAST_FORWARD FOR SELECT PersonnelNumber FROM Person OPEN csr FETCH NEXT FROM csr INTO @PersonnelNumber WHILE @@FETCH_STATUS = 0 BEGIN EXEC GetMSOrg @PersonnelNumber, @MSOrg out INSERT INTO PersonSubject ( PersonnelNumber ,SubjectID ,SubjectValue ,Created ,Updated ) SELECT @PersonnelNumber ,SubjectID ,@MSOrg ,getDate() ,getDate() FROM Subject WHERE DisplayName = 'MS Org' FETCH NEXT FROM csr INTO @PersonnelNumber END CLOSE csr DEALLOCATE csr Below is the stored prc defination GetMSOrg and fails at third condition CREATE PROCEDURE [dbo].[GetMSOrg] ( @PersonnelNumber int ,@OrgTerm varchar(200) out ) AS DECLARE @MDRTermID int ,@ReportsToPersonnelNbr int --Check to see if we have reached the top of the chart SELECT @ReportsToPersonnelNbr = ReportsToPersonnelNbr FROM ReportsTo WHERE PersonnelNumber = @PersonnelNumber IF (@ReportsToPersonnelNbr IS NULL) --Reached the Top of the Org Ladder BEGIN SET @OrgTerm = 'Non-standard rollup' END ELSE IF (@PersonnelNumber IN (SELECT PersonnelNumber FROM OrgTermMap)) BEGIN SELECT @OrgTerm = s.Term FROM OrgTermMap tm JOIN Taxonomy..StaticHierarchy s ON tm.OrgTermID = s.TermID WHERE tm.PersonnelNumber = @PersonnelNumber END ELSE BEGIN SELECT @MDRTermID = tm.OrgTermID FROM ReportsTo r JOIN OrgTermMap tm ON r.ReportsToPersonnelNbr = tm.PersonnelNumber WHERE r.PersonnelNumber = @PersonnelNumber IF (@MDRTermID IS NULL) BEGIN EXEC GetMSOrg @ReportsToPersonnelNbr, @OrgTerm out END ELSE BEGIN SELECT @OrgTerm = Term FROM Taxonomy..StaticHierarchy WHERE VocabID = 118 AND TermID = @MDRTermID END END GO

    Read the article

  • Would this rollback/stop all records from inserting?

    - by chobo2
    Hi I been going through this tutorial http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx and them make a SP like this CREATE PROCEDURE [dbo].[spTEST_InsertXMLTEST_TEST](@UpdatedProdData nText) AS DECLARE @hDoc int exec sp_xml_preparedocument @hDoc OUTPUT,@UpdatedProdData INSERT INTO TBL_TEST_TEST(NAME) SELECT XMLProdTable.NAME FROM OPENXML(@hDoc, 'ArrayOfTBL_TEST_TEST/TBL_TEST_TEST', 2) WITH ( ID Int, NAME varchar(100) ) XMLProdTable EXEC sp_xml_removedocument @hDoc Now my requirements require me to mass insert and mass update one after another. So first I am wondering can I merge those into one SP? I am not sure how it works with this OPENXML but I would think it would just be making sure that the XPath is right. Next what happens while it would be running this combined SP and something goes wrong. Would it roll back all the records or just stop and the records that happened before this event that crashed it would be inserted?

    Read the article

  • Linux server, locating files containing nothing but 4 specific lines.

    - by Denis
    Hi, I'm dealing with a compromised website, in which hackers injected an htaccess instruction to redirect traffic. I can easily locate .htaccess files that contain the forwarding hack, BUT in cases where the directory already contained an htaccess file, they appended the dangerous instructions, so I cannot just deleted any htaccess file or could harm the site by letting formerly pw-protected directories wide open, or urlrewrite instructions (WordPress) be deleted, etc. I could not find the way to locate files that only contain those 4 lines of redirect hack, could you shed some light ? So far, using find . -type f -exec grep -q targetpiratedomain {} \; -exec echo rm {} \; Thanks !

    Read the article

  • Identifying a function call in a python script line in runtime

    - by Dani
    I have a python script that I run with 'exec'. The script's string has calls to functions. When a function is called, I would like it to know the line number and offset in line for that call in the script (in the string I fed exec with). Here is an example. If my script is: foo1(); foo2(); foo1() foo3() And if I have code that prints (line,offset) in every function, I should get (0,0), (0,8), (0,16), (1,0) In most cases this can be easily done by getting the stack frame, because it contains the line number and the function name. The only problem is when there are two functions with the same name in a certain line. Unfortunately this is a common case for me. Any ideas?

    Read the article

  • calling two functions sequentially in vbscript with single click event

    - by sushant
    i need to call two function on a single click event. and also the functions shud get executed sequentially. i tried click me . but its not working.its not calling any of the functions. here is the complete code. sorry for formatting. function copy() Dim WshShell, oExec,g,h h="D:\d" g="xcopy " & h & " " & "D:\y\ /E" Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec(g) Do While oExec.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExec.Status end function function zip() Dim WshShel, oExe Set WshShel = CreateObject("WScript.Shell") Set oExe = WshShel.Exec("cmd /c cd D:\d & D: & winzip32.exe -min -a D:\a") Do While oExe.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExe.Status end function click me any help is appreciated.

    Read the article

  • rename multiple files with unique name

    - by psaima
    I have a tab-delimited list of hundreds of names in the following format old_name new_name apple orange yellow blue All of my files have unique names and end with *.txt extension and these are in the same directory. I want to write a script that will rename the files by reading my list. So apple.txt should be renamed as orange.txt. I have searched around but I couldn't find a quick way to do this.I can change one file at a time with 'rename' or using perl "perl -p -i -e ’s///g’ *.txt", and few files with sed, but I don't know how I can use my list as input and write a shell script to make the changes for all files in a directory. I don't want to write hundreds of rename command for all files in a shell script. Any suggestions will be most welcome!

    Read the article

  • Accepted date format changed overnight

    - by Eugene Niemand
    Since yesterday I started encountering errors related to date formats in SQL Server 2008. Up until yesterday the following used to work. EXEC MyStoredProc '2010-03-15 00:00:00.000' Since yesterday I started getting out of range errors. After investigating I discovered the date as above is now being interpreted as "the 3rd of the 15th month" which will cause a out of range error. I have been able to fix this using the following format with the "T". EXEC MyStoredProc '2010-03-15T00:00:00.000' By using this format its working fine. Basically all I'm trying to find out is if there is some Hotfix or patch that could have caused this, as all my queries using the first mentioned formats have been working for months. Also this is not a setting that was changed by someone in the company as this is occurring on all SQL 2005/2008 servers

    Read the article

  • Top causes of slow ssh logins

    - by Peter Lyons
    I'd love for one of you smart and helpful folks to post a list of common causes of delays during an ssh login. Specifically, there are 2 spots where I see a range from instantaneous to multi-second delays. Between issuing the ssh command and getting a login prompt and between entering the passphrase and having the shell load Now, specifically I'm looking at ssh details only here. Obviously network latency, speed of the hardware and OSes involved, complex login scripts, etc can cause delays. For context I ssh to a vast multitude of linux distributions and some Solaris hosts using mostly Ubuntu, CentOS, and MacOS X as my client systems. Almost all of the time, the ssh server configuration is unchanged from the OS's default settings. What ssh server configurations should I be interested in? Are there OS/kernel parameters that can be tuned? Login shell tricks? Etc?

    Read the article

  • Assign the results of a stored procedure into a variable in another stored procedure

    - by RHPT
    The title of this question is a bit misleading, but I couldn't summarize this very well. I have two stored procedures. The first stored procedure (s_proc1) calls a second stored procedure (s_proc2). I want to assign the value returned from s_proc2 to a variable in s_proc1. Currently, I'm calling s_proc2 (inside s_proc1) in this manner: EXEC s_proc2 @SiteID, @count = @PagingCount OUTPUT s_proc2 contains a dynamic query statement (for reasons I will not outline here). CREATE dbo.s_proc2 ( @siteID int, @count int OUTPUT ) AS DECLARE @sSQL nvarchar(100) DECLARE @xCount int SELECT @sSQL = 'SELECT COUNT(ID) FROM Authors' EXEC sp_ExecuteSQL @sSQL, N'@xCount int output', @xCount output SET @count = @xCount RETURN @count Will this result in @PagingCount having the value of @count? I ask because the result I am getting from s_proc1 is wonky. In fact, what I do get is two results. The first being @count, then the result of s_proc1 (which is incorrect). So, it makes me wonder if @PagingCount isn't being set properly. Thank you.

    Read the article

  • How to use a value from one stored procedure in another?

    - by RoguePlanetoid
    I have the following statement in a Stored Procedure: DECLARE @Count INT EXEC @Count = GetItemCount 123 SELECT @Count Which calls another stored procedure with the following statement inside: SELECT COUNT(Item) FROM tblItem WHERE ID = @ID However when I test the call the EXEC outputs the value correctly but it is not assigned to the @Count Variable correctly. I've seen examples or stored procedures used like this, including here but none had a parameter and a return value used (that I could find). The ID Parameter is passed into the second statement which returns a count value used by the first StoredProcedure - all the info I have read seems to indicate this should work - but it doesn't the @Count value is aways zero, even when the GetItemCount returns always the correct value. This is in Microsoft SQL Server 2008 if that helps.

    Read the article

  • Can I batch based on a Property (not just Items)?

    - by Josh Buedel
    I have a property group, like so: <PropertyGroup> <Platform>Win32;x64</Platform> </PropertyGroup> And I want to batch in an Exec task, like so: <Exec Command='devenv MySolution.sln /Build "Release|%(Platform)"' /> But of course, as written I get an error: error MSB4095: The item metadata %(Platform) is being referenced without an item name. Specify the item name by using %(itemname.Platform). Can I batch tasks on properties that are lists? I suppose I could hack it by creating a placeholder ItemGroup with metadata and batch on that.

    Read the article

  • How to open the command prompt and insert commands using Java?

    - by 404 Not Found
    There have been a few other questions on here sort of like this, but none seem to have any answers. Is it possible to open the command prompt (and I guess any other terminal for other systems), and execute commands in the newly opened window? Currently what I have is this: Runtime rt = Runtime.getRuntime(); rt.exec(new String[]{"cmd.exe","/c","start"}); I've tried adding the next command after the "start", I've tried running another rt.exec containing my command, but I can't find a way to make it work. If it matters, I'm trying to run a command similar to this: java -flag -flag -cp terminal-based-program.jar

    Read the article

  • Screen tail -f window closes immediately

    - by t.heintz
    I have this in my ~/.screenrc file: startup_message off screen -t top 0 top screen -t log 2 tail -f /path/to/application/log/* screen -t action 1 #caption always "%?%F%{.R.}%?%3n %t%? [%h]%?" hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" When I start screen, it opens all three windows, but as soon as I try to switch to window 2, it closes immediately. I would assume there is a problem with the shell and it exits instantly, but I can't find anything wrong with it. I have tried using quotation marks around the path and the entire command, which only leads to "file not found" errors. The command works just fine when I enter it directly into a shell. The screen version is: Screen version 4.00.02 (FAU) 5-Dec-03 Help?

    Read the article

  • What is the smallest amount of bits you can write twin-prime calculation?

    - by HH
    A succinct example in Python, its source. Explanation about the syntactic sugar here. s=p=1;exec"if s%p*s%~-~p:print`p`+','+`p+2`\ns*=p*p;p+=2\n"*999 The smallest amount of bits is defined by the smallest amount of 4pcs of things you can see with hexdump, it is not that precise measure but well-enough until an ambiguity. $ echo 's=p=1;exec"if s%p*s%~-~p:print`p`+','+`p+2`\ns*=p*p;p+=2\n"*999' > .test $ hexdump .test | wc 5 36 200 $ hexdump .test 0000000 3d73 3d70 3b31 7865 6365 6922 2066 2573 0000010 2a70 2573 2d7e 707e 703a 6972 746e 7060 0000020 2b60 2b2c 7060 322b 5c60 736e 3d2a 2a70 0000030 3b70 2b70 323d 6e5c 2a22 3939 0a39 000003e so in this case it is 31 because the initial parts are removed.

    Read the article

  • How can I get the comment of the current authorized_keys ssh key ?

    - by krosenvold
    Edit: What I really need to know WHICH ssh key from authorized_keys has been used to identify the currently logged on user. According to "man sshd": Protocol 2 public key consist of options, keytype, base64-encoded key, comment. I see that when I use ssh-keygen, the comment is usually the local identity of the user. Is there any way to access this value when I'm on the remote computer ? (Kind of like the SSH_CLIENT shell variable) (Assuming I enforce the comment to be a remote identity of some sort, I would like to log this from a shell-script! This is on ubuntu)

    Read the article

  • how can i disable safe mode for php on web server?

    - by user1767434
    I am using wkhtmltopdf for making a pdf of a page. My code executes the shell to run a command using this wkhtmltopdf library. Everything works fine in my wamp server but when the code runs on my web-server it does not work and gives the following error: Warning: shell_exec() has been disabled for security reasons in /home/pssptech/public_html/.../cert.php on line 272 I think that the php is running on safe mode on the server that's why the shell execution is disabled. But the main problem is I am unable to find the php.ini file on my remote web-server. Can you tell me where can I find the config file so that I can disable the safe mode? Thanks in advance.

    Read the article

< Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >