Search Results

Search found 682 results on 28 pages for 'semi'.

Page 3/28 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • What algorithm can I use to determine points within a semi-circle?

    - by khayman218
    I have a list of two-dimensional points and I want to obtain which of them fall within a semi-circle. Originally, the target shape was a rectangle aligned with the x and y axis. So the current algorithm sorts the pairs by their X coord and binary searches to the first one that could fall within the rectangle. Then it iterates over each point sequentially. It stops when it hits one that is beyond both the X and Y upper-bound of the target rectangle. This does not work for a semi-circle as you cannot determine an effective upper/lower x and y bounds for it. The semi-circle can have any orientation. Worst case, I will find the least value of a dimension (say x) in the semi-circle, binary search to the first point which is beyond it and then sequentially test the points until I get beyond the upper bound of that dimension. Basically testing an entire band's worth of points on the grid. The problem being this will end up checking many points which are not within the bounds.

    Read the article

  • How to solve/hack fading semi-transparent PNG bug in IE8?

    - by Soul_Master
    As you know, IE6 has bug that can't display semi-transparent PNG file without using non-standard style like filter. In IE7, this problem is fixed. But It still has some bug about PNG file. It can't correctly display fading semi-transparent PNG file. You can clearly see it when you use show/hide function in jQuery with semi-transparent PNG file. The background of image is displayed with non-transparent black color. Do you have any idea for solve this question by using jQuery. Update Let's see my testing As you see, IE8 always incorrectly displays PNG-24 image. Moreover, IE8 still correctly display PNG-8 image when I fade(jQuery.fadeOut function) it only. But It incorrectly display PNG-8 image when I fade & resize(jQuery.hide function) at the same time. PS. You can download my testing source code from here. Thanks,

    Read the article

  • What's the best/most efficent way to create a semi-intelligent AI for a tic tac toe game?

    - by Link
    basically I am attempting to make a a efficient/smallish C game of Tic-Tac-Toe. I have implemented everything other then the AI for the computer so far. my squares are basically structs in an array with an assigned value based on the square. For example s[1].value = 1; therefore it's a x, and then a value of 3 would be a o. My question is whats the best way to create a semi-decent game playing AI for my tic-tac-toe game? I don't really want to use minimax, since It's not what I need. So how do I avoid a a lot of if statments and make it more efficient. Here is the rest of my code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> struct state{ // defined int state; // 0 is tie, 1 is user loss, 2 is user win, 3 is ongoing game int moves; }; struct square{ // one square of the board int value; // 1 is x, 3 is o char sign; // no space used }; struct square s[9]; //set up the struct struct state gamestate = {0,0}; //nothing void setUpGame(){ // setup the game int i = 0; for(i = 0; i < 9; i++){ s[i].value = 0; s[i].sign = ' '; } gamestate.moves=0; printf("\nHi user! You're \"x\"! I'm \"o\"! Good Luck :)\n"); } void displayBoard(){// displays the game board printf("\n %c | %c | %c\n", s[6].sign, s[7].sign, s[8].sign); printf("-----------\n"); printf(" %c | %c | %c\n", s[3].sign, s[4].sign, s[5].sign); printf("-----------\n"); printf(" %c | %c | %c\n\n", s[0].sign, s[1].sign, s[2].sign); } void getHumanMove(){ // get move from human int i; while(1){ printf(">>:"); char line[255]; // input the move to play fgets(line, sizeof(line), stdin); while(sscanf(line, "%d", &i) != 1) { //1 match of defined specifier on input line printf("Sorry, that's not a valid move!\n"); fgets(line, sizeof(line), stdin); } if(s[i-1].value != 0){printf("Sorry, That moves already been taken!\n\n");continue;} break; } s[i-1].value = 1; s[i-1].sign = 'x'; gamestate.moves++; } int sum(int x, int y, int z){return(x*y*z);} void getCompMove(){ // get the move from the computer } void checkWinner(){ // check the winner int i; for(i = 6; i < 9; i++){ // check cols if((sum(s[i].value,s[i-3].value,s[i-6].value)) == 8){printf("The Winner is o!\n");gamestate.state=1;} if((sum(s[i].value,s[i-3].value,s[i-6].value)) == 1){printf("The Winner is x!\n");gamestate.state=2;} } for(i = 0; i < 7; i+=3){ // check rows if((sum(s[i].value,s[i+1].value,s[i+2].value)) == 8){printf("The Winner is o!\n");gamestate.state=1;} if((sum(s[i].value,s[i+1].value,s[i+2].value)) == 1){printf("The Winner is x!\n");gamestate.state=2;} } if((sum(s[0].value,s[4].value,s[8].value)) == 8){printf("The Winner is o!\n");gamestate.state=1;} if((sum(s[0].value,s[4].value,s[8].value)) == 1){printf("The Winner is x!\n");gamestate.state=2;} if((sum(s[2].value,s[4].value,s[6].value)) == 8){printf("The Winner is o!\n");gamestate.state=1;} if((sum(s[2].value,s[4].value,s[6].value)) == 1){printf("The Winner is x!\n");gamestate.state=2;} } void playGame(){ // start playing the game gamestate.state = 3; //set-up the gamestate srand(time(NULL)); int temp = (rand()%2) + 1; if(temp == 2){ // if two comp goes first temp = (rand()%2) + 1; if(temp == 2){ s[4].value = 2; s[4].sign = 'o'; gamestate.moves++; }else{ s[2].value = 2; s[2].sign = 'o'; gamestate.moves++; } } displayBoard(); while(gamestate.state == 3){ if(gamestate.moves<10); getHumanMove(); if(gamestate.moves<10); getCompMove(); checkWinner(); if(gamestate.state == 3 && gamestate.moves==9){ printf("The game is a tie :p\n"); break; } displayBoard(); } } int main(int argc, const char *argv[]){ printf("Welcome to Tic Tac Toe\nby The Elite Noob\nEnter 1-9 To play a move, standard numpad\n1 is bottom-left, 9 is top-right\n"); while(1){ // while game is being played printf("\nPress 1 to play a new game, or any other number to exit;\n>>:"); char line[255]; // input whether or not to play the game fgets(line, sizeof(line), stdin); int choice; // user's choice about playing or not while(sscanf(line, "%d", &choice) != 1) { //1 match of defined specifier on input line printf("Sorry, that's not a valid option!\n"); fgets(line, sizeof(line), stdin); } if(choice == 1){ setUpGame(); // set's up the game playGame(); // Play a Game }else {break;} // exit the application } printf("\nThank's For playing!\nHave a good Day!\n"); return 0; }

    Read the article

  • Can Ubuntu create a semi-transparent subtitle player for accessibility?

    - by Tyler
    I've asked this in Reddit.com/r/Ubuntu in here. I've tried to get the Subtitle Player linked here to work and it have failed on Wine. So I'm curious if Ubuntu community would be willing to try and build a simple transparent subtitle player for better accessibility on Flash Player, Netflix, or even in movie theaters? Currently, I'm watching movies/videos with an Android Tablet that runs on a blank black video for 3 hours with a subtitle overlay on it so I can enjoy movie and so forth, but it requires a bit of effort and it definitely isn't for everyone. (People will have to look at the subtitle playing tablet and the movie back and forth at 60 degrees angle, while a transparent subtitle player would reduce it to 5 degrees angle to watch the movie.) Please and thank you.

    Read the article

  • With a little effort you can &ldquo;SEMI&rdquo;-protect your C# assemblies with obfuscation.

    - by mbcrump
    This method will not protect your assemblies from a experienced hacker. Everyday we see new keygens, cracks, serials being released that contain ways around copy protection from small companies. This is a simple process that will make a lot of hackers quit because so many others use nothing. If you were a thief would you pick the house that has security signs and an alarm or one that has nothing? To so begin: Obfuscation is the concealment of meaning in communication, making it confusing and harder to interpret. Lets begin by looking at the cartoon below:     You are probably familiar with the term and probably ignored this like most programmers ignore user security. Today, I’m going to show you reflection and a way to obfuscate it. Please understand that I am aware of ways around this, but I believe some security is better than no security.  In this sample program below, the code appears exactly as it does in Visual Studio. When the program runs, you get either a true or false in a console window. Sample Program. using System; using System.Diagnostics; using System.Linq;   namespace ObfuscateMe {     class Program     {                static void Main(string[] args)         {               Console.WriteLine(IsProcessOpen("notepad")); //Returns a True or False depending if you have notepad running.             Console.ReadLine();         }             public static bool IsProcessOpen(string name)         {             return Process.GetProcesses().Any(clsProcess => clsProcess.ProcessName.Contains(name));         }     } }   Pretend, that this is a commercial application. The hacker will only have the executable and maybe a few config files, etc. After reviewing the executable, he can determine if it was produced in .NET by examing the file in ILDASM or Redgate’s Reflector. We are going to examine the file using RedGate’s Reflector. Upon launch, we simply drag/drop the exe over to the application. We have the following for the Main method:   and for the IsProcessOpen method:     Without any other knowledge as to how this works, the hacker could export the exe and get vs project build or copy this code in and our application would run. Using Reflector output. using System; using System.Diagnostics; using System.Linq;   namespace ObfuscateMe {     class Program     {                static void Main(string[] args)         {               Console.WriteLine(IsProcessOpen("notepad"));             Console.ReadLine();         }             public static bool IsProcessOpen(string name)         {             return Process.GetProcesses().Any<Process>(delegate(Process clsProcess)             {                 return clsProcess.ProcessName.Contains(name);             });         }       } } The code is not identical, but returns the same value. At this point, with a little bit of effort you could prevent the hacker from reverse engineering your code so quickly by using Eazfuscator.NET. Eazfuscator.NET is just one of many programs built for this. Visual Studio ships with a community version of Dotfoscutor. So download and load Eazfuscator.NET and drag/drop your exectuable/project into the window. It will work for a few minutes depending if you have a quad-core or not. After it finishes, open the executable in RedGate Reflector and you will get the following: Main After Obfuscation IsProcessOpen Method after obfuscation: As you can see with the jumbled characters, it is not as easy as the first example. I am aware of methods around this, but it takes more effort and unless the hacker is up for the challenge, they will just pick another program. This is also helpful if you are a consultant and make clients pay a yearly license fee. This would prevent the average software developer from jumping into your security routine after you have left. I hope this article helped someone. If you have any feedback, please leave it in the comments below.

    Read the article

  • How can I render a semi transparent model with OpenGL correctly?

    - by phobitor
    I'm using OpenGL ES 2 and I want to render a simple model with some level of transparency. I'm just starting out with shaders, and I wrote a simple diffuse shader for the model without any issues but I don't know how to add transparency to it. I tried to set my fragment shader's output (gl_FragColor) to a non opaque alpha value but the results weren't too great. It sort of works, but it looks like certain model triangles are only rendered based on the camera position... It's really hard to describe what's wrong so please watch this short video I recorded: http://www.youtube.com/watch?v=s0JqA0rZabE I thought this was a depth testing issue so I tried playing around with enabling/disabling depth testing and back face culling. Enabling back face culling changes the output slightly but the problem in the video is still there. Enabling/disabling depth testing doesn't seem to do anything. Could anyone explain what I'm seeing and how I can add some simple transparency to my model with the shader? I'm not looking for advanced order independent transparency implementations. edit: Vertex Shader: // color varying for fragment shader varying mediump vec3 LightIntensity; varying highp vec3 VertexInModelSpace; void main() { // vec4 LightPosition = vec4(0.0, 0.0, 0.0, 1.0); vec3 LightColor = vec3(1.0, 1.0, 1.0); vec3 DiffuseColor = vec3(1.0, 0.25, 0.0); // find the vector from the given vertex to the light source vec4 vertexInWorldSpace = gl_ModelViewMatrix * vec4(gl_Vertex); vec3 normalInWorldSpace = normalize(gl_NormalMatrix * gl_Normal); vec3 lightDirn = normalize(vec3(LightPosition-vertexInWorldSpace)); // save vertexInWorldSpace VertexInModelSpace = vec3(gl_Vertex); // calculate light intensity LightIntensity = LightColor * DiffuseColor * max(dot(lightDirn,normalInWorldSpace),0.0); // calculate projected vertex position gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } Fragment Shader: // varying to define color varying vec3 LightIntensity; varying vec3 VertexInModelSpace; void main() { gl_FragColor = vec4(LightIntensity,0.5); }

    Read the article

  • How to edit semi-plaintext file and maintaining character structure?

    - by Raul
    I am using a software (Groupmail from Infacta) that uses exact / absolute %PATHS% for saving some settings in specific semi-plaintext file. This is a really bad idea because you can't move to USER folder, or like my case it does not work after migrating to a new computer with different language. For example: C:\Documents and Settings\USER\Local Settings\Application Data\Infacta is different than C:\Documents and Settings\USER\Configuración local\Datos de programa\Infacta Obviously, the software does not work well. I tried to solve this using Find/Replace the new PATH with Notepad++. While the Groupmail software loads well and shows settings correctly, the software fails when trying to save data on that file. I guess this is because length or number of replaced characters is different and also it corrupt the file. Please could you help me to edit this file maintaining file integrity / structure?

    Read the article

  • Documenting software-updates semi-automatically in MacOS X by parsing log files?

    - by Martin
    I'd like to document changes I made to my computer (running MacOS 10.6.8) to be able to identify the sources of eventual problems. Mostly I install updates when a software notifies me about a newer version and offers me a dialog to download and install the update. Currently I'm documenting those updates "by hand" by noting in a text file, when I have e. g. installed a Flash-Player update or updated another 3rd party software ... I wonder if I could achieve that easier and semi-automatically by parsing system logfiles for certain texts like "install" and that way directly get the relevant information: what has been installed (Software and version) when has been installed where has it been installed/what has changed Is there a way to extract such information by a script from the existing logfiles?

    Read the article

  • How to make msbuild ItemGroup items be separated with a space rather than semi-colon?

    - by mark
    Dear ladies and sirs. Observe the following piece of an msbuild script: <ItemGroup> <R Include="-Microsoft.Design#CA1000" /> <R Include="-Microsoft.Design#CA1002" /> </ItemGroup> I want to convert it to /ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002 Now, the best I came up with is @(R -> '/ruleid:%(Identity)'), but this only yields /ruleid:-Microsoft.Design#CA1000;/ruleid:-Microsoft.Design#CA1002 Note the semi-colon separating the two rules, instead of a space. This is bad, it is not recognized by the fxcop - I need a space there. Now, this is a simple example, so I could just declare something like this: <PropertyGroup> <R>/ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002</R </PropertyGroup> But, I do not like this, because in reality I have many rules I wish to disable and listing all of them like this is something I wish to avoid.

    Read the article

  • How can I keep SSH's know_hosts up to date (semi-securely)?

    - by Chas. Owens
    Just to get this out in front so I am not told not to do this: The machines in question are all on a local network with little to no internet access (they aren't even well connected to the corporate network) Everyone who has the ability to setup a man-in-the-middle attack already has root on the machine The machines are reinstalled as part of QA procedures, so having new host keys is important (we need to see how the other machines react); I am only trying to make my machine nicer to use. I do a lot of reinstalls on machines which changes their host keys. This necessitates going into ~/.ssh/known_hosts on my machine and blowing away to old key and adding the new key. This is a massive pain in the tuckus, so I have started considering ways to automate this. I don't want to just blindly accept any host key, so patching OpenSSH to ignore host keys is out. I have considered creating a wrapper around the ssh command the will detect the error coming back from ssh and present me with a prompt to delete the old key or quit. I have also considered creating a daemon that would fetch the latest host key from a machine on a whitelist (there are about twenty machines that are being constantly reinstalled) and replace the old host key in known_hosts. How would you automate this process?

    Read the article

  • How should I set up protection for the database against sql injection when all the php scripts are flawed?

    - by Tchalvak
    I've inherited a php web app that is very insecure, with a history of sql injection. I can't fix the scripts immediately, I rather need them to be running to have the website running, and there are too many php scripts to deal with from the php end first. I do, however, have full control over the server and the software on the server, including full control over the mysql database and it's users. Let's estimate it at something like 300 scripts overall, 40 semi-private scripts, and 20 private/secure scripts. So my question is how best to go about securing the data, with the implicit assumption that sql injection from the php side (e.g. somewhere in that list of 300 scripts) is inevitable? My first-draft plan is to create multiple tiers of different permissioned users in the mysql database. In this way I can secure the data & scripts in most need of securing first ("private/secure" category), then the second tier of database tables & scripts ("semi-private"), and finally deal with the security of the rest of the php app overall (with the result of finally securing the database tables that essentially deal with "public" information, e.g. stuff that even just viewing the homepage requires). So, 3 database users (public, semi-private, and secure), with a different user connecting for each of three different groups of scripts (the secure scripts, the semi-private scripts, and the public scripts). In this way, I can prevent all access to "secure" from "public" or from "semi-private", and to "semi-private" from "public". Are there other alternatives that I should look into? If a tiered access system is the way to go, what approaches are best?

    Read the article

  • How to draw semi-transparent text on a graphics object?

    - by awe
    I want to draw a text with 32 bit transparency on a graphics object. When I try, I only get black color in the result. If I try to draw a line with the same semitransparent color, it works perfectly. I have this code: lBitmap As New Bitmap(32, 32, PixelFormat.Format32bppArgb) lGraphic As Graphics = Graphics.FromImage(lBitmap) lGraphic.SmoothingMode = SmoothingMode.HighQuality lGraphic.InterpolationMode = InterpolationMode.HighQualityBicubic lGraphic.Clear(Color.Transparent) Dim lTestTransparencyColor As Color = Color.FromArgb(100, 140, 0, 230) lGraphic.DrawLine(New Pen(lTestTransparencyColor), 0, 0, 32, 32) lBrush As New SolidBrush(lTestTransparencyColor) lGraphic.DrawString("A", New Font("Arial", 12), lBrush, 0, 0) Dim lImage As Image = lBitmap lImage.Save("D:\Test.png", Imaging.ImageFormat.Png) The line is drawn with the transparency applied correctly, but the text is black with no transparency. I was thinking it may be that SolidBrush does not support transparency, but I found a predefined brush named Transparent (Brushes.Transparent) that was a SolidBrush when I looked at it in debug. I tried to use Brushes.Transparent as the brush when drawing the text, and it was successfully not showing at all. That means I get full transparency to work, but not partial transparency.

    Read the article

  • SQL - How can I apply a "semi-unique" constraint?

    - by Erin Drummond
    Hi, I have a (simplified) table consisting of three columns: id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, foreignID INT NOT NULL, name VARCHAR NOT NULL Basically, I would like to add a constraint (at the database level rather than at the application level) where it only possible for one unique 'name' to exist per foreignID. For example, given the data (id, foreignid, name): 1,1,Name1 2,1,Name2 3,1,Name3 4,2,Name1 5,2,Name2 I want the constraint to fail if the user tries to insert another 'Name3' under foreignId 1, but succeed if the user tries to insert 'Name3' under foreignId 2. For this reason I cannot simply make the whole column UNIQUE. I am having difficulty coming up with a SQL expression to achieve this, can anybody help me? Thanks

    Read the article

  • How do I add values to semi-complex JSON object?

    - by Nick Verheijen
    I'm fairly new to using JSON objects and I'm kinda stuck. I've got an JSON object that was converted from this array: Array ( [status] => success [id] => 1 [name] => Zone 1 [description] => Awesome zone deze.. [tiles] => Array ( // Column for the tile grid [0] => Array ( // Row for the tile grid [0] => Array ( [tileID] => 1 [rotation] => 0 ) [1] => Array ( [tileID] => 1 [rotation] => 0 ) // Etc.. ) [1] => Array // etc.. etc.. ) ) I use this object to render out an isometric grid for my HTML5 Canvas game. I'm building a map editor and to put more tiles on the map, i'll have to add values to this json object. This is how I would do it in PHP: mapData[column][row] = array( 'tileID' => 1, 'rotation' => 0 ); So my question is, how do I achieve this with a JSON object in javascript? Thanks in advance! Nick Update I've ran into an error: can't convert undefined to object mapDataTiles[mouseY][mouseX] = { tileID: editorSelectedTile, rotation: 0 }; This is the code i use for clicking & then saving the new tile to the JSON object. At first I though that one of my parameters was 'undefined', so i logged those to the console but they came out perfectly.. // If there is already a tile placed on these coordinates if( mapDataTiles[mouseX] && mapDataTiles[mouseX][mouseY] ) { mapDataTiles[mouseX][mouseY]['tileID'] = editorSelectedTile; } // If there is no tile placed on these coordinates else { mapDataTiles[mouseX][mouseY] = { tileID: editorSelectedTile, rotation: 0 }; } My variables have the following values: MouseX: 5 MouseY: 17 tileID: 2 Also weird fact, that for some coordinates it does actually work and save new data to the array. mapDataTiles[mouseY][mouseX] = { tileID: editorSelectedTile, rotation: 0 };

    Read the article

  • Is there a semi-standard way to associate a URL with an IRC user?

    - by DRMacIver
    I'm in the process of doing some identity consolidation, so I'm providing URLs to me at various locations on the internet. I'm quite active on IRC, so this naturally lead me to wonder whether there was a way to provide a link to my IRC presence. This lead to me finding http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt which appears to be a draft of an RFC for associating URLs with IRC, which suggests that I would be irc://irc.freenode.net/DRMacIver,isnick Which seems a little on the lame side. Further, this RFC draft has very thoroughly expired (February 28 1997). On the other hand it seems to be implemented in chatzilla at least: http://www.mozilla.org/projects/rt-messaging/chatzilla/irc-urls.html So does anyone know if there's a superseding RFC and/or any other de facto standard for this?

    Read the article

  • Git rebase and semi-tracked per-developer config files.

    - by dougkiwi
    This is my first SO question and I'm new-ish to Git as well. Background: I am supposed to be the version control guru for Git in my group of about 8 developers. As I don't have a lot of Git experience, this is exciting. I decided we need a shared repository that would be the authoritative master for the production code and the main meeting-point for the development code. As we work for a corporation, we really do need to show an authoritive source for the production code at least. I have instructed the developers to pull-rebase when pulling from the shared repository, then push the commits that they want to share. We have been running into problems with a particular type of file. One of these files, which I currently assume is typical of the problem, is called web.config. We want a version-controlled master web.config for devs to clone, but each dev may make minor edits to this file that they wish to locally save but not share. The problem is this: how do I tell git not to consider local changes or commits to this file to be relevent for rebasing and pushing? Gitignore does not seem to solve the problem, but maybe that's because I put web.config into .gitignore too late? In some simple situations we have stacked local changes, rebased, pushed, and popped the stack, but that doesn't seem to work all of the time. I haven't picked up the pattern quite yet. The published documentation on pull --rebase tends to deal with simplier situations. Or do I have the wrong idea entirely? Are we misusing Git? Dougkiwi

    Read the article

  • I'm getting the following error ''expected an indented block'' Where is the failing code?

    - by user1833814
    import math def area(base, height): '''(number,number) -> number Return the area of a wirh given base and height. >>>area(10,40) 200.0 ''' return base * height / 2 def perimeter(side1, side2, side3): '''(number,number,number) -> number Return the perimeter of the triangle with sides of length side1,side2 and side3. >>>perimeter(3,4,5) 12 >>>perimeter(10.5,6,9.3) 25.8 ''' return (side1 + side2 + side3) def semiperimeter(side1, side2, side3): return perimeter(side1, side2, side3) / 2 def area_hero(side1, side2, side3): semi = semiperimeter(side1, side2, side3) area = math.sqrt((semi * (semi - side1) * (semi - side2) * (semi - side3)) return area

    Read the article

  • what other bash variables are available during execution such as $USER that can assist on my script?

    - by semi-newbie
    This is related to question 19245, in that one of the responders answered the question in an awesome way, and very VERY clear to any newbie. Now here is a question that i can't seem to figure. i wrote a script for starting the vmware firefox plugin (don't worry. i gave that up and now run vBox VERY happily. i left vmware for my servers :) ) I needed to start the plugin as sudo, but i also needed to pass an argument (password) to it, that happen to be the same. So, if my password was Hello123, the command would be: sudo ./myscript.sh hi other Hello123 running from command line, the script would ask for my sudo password and then run. i wanted to capture THAT password and pass it as well. i also wanted to run graphically, so i tried gksudo, and there is an option -p that returns the password for variable assignment. well, that was a nightmare, because i would still get prompted for the original sudo: see below Find UserName vUser=$USER Find password (and hopefully enable sudo) vP=gksudo -p -D somedescriptiontext echo Execute command gksudo ./myscript.sh hi $vUser $vP and i still get prompted twice. so my question is tri-fold: is there a variable i can use for the password, just like there is one for user, $USER? is there a different way i should be assigning the value resulting of the command i have in $vP? i am wondering if executing the way i have it, does it in an uninitiated session and not the current one, since i am getting some addtl warning type errors on some variables blah blah i tried using Zenity to just capture the text, but then of course, i couldn't pass that value to sudo, so i could only use as a parameter, which puts me back in 2 prompts. Thanksssssssssss!

    Read the article

  • Hadoop, NOSQL, and the Relational Model

    - by Phil Factor
    (Guest Editorial for the IT Pro/SysAdmin Newsletter)Whereas Relational Databases fit the world of commerce like a glove, it is useless to pretend that they are a perfect fit for all human endeavours. Although, with SQL Server, we’ve made great strides with indexing text, in processing spatial data and processing markup, there is still a problem in dealing efficiently with large volumes of ephemeral semi-structured data. Key-value stores such as Cassandra, Project Voldemort, and Riak are of great value for ephemeral data, and seem of equal value as a data-feed that provides aggregations to an RDBMS. However, the Document databases such as MongoDB and CouchDB are ideal for semi-structured data for which no fixed schema exists; analytics and logging are obvious examples. NoSQL products, such as MongoDB, tackle the semi-structured data problem with panache. MongoDB is designed with a simple document-oriented data model that scales horizontally across multiple servers. It doesn’t impose a schema, and relies on the application to enforce the data structure. This is another take on the old ‘EAV’ problem (where you don’t know in advance all the attributes of a particular entity) It uses a clever replica set design that allows automatic failover, and uses journaling for data durability. It allows indexing and ad-hoc querying. However, for SQL Server users, the obvious choice for handling semi-structured data is Apache Hadoop. There will soon be an ODBC Driver for Apache Hive .and an Add-in for Excel. Additionally, there are now two Hadoop-based connectors for SQL Server; the Apache Hadoop connector for SQL Server 2008 R2, and the SQL Server Parallel Data Warehouse (PDW) connector. We can connect to Hadoop process the semi-structured data and then store it in SQL Server. For one steeped in the culture of Relational SQL Databases, I might be expected to throw up my hands in the air in a gesture of contempt for a technology that was, judging by the overblown journalism on the subject, about to make my own profession as archaic as the Saggar makers bottom knocker (a potter’s assistant who helped the saggar maker to make the bottom of the saggar by placing clay in a metal hoop and bashing it). However, on the contrary, I find that I'm delighted with the advances made by the NoSQL databases in the past few years. Having the flow of ideas from the NoSQL providers will knock any trace of complacency out of the providers of Relational Databases and inspire them into back-fitting some features, such as horizontal scaling, with sharding and automatic failover into SQL-based RDBMSs. It will do the breed a power of good to benefit from all this lateral thinking.

    Read the article

  • Why does my computer crash when I minimise the last window?

    - by TRiG
    I am runnung Ubuntu 12.04 LTS. If I have a few windows open (say four to six, not a large amount), and minimise all by pressing Ctrl+Super+D, they all minimise immediately with no problems. However, if I minimise them one at a time, by clicking the minimise button with my mouse, the last one often hangs. Usually it will appear as a ghost on the screen for a while, semi-minimised (in other words, shrunk toward the Unity launcher bar, half-size or smaller, and semi-transparent). Usually it will eventually clear; sometimes the computer just freezes and I have to restart it. It doesn’t seem to matter what the window actually is. Just now, I had to restart my computer with Skype* semi-minimised. I’ve seen it freeze before with the Terminal semi-minimised (and the Terminal wasn’t even doing anything at the time). The only pattern is that it’s always the last window minimised which freezes, and that minimising all windows together using the keyboard shortcut works fine. What on earth is going on, and how can I stop it? * I hate Skype, but I need it for work.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >