Search Results

Search found 23245 results on 930 pages for 'photoshop script'.

Page 23/930 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • The most dangerous SQL Script in the world!

    - by DrJohn
    In my last blog entry, I outlined how to automate SQL Server database builds from concatenated SQL Scripts. However, I did not mention how I ensure the database is clean before I rebuild it. Clearly a simple DROP/CREATE DATABASE command would suffice; but you may not have permission to execute such commands, especially in a corporate environment controlled by a centralised DBA team. However, you should at least have database owner permissions on the development database so you can actually do your job! Then you can employ my universal "drop all" script which will clear down your database before you run your SQL Scripts to rebuild all the database objects. Why start with a clean database? During the development process, it is all too easy to leave old objects hanging around in the database which can have unforeseen consequences. For example, when you rename a table you may forget to delete the old table and change all the related views to use the new table. Clearly this will mean an end-user querying the views will get the wrong data and your reputation will take a nose dive as a result! Starting with a clean, empty database and then building all your database objects using SQL Scripts using the technique outlined in my previous blog means you know exactly what you have in your database. The database can then be repopulated using SSIS and bingo; you have a data mart "to go". My universal "drop all" SQL Script To ensure you start with a clean database run my universal "drop all" script which you can download from here: 100_drop_all.zip By using the database catalog views, the script finds and drops all of the following database objects: Foreign key relationships Stored procedures Triggers Database triggers Views Tables Functions Partition schemes Partition functions XML Schema Collections Schemas Types Service broker services Service broker queues Service broker contracts Service broker message types SQLCLR assemblies There are two optional sections to the script: drop users and drop roles. You may use these at your peril, particularly as you may well remove your own permissions! Note that the script has a verbose mode which displays the SQL commands it is executing. This can be switched on by setting @debug=1. Running this script against one of the system databases is certainly not recommended! So I advise you to keep a USE database statement at the top of the file. Good luck and be careful!!

    Read the article

  • Script to gather all the files ending in .log and create a tar.gz file.

    - by Oscar Reyes
    I'm currently using this script line to find all the log files from a given directory structure and copy them to another directy where I can easily compress them. find . -name "*.log" -exec cp \{\} /tmp/allLogs/ \; The problem I have, is, the directory/subdirectory information gets lost because, I'm copying only the file. For instance I have: ./product/install/install.log ./product/execution/daily.log ./other/conf/blah.log And I end up with: /tmp/allLogs/install.log /tmp/allLogs/daily.log /tmp/allLogs/blah.log And I would like to have: /tmp/allLogs/product/install/install.log /tmp/allLogs/product/execution/daily.log /tmp/allLogs/other/conf/blah.log

    Read the article

  • Linux script that indicates time the server was offline?

    - by RD
    Below is data taken from my dedicated server: root@namhost [~]# last root pts/0 XXX Tue May 18 09:46 still logged in root pts/0 XXX Mon May 17 08:51 - 12:18 (03:26) reboot system boot XXX Mon May 17 08:49 (1+00:59) root pts/0 XXX Sun May 16 11:50 - 13:15 (01:25) root@namhost [~]# last | grep "system boot" reboot system boot 2.6.18-164.15.1. Mon May 17 08:49 (1+01:02) reboot system boot 2.6.18-164.el5 Tue May 11 04:20 (7+05:31) reboot system boot 2.6.18-164.el5 Tue May 11 03:53 (7+05:58) reboot system boot 2.6.18-128.el5 Mon Oct 5 22:40 (-3:-50) .... I need a script that I can run on an hourly basis that will: 1. Calculate the total downtime since the first date 2. The overall downtime percentage 3. Store this data in a file at /home/bla/file.txt, in the following format: TotalDowntime=03:02:02 Average=0.01% How do I go about doing this?

    Read the article

  • How do I create a script that checks if a computer is connected via wireless or ethernet?

    - by user4941
    I am using log-me-in Central to look after a few dozen computers. These computers are used both for home use and work use. When the computers are used for work, they should not be connected via wireless. In the best case, I'd like to be able to use LogMeIn to prevents users on shift from connecting wirelessly. Still acceptable would be to have the computer email me if it connects wirelessly. If I knew how to set up a script that checks to see if the computer connected wirelessly and I could send an email, then I would be set.

    Read the article

  • determine the archetecture of a mac from the command line or script?

    - by Brian Postow
    I'm writing a shell script, and I need to know the archetecture, ie PPC or Intel. Back in the day, there was a program /bin/arch that told you, but my mac doesn't seem to have it... Is there an easy way I can do this? Grep for something in a logfile? call some other program that spits that out as a side effect? It would be nice to know what OS Version I'm running too, but that may not be necessary. thanks

    Read the article

  • Determine the architecture of a Mac from the command line or script?

    - by Brian Postow
    I'm writing a shell script, and I need to know the archetecture, ie PPC or Intel. Back in the day, there was a program /bin/arch that told you, but my mac doesn't seem to have it... Is there an easy way I can do this? Grep for something in a logfile? call some other program that spits that out as a side effect? It would be nice to know what OS Version I'm running too, but that may not be necessary. thanks

    Read the article

  • Script/scheduled task to clean up Dowloads folder (Windows 7)?

    - by Andrew
    My downloads folder is my primary connection to the internet (and thus the world), and has rapidly become a virtual junk drawer. I imagine I'm not alone here. What I'd like to do is have some sort of a script that -creates a new folder (named YYYY_MM Archive so it sorts nicely) -takes everything* inside of the Downloads folder (for the current user) -moves it to the new folder and have this run once/month. *(excluding previous archives) This strikes me as the type of thing Saw some answers on related questions that seemed to suggest that this is an eminently doable task in PowerShell. Is it? I'm on Windows 7 Enterprise.

    Read the article

  • user input of one php script pass to another php without modification in first php script

    - by ish12
    hi all.. Consider two php scripts(o.php & t.php) o.php contains both html and php. html here gets user input for eg:user name and password this information is passed to php using php-self. I want the user input of o.php passed to t.php without any modification in o.php. I ve used include and require in the t.php but the problem is it displays the output of o.php but i need only the user input values from o.php without displaying the output of o.php. Using functions or session in o.php we can pass user input but am in the situation tat i should not add or modify o.php. thanks in advance!!

    Read the article

  • running "./script" gets syntax error after import statements, but "python script" works fine

    - by nzomkxia
    I'm doing something with the sys.argv in python here is the code: age1.py import datetime import os import sys if len(sys.argv) == 2: now_time = datetime.datetime.now() future_time = now_time + datetime.timedelta(int(sys.argv[1])) print "date in", sys.argv[1],"days",future_time elif len(sys.argv) == 4: print "three paras" spe_time = datetime.datetime(int(sys.argv[1]),int(sys.argv[2]),int(sys.argv[3])) now_time = datetime.datetime.now() diff_time = now_time - spe_time print "days since then..." , diff_time if I run the code in bash like: python age1.py xxxx, the program goes fine but if I run that like ./age1.py xxxx, the mouse will become a symbol like "+", then the program ends up with: "./age1.py: line 5: syntax error near unexpected token `sys.argv' ./age1.py: line 5: `if len(sys.argv) == 2:' system: Ubuntu 10.10 Python 2.7.3 any reason for that?

    Read the article

  • JAVA or JAVA SCRIPT OR Idoc SCRIPT alphabetical sort

    - by tito86
    Hi folks, I have a task: All items within categories should be sorted alphabetically except for Examples. Special characters and numbers should be displayed before letters. I'm facing with a problem. Most of standart sort functions and plugins are being used the ASCII table. In this table the following symboles: ~,},{ etc. have the index more than letters,for example: Actual result of sorting is: 1 - #1 A T 2 - A T 3 - {C T I need to get: 1 - #1 A T 2 - {C T 3 - A T Plese give me your piece of advice or sny examples ASAP. Best Regards.

    Read the article

  • Override properties block when including a psake script in an other psake script

    - by DanceAlot
    I am new to psake and I have this issue: I have 2 psake scripts: (1): base_tasks.ps1: properties{ $a = "hello" $b = "hi" } task One{ Write-Host $a } (2): install.ps1 Include .\base_tasks.ps1 properties{ $a = "Goodbye" $b = "Adjeu" } task default -depends One Now, is it possible to override the properties and variables from file 1? I want to use file 1 as "base tasks" and use the tasks in the install.ps1 and override the properties. Or do I have to do that an other way? I will invoke install.ps1 and use my $a and $b from install.ps1. DanceAlot

    Read the article

  • Converting a generic list into JSON string and then handling it in java script

    - by Jalpesh P. Vadgama
    We all know that JSON (JavaScript Object Notification) is very useful in case of manipulating string on client side with java script and its performance is very good over browsers so let’s create a simple example where convert a Generic List then we will convert this list into JSON string and then we will call this web service from java script and will handle in java script. To do this we need a info class(Type) and for that class we are going to create generic list. Here is code for that I have created simple class with two properties UserId and UserName public class UserInfo { public int UserId { get; set; } public string UserName { get; set; } } Now Let’s create a web service and web method will create a class and then we will convert this with in JSON string with JavaScriptSerializer class. Here is web service class. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace Experiment.WebService { /// <summary> /// Summary description for WsApplicationUser /// </summary> [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. [System.Web.Script.Services.ScriptService] public class WsApplicationUser : System.Web.Services.WebService { [WebMethod] public string GetUserList() { List<UserInfo> userList = new List<UserInfo>(); for (int i = 1; i <= 5; i++) { UserInfo userInfo = new UserInfo(); userInfo.UserId = i; userInfo.UserName = string.Format("{0}{1}", "J", i.ToString()); userList.Add(userInfo); } System.Web.Script.Serialization.JavaScriptSerializer jSearializer = new System.Web.Script.Serialization.JavaScriptSerializer(); return jSearializer.Serialize(userList); } } } Note: Here you must have this attribute here in web service class ‘[System.Web.Script.Services.ScriptService]’ as this attribute will enable web service to call from client side. Now we have created a web service class let’s create a java script function ‘GetUserList’ which will call web service from JavaScript like following function GetUserList() { Experiment.WebService.WsApplicationUser.GetUserList(ReuqestCompleteCallback, RequestFailedCallback); } After as you can see we have inserted two call back function ReuqestCompleteCallback and RequestFailedCallback which handle errors and result from web service. ReuqestCompleteCallback will handle result of web service and if and error comes then RequestFailedCallback will print the error. Following is code for both function. function ReuqestCompleteCallback(result) { result = eval(result); var divResult = document.getElementById("divUserList"); CreateUserListTable(result); } function RequestFailedCallback(error) { var stackTrace = error.get_stackTrace(); var message = error.get_message(); var statusCode = error.get_statusCode(); var exceptionType = error.get_exceptionType(); var timedout = error.get_timedOut(); // Display the error. var divResult = document.getElementById("divUserList"); divResult.innerHTML = "Stack Trace: " + stackTrace + "<br/>" + "Service Error: " + message + "<br/>" + "Status Code: " + statusCode + "<br/>" + "Exception Type: " + exceptionType + "<br/>" + "Timedout: " + timedout; } Here in above there is a function called you can see that we have use ‘eval’ function which parse string in enumerable form. Then we are calling a function call ‘CreateUserListTable’ which will create a table string and paste string in the a div. Here is code for that function. function CreateUserListTable(userList) { var tablestring = '<table ><tr><td>UsreID</td><td>UserName</td></tr>'; for (var i = 0, len = userList.length; i < len; ++i) { tablestring=tablestring + "<tr>"; tablestring=tablestring + "<td>" + userList[i].UserId + "</td>"; tablestring=tablestring + "<td>" + userList[i].UserName + "</td>"; tablestring=tablestring + "</tr>"; } tablestring = tablestring + "</table>"; var divResult = document.getElementById("divUserList"); divResult.innerHTML = tablestring; } Now let’s create div which will have all html that is generated from this function. Here is code of my web page. We also need to add a script reference to enable web service from client side. Here is all HTML code we have. <form id="form1" runat="server"> <asp:ScriptManager ID="myScirptManger" runat="Server"> <Services> <asp:ServiceReference Path="~/WebService/WsApplicationUser.asmx" /> </Services> </asp:ScriptManager> <div id="divUserList"> </div> </form> Now as we have not defined where we are going to call ‘GetUserList’ function so let’s call this function on windows onload event of javascript like following. window.onload=GetUserList(); That’s it. Now let’s run it on browser to see whether it’s work or not and here is the output in browser as expected. That’s it. This was very basic example but you can crate your own JavaScript enabled grid from this and you can see possibilities are unlimited here. Stay tuned for more.. Happy programming.. Technorati Tags: JSON,Javascript,ASP.NET,WebService

    Read the article

  • How to Identify Stuck Pixels and Remove Them from Your Digital Photos

    - by Jason Fitzpatrick
    If you’ve noticed hotspots in your digital photos, areas where a stuck pixel in the camera’s sensor has rendered very bright spots of color that don’t belong in the image, you’re not alone. It’s an incredibly common phenomenon, but that doesn’t mean you have to put up with it. Read on as we discuss what distinguishes stuck pixels from other sensor defects and problems, how to identify it, and how to fix it both in-camera and out.Click Here to Continue Reading

    Read the article

  • Best way to slice up a non rectangular image?

    - by Hoff
    I have the image below and need to create a rollover for each "piece" or arrow in the circle. Because the image isn't rectangular, it boggles how me how I'm going to do this without having badly overlapping pieces. As you can see from the image below, the slices will overlap each other (quite a bit), which will not be good for the rollover. Does anybody have any ideas as to how to accomplish this without resorting to Flash or HTML5? The majority of our site's users use dinosaur browsers that don't support HTML5. Here's the link to the image: http://img812.imageshack.us/img812/3166/wheela.png

    Read the article

  • Web app to take screen shot of website and annotate?

    - by Anagio
    Does anyone know of a website that will take a full screen shot of another website and let users write notes over it then send that annotated photo by email or private link? Basically looking for quicker way to write notes on a site other than taking a screen shot my self and putting it into photoshop. Just an update, I don't need any browser extensions which I already have and do the same. I'm looking for a website app which does this to give to a client.

    Read the article

  • How to get transparent user interface background in Windows 7

    - by blasteralfred
    I use Windows 7 Home Premium. Recently, when I came through Photoshop in OSX, I was interested by its user interface. It has got a "100% transparent" user interface background, whereas it's usually gray in Windows. I googled for some glass solutions, but all of them provide a "transparent window" or a semi-transparent one, which makes the complete window transparent. These solutions do not work for me, as I just need the UI (gray) background transparent but require all the other elements (such as nav-bars, control buttons, etc.) to have no transparency. Below is a screenshot of what I'm saying: Is this a feature of Photoshop only? How can I achieve the same in Windows 7? Thanks in advance...:)

    Read the article

  • Mac Book Pro and Photosohp working canvas lost off screen somewhere

    - by chris
    I seem to have a unique issue. I have a mac book pro which I often have connected to one or 2 additional monitors, and I think this is in part my issue. Cause when Im at home working with only the built in monitor and I go to open something new or existing in photoshop my canvas if you will call it that is no where to be found. I checked my display settings, its treating it as a one monitor solution. I've tried to in photoshop to bring all my windows to front, Ive tried to cascade and tile my windows, ive tried to reset my work area, and to no avail I can't for the life of me get the canvas to come to my screen so I can work with what ever I intend to work on. Anyone else have this problem or run into similar? How did you fix it?

    Read the article

  • Adobe Illustrator Saving to PSD: "Not enough memory to save the file"

    - by fiskfisk
    This is on CS5.5 under Windows XP Professional. There seems to be a known issue about saving (large) Adobe Illustrator files to PSD (thoroughly discussed), where the exporter will complain about "Not enough memory to save the file". This happens regardless of the available memory on the computer, and seems to be a limitation in the PSD exporter itself. The only possible solution so far seems to be to copy-n-paste each layer separately from the illustrator file and into the open Photoshop file. We need to keep the layers intact (and not merged), so selecting all the layers at the same time doesn't work. Do anyone have a workaround to the actual, original export issue, or a way to be able to get the layer information into Photoshop without handling each layer separately?

    Read the article

  • Can I turn a 2D image into something like a ribbon without 3D Tools?

    - by Michael Stum
    I have a picture that's very long and not very tall. I want to create a graphic like the one below, but with my picture as the "texture". Can Photoshop do something like that? I'd like to avoid to spin up a 3D Program because then I need to render it, get the image out of it and into Photoshop. They seem to have added 3D Functionality into CS5, I just never looked at it. Obvious question after that: What would the backside look like? Are there other applications that can do something like that in a simple way?

    Read the article

  • Windows 2008 startup script will not run?

    - by larsks
    I am trying to get a very simple batch script to run when my Windows 2008 Server (R2) system starts up. I have added the script to the "Startup Scripts" in the local group policy by running gpedit.msc, and I see the script listed under Windows Settings/Scripts (Startup/Shutdown)/Startup when I run rsop.msc, but the script is not being executed. The "Last Executed" column in rsop is empty even after a reboot, and a file that should be created by the script is never created. At the moment, the entire contents of the script are: rem Check if this script is running. date /t > c:\temp\flag The target directory (c:\temp) exists. The script is called c:\scripts\startup.bat, and works fine if I run it by hand.

    Read the article

  • Different behaviour of script locally and over ssh

    - by neorg
    I have a script on a server-A Script-A #!/bin/bash -l echo "script-A.sh" | change-environment.sh When I ssh onto server-A and execute it, it works fine. However, when I ssh user@server-A ./script-A.sh Script-A executes, but throws an undefined variable error in change-environment.sh. change-environment.sh runs in the c shell(I have no control over the script so the method I have used is about the only way I can use it), but everything else is in bash. Had found a similar question at I can run a script locally, but cannot do "ssh HOSTNAME /path/to/script.sh". However, there was no solution to the issue and it was a year old.

    Read the article

  • Find visually similar images automatically?

    - by TERACytE
    I have a collection of images which is updated regularly that I'd like to group. Rather than reviewing every single image in the collection, I'd like to run an automated tool that pre-groups the images. Adobe PhotoShop Elements has a "Find Visually Similar photos" feature which works well, but it requires manually importing the images first, then I have to select an image each time I need Photoshop to search for images that are visually similar. I do not need a de-duping program since the images are never identical. Is there anything out there that can provide what I'm looking for?

    Read the article

  • Lua and Objective C not running script.

    - by beta
    I am trying to create an objective c interface that encapsulates the functionality of storing and running a lua script (compiled or not.) My code for the script interface is as follows: #import <Cocoa/Cocoa.h> #import "Types.h" #import "lua.h" #include "lualib.h" #include "lauxlib.h" @interface Script : NSObject<NSCoding> { @public s32 size; s8* data; BOOL done; } @property s32 size; @property s8* data; @property BOOL done; - (id) initWithScript: (u8*)data andSize:(s32)size; - (id) initFromFile: (const char*)file; - (void) runWithState: (lua_State*)state; - (void) encodeWithCoder: (NSCoder*)coder; - (id) initWithCoder: (NSCoder*)coder; @end #import "Script.h" @implementation Script @synthesize size; @synthesize data; @synthesize done; - (id) initWithScript: (s8*)d andSize:(s32)s { self = [super init]; self->size = s; self->data = d; return self; } - (id) initFromFile:(const char *)file { FILE* p; p = fopen(file, "rb"); if(p == NULL) return [super init]; fseek(p, 0, SEEK_END); s32 fs = ftell(p); rewind(p); u8* buffer = (u8*)malloc(fs); fread(buffer, 1, fs, p); fclose(p); return [self initWithScript:buffer andSize:size]; } - (void) runWithState: (lua_State*)state { if(luaL_loadbuffer(state, [self data], [self size], "Script") != 0) { NSLog(@"Error loading lua chunk."); return; } lua_pcall(state, 0, LUA_MULTRET, 0); } - (void) encodeWithCoder: (NSCoder*)coder { [coder encodeInt: size forKey: @"Script.size"]; [coder encodeBytes:data length:size forKey:@"Script.data"]; } - (id) initWithCoder: (NSCoder*)coder { self = [super init]; NSUInteger actualSize; size = [coder decodeIntForKey: @"Script.size"]; data = [[coder decodeBytesForKey:@"Script.data" returnedLength:&actualSize] retain]; return self; } @end Here is the main method: #import "Script.h" int main(int argc, char* argv[]) { Script* script = [[Script alloc] initFromFile:"./test.lua"]; lua_State* state = luaL_newstate(); luaL_openlibs(state); luaL_dostring(state, "print(_VERSION)"); [script runWithState:state]; luaL_dostring(state, "print(_VERSION)"); lua_close(state); } And the lua script is just: print("O Hai World!") Loading the file is correct, but I think it messes up at pcall. Any Help is greatly appreciated. Heading

    Read the article

  • What exactly happens when Complex Script Support is enabled?

    - by Ravi Chhabra
    When we click the check box "Install files for complex script and right to left languages (including Thai)" in Regional and Language settings what exactly happens? Changes to registry keys? I noticed that it installs some .fon files and keyboard dlls. Is this totally necessary if one just wish to read complex script on Windows XP? My test inside VirutalBox as Windows 7 as the host OS seems to indicate that for reading Complex Script need not be enabled. Yet that's not what all the literature on the subject says. What's going on?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >