Monthly Archives

Articles indexed in January 2011

Page 11/604 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Using VMware Guest OS to enable Host OS to ssh to remote network

    - by Reuben L.
    Basically I have an issue because my host OS is 64-bit Linux Mint (Ubuntu derived) and it doesn't seem to be compatible with the Juniper Network Connect that is used by the network at my workplace. Thus, I am unable to ssh from terminal to the network. I can't make changes to the workplace network either so that leaves me with looking for solutions on my end. The main reason for me to access the network from home is to check on my running processes or to issue more commands to a few workstations. Putty is the desperate choice I usually make but it means I have to reboot to Windows and also have limited control. I've tried several other methods and they have all failed. Recently, I setup a VM with Windows 7 as the guest OS. Now half my problems are fixed as I don't have to physically reboot the system - I just have to engage Juniper Network Connect on the VM. However, I would still like to use my Linux terminal to ssh to the network. It sounds plausible that I could somehow manipulate ports to connect to the remote network from the host OS tunneled through the guest OS, but I really have no clue how to do so... Can anyone help?

    Read the article

  • How do I directly add/pin web page to Google Chrome jump list?

    - by irrational John
    Sometimes I want to (easily) add the link for a web page I'm viewing with Google Chrome to Chome's Windows 7 jump list. Is there a way to do this? I have tried dragging the bookmark/star to the left of the URL in the address bar onto Chrome's jump list, but this doesn't seem to "take". The only way I have found that works is rather kludgey. If I close the tab for the page I want to add then it shows up in the jump list under "Recently Closed". I can then pin the link to the jump list. It would be nice to have a way to add a web page to the jump list without first having to close it.

    Read the article

  • How to access photos from my Genius G-Shot P7545 camera?

    - by Florin
    I have a Genius G-Shot P7545 camera. In Windows I had just to plug in the camera to the usb and acces it like a usb stick. I tried to do that in Ubuntu 10.10 with no result. How can I acces the photots? With these comands I get: lsusb Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 015: ID 0784:1692 Vivitar, Inc. Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub sudo fdisk -l Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xcf5acf5a Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20478976 83 Linux /dev/sda3 2550 19458 135810048 f W95 Ext'd (LBA) /dev/sda5 2550 19458 135809024 83 Linux Unable to read /dev/sdb

    Read the article

  • How can I do individual file encryption on Dropbox?

    - by Scaine
    I'd like to set a single directory inside Dropbox in which files are encrypted on a file-by-file basis. At the moment, I use a 2Mb Truecrypt container inside my Dropbox which I then have to mount manually, access/change the files within, then unmount manually. At that point, the entire 2Mb uploads to Dropbox. This is a pain for a number of reasons : Dropbox sync will only occur when the Truecrypt container is unmounted, because Dropbox only syncs files that aren't locked and mounting a container locks it. A single byte change to one file inside that container results in the whole 2Mb being uploaded again. It doesn't scale - I was originally using a 10Mb container, but obviously the bigger the container, the longer it takes to sync when it's unmounted. I was wondering if I can somehow use LUKS to implement file-by-file encryption to get round the "container" issues.

    Read the article

  • Bring a subview to the top on mouseDown: AND keep receiving events (for dragging)

    - by d11wtq
    Ok, basically I have a view with a series of slightly overlapping subviews. When a subview is clicked, it moves to the top (among other things), by a really simple two-liner: -(void)mouseDown:(NSEvent *)theEvent { if (_selected) { // Don't do anything this subview is already in the foreground return; } NSView *superview = [self superview]; [self removeFromSuperview]; [superview addSubview:self position:NSWindowAbove relativeTo:nil]; } This works fine and seems to be the "normal" way to do this. The problem is that I'm now introducing some drag logic to the view, so I need to respond to -mouseDragged:. Unfortunately, since the view is removed from the view hierarchy and re-added in the process, I can have the view come to the foreground and be dragged in the same mouse action. It only drags if I leave go of the mouse and click on the view again, since the second click doesn't do any view hierarchy juggling. Is there anything I can do that will allow the view to move to the foreground like this, AND continue to receive the subsequent -mouseDragged: and -mouseUp: events that follow? I started along the lines of thinking of overriding -hitTest: in the superview and intercepting the mouseDown event in order to bring the view to the foreground before it actually receives the event. The problem here is, from within -hitTest:, how do I distinguish what type of event I'm actually performing the hit test for? I wouldn't want to move the subview to the foreground for other mouse events, such as mouseMoved etc.

    Read the article

  • Validating a single radio button is not working in available javascript validation script

    - by OM The Eternity
    Hi All, I have randomly generated radio button series like <input type="radio" name="creatorusers" value="1"> <input type="radio" name="creatorusers" value="1"> <input type="radio" name="creatorusers" value="1"> <input type="radio" name="creatorusers" value="1"> .....so on But I get only ONE radio button and execute the javascript validation given for it to chk whether the radio button is selected or not, then it doesnt work Ples help me out in resolving this. mycreator = -1; for (i=frm.creatorusers.length-1; i > -1; i--) { if (frm.creatorusers[i].checked) { mycreator = i; i = -1; } } if (mycreator == -1) { alert("You must select a Creator User!"); return false; }

    Read the article

  • Read next word in java

    - by ArtWorkAD
    Hi, I have a text file that has following content: ac und accipio annehmen ad zu adeo hinzugehen ... I read the text file and iterate through the lines: Scanner sc = new Scanner(new File("translate.txt")); while(sc.hasNext()){ String line = sc.nextLine(); } Each line has two words. Is there any method in java to get the next word or do I have to split the line string to get the words?

    Read the article

  • java for loop not working

    - by Steve
    I hope this isn't a stupid question but I have looked up every example I can find and it still seems like I have this code right and it still isn't working... I enter one number and it moves on to the next line of code instead of looping. I'm using this to fill an array with user input numbers. I appreciate any help, thanks. for(i=0; i<9; i++); { System.out.println ("Please enter a number:"); Num[i] = keyboard.nextDouble(); Sum += Num[i]; Product *= Num[i]; }

    Read the article

  • SQL Server (TSQL) - Is it possible to EXEC statements in parallel?

    - by Investor5555
    SQL Server 2008 R2 Here is a simplified example: EXECUTE sp_executesql N'PRINT ''1st '' + convert(varchar, getdate(), 126) WAITFOR DELAY ''000:00:10''' EXECUTE sp_executesql N'PRINT ''2nd '' + convert(varchar, getdate(), 126)' The first statement will print the date and delay 10 seconds before proceeding. The second statement should print immediately. The way T-SQL works, the 2nd statement won't be evaluated until the first completes. If I copy and paste it to a new query window, it will execute immediately. The issue is that I have other, more complex things going on, with variables that need to be passed to both procedures. What I am trying to do is: Get a record Lock it for a period of time while it is locked, execute some other statements against this record and the table itself Perhaps there is a way to dynamically create a couple of jobs? Anyway, I am looking for a simple way to do this without having to manually PRINT statements and copy/paste to another session. Is there a way to EXEC without wait / in parallel?

    Read the article

  • which of these modes : cbc,cfb,ctr,ecb,ncfb,nofb,ofb,stream are secure and which are absolute no-no

    - by user393087
    By security I mean that encoded string is indistinguishable from random noise and is different on every encryption of the same text so it is impossible to make a guess on encryption algorithm used or do any dictionary attack on the encoded text. Second: output string length does not correspond to the input string length in easy way, so it is not possible of make guessing on that account. Third: it is possible to verify that the provided password is incorrect so the decoding function could return false instead of supposedly decoded random string.

    Read the article

  • 2-Way databinding with Entity Framework and WPF DataGrid , is Possible ?

    - by Panindra
    i am working on POS application using SQL CE , WPF , Entity framework 3.5sp2 and iam trying to use data grid as my Order Entry Control for User to enter Products Order . Iam plannning to bind this to enitiy frmae work model , abd looking for 2 way updating ? private void button1_Click(object sender, RoutedEventArgs e) { using (MasterEntities nwEntities = new MasterEntities()) { var users = from d in nwEntities.Companies select new { d.CompanyId, d.CompanyName, d.Place }; listBox1.DataContext = users; dataGrid1.DataContext = users; // foreach (String c in customers) // { // MessageBox.Show(c.ToString()); // } } } When try to double clikc on the datagrid it through s a error with Caption " Invalid Operation Execption was unhandled " and Message " A TwoWay or OneWayToSource binding cannot work on the read-only property 'CompanyId' of type '<f__AnonymousType0`3[System.Int32,System.String,System.String]'. whats wrong here and my xaml coding goes like this <Grid> <ListBox Name="listBox1" ItemsSource="{Binding}" /> <Button Content="Show " Name="button1" Click="button1_Click" /> <DataGrid AutoGenerateColumns="False" Name="dataGrid1" ItemsSource="{Binding}" > <DataGrid.Columns> <DataGridTextColumn Header=" ID" Binding="{Binding CompanyId}"/> <DataGridTextColumn Header="Company Name" Binding="{Binding CompanyName}"/> <DataGridTextColumn Header="Place" Binding="{Binding Place}" /> </DataGrid.Columns> </DataGrid> </Grid> EDITED : i made the changes shown by @vorrtex, But, then i added another button to save the chages and in button click event i added follwing code , butit showing Updating error private void button2_Click(object sender, RoutedEventArgs e) { nwEntities.SaveChanges(); }

    Read the article

  • Codeigniter achor producing dodgy link in email inbox.. what could the problem be?

    - by Psychonetics
    My application is emailing out fine but the email I receive displays incorrectly. Rather than have text and a simple "click here to activate" link it doesn't. it shows this instead: Hi user1, please click the following link to activate your account <a href="http://mysite.com/activation/fzyZuyxVAzZS2koVg5UFjfVjlcLNcrzp">ssss</a> Here is the code from my model that sends email to user when they request activation email. $this->load->library('email'); $this->email->from('[email protected]', 'my site'); $this->email->to($result[0]->email); $this->email->subject('my site - Activate your account'); $this->email->message('Hi ' . $result[0]->first_name . ', please click the following link to activate your account ' . anchor('http://mysite.com/activation/' . $new_activation_code, 'click here to activate')); $this->email->send(); Also the mail always ends up in my spam folder.

    Read the article

  • $_SERVER['HTTP_HOST'] not setted

    - by yes123
    Hi guys, I am getting lot of traffic to my php pages but without the variable $_SERVER['HTTP_HOST'] setted. This traffic is like 1 hit per second. I don't know what it could be, but for reducing server load i am doing this at the top of every php pages: if (!isset($_SERVER['HTTP_HOST'])) exit; Do u know what could cause this? Is it safe to exit whenever http_host is not setted? Can a normal user visit my pages without setting http_host? PHP version: 5.2.0-8, Apache: 2.2.3 Thanks

    Read the article

  • Silverlight 4 Treeview MVVM WCF

    - by Coppermine
    I'm having an issue with the treeview control from the silverlight 4 toolkit. I can't get it to view to display my data correctly, the toplevel items are shown but the childnodes are nowhere to be seen. More info: I have a wcf service that delivers a list of Categories with nested subcategories to my viewmodel (I made sure to explicitly include my subcategory data). My viewmodel has an observable list property (wich is named Categories) with this data from my WCF service. My ViewModel: _http://pastebin.com/0TpMW3mR My XAML: http://pastebin.com/QCwVeyYu

    Read the article

  • Game Objects Talking To Each Other

    - by PhilCK
    What is a good way of dealing with objects and having them talk to each other? Up until now all my games hobby/student have been small so this problem was generally solved in a rather ugly way, which lead to tight integration and circular dependencies. Which was fine for the size of projects I was doing. However my projects have been getting bigger in size and complexity and now I want to start re-using code, and making my head a simpler place. The main problem I have is generally along the lines of Player needs to know about the Map and so does the Enemy, this has usually descended into setting lots of pointers and having lots of dependencies, and this becomes a mess quickly. I have thought along the lines of a message style system. but I cant really see how this reduces the dependencies, as I would still be sending the pointers everywhere. Thanks. PS: I guess this has been discussed before, but I don't know what its called just the need I have.

    Read the article

  • Problem with optional arguments in C #defines

    - by imikedaman
    Hi, I'm having a problem with optional arguments in #define statements in C, or more specifically with gcc 4.2: bool func1(bool tmp) { return false; } void func2(bool tmp, bool tmp2) {} #define CALL(func, tmp, ...) func(tmp, ##__VA_ARGS__) int main() { // this compiles CALL(func2, CALL(func1, false), false); // this fails with: Implicit declaration of function 'CALL' CALL(func2, false, CALL(func1, false)); } That's obviously a contrived example, but does show the problem. Does anyone know how I can get the optional arguments to "resolve" correctly? Additional information: If I remove the ## before _VA_ARGS_, and do something like this: bool func2(bool tmp, bool tmp2) { return false; } #define CALL(func, tmp, ...) func(tmp, __VA_ARGS__) int main() { CALL(func2, false, CALL(func2, false, false)); } That compiles, but it no longer works with zero arguments since it would resolve to func(tmp, )

    Read the article

  • Python: saving and loading a class definition

    - by Peterstone
    Hi! I am interested in saving and load objects using the pickle module as you can read in a question I asked before: Python: Errors saving and loading objects with pickle module Someone commment: 1, In an other way: the error is raise because pickle wanted to load an instance of the class Fruits and search for the class definition where it was defined, but it didn't find it so it raise the error Now I want to save and load a class definition in order to solve the problem I describe in the question mentioned before. Thank you so much!

    Read the article

  • How to exit a process run with Ruby if it takes more than 5 seconds?

    - by Alex
    I'm implementing a checking system in Ruby. It runs executables with different tests. If the solution is not correct, it can take forever for it to finish with certain hard tests. That's why I want to limit the execution time to 5 seconds. I'm using system() function to run executables: system("./solution"); .NET has a great WaitForExit() method, what about Ruby?. Is there a way to limit external process' execution time to 5 seconds? Thanks

    Read the article

  • Error while converting function from oracle to SQL Server

    - by sss
    Hi, I am migrating a function from Oracle to SQL Server 2008. This function raises SELECT statements included within a function cannot return data to a client as error. How can I solve this problem? Original PLSQL Code CREATE OR REPLACE function f_birim_cevrim_katsayi (p_ID_MAMUL in number, p_ID_BIRIMDEN in number, p_ID_BIRIME in number) return number is v_katsayi number; begin v_katsayi:=0; if p_ID_BIRIMDEN!=p_ID_BIRIME then for c in ( select * from CR_BIRIM_CEVRIM where ID_MAMUL = p_ID_MAMUL and ( (ID_BIRIM = p_ID_BIRIMDEN and ID_BIRIM2 = p_ID_BIRIME) OR ( ID_BIRIM2 = p_ID_BIRIMDEN and ID_BIRIM = p_ID_BIRIME) ) and VALID = 1) loop if c.ID_BIRIM=p_ID_BIRIMDEN then v_katsayi:=c.MT_ORAN; else v_katsayi:=1/c.MT_ORAN; end if; end loop; else v_katsayi:=1; end if; return round(v_katsayi,10); exception when others then return 0; end; T-SQL code: If Exists ( SELECT name FROM sysobjects WHERE name = 'f_birim_cevrim_katsayi' AND type = 'FN') DROP FUNCTION f_birim_cevrim_katsayi GO CREATE FUNCTION f_birim_cevrim_katsayi ( @p_ID_MAMUL FLOAT , @p_ID_BIRIMDEN FLOAT , @p_ID_BIRIME FLOAT ) RETURNS float AS BEGIN DECLARE @adv_error INT DECLARE @v_katsayi FLOAT SELECT @v_katsayi = 0 IF @p_ID_BIRIMDEN != @p_ID_BIRIME BEGIN DECLARE cursor_for_inline_select1 CURSOR LOCAL FOR SELECT * FROM CR_BIRIM_CEVRIM WHERE ID_MAMUL = @p_ID_MAMUL AND ((ID_BIRIM = @p_ID_BIRIMDEN AND ID_BIRIM2 = @p_ID_BIRIME) OR (ID_BIRIM2 = @p_ID_BIRIMDEN AND ID_BIRIM = @p_ID_BIRIME)) AND VALID = 1 OPEN cursor_for_inline_select1 FETCH NEXT FROM cursor_for_inline_select1 WHILE (@@FETCH_STATUS <> -1) BEGIN IF c.ID_BIRIM = @p_ID_BIRIMDEN BEGIN SELECT @v_katsayi = c.MT_ORAN END ELSE BEGIN SELECT @v_katsayi = 1/c.MT_ORAN END END CLOSE cursor_for_inline_select1 DEALLOCATE cursor_for_inline_select1 END ELSE BEGIN SELECT @v_katsayi = 1 END DEALLOCATE cursor_for_inline_select1 return ROUND(@v_katsayi, 10) GOTO ExitLabel1 Exception1: BEGIN DEALLOCATE cursor_for_inline_select1 return 0 END ExitLabel1: return ROUND(@v_katsayi, 10) END GO

    Read the article

  • how can I do, how can I do [closed]

    - by fatai
    Possible Duplicate: arbitrary vire connection / search and replace -input :["vire_connection",[1, 2, [ 3, [ 4, "connect"]]], ["connect", [3 , 5] ] ] - output:["vire_connection",[ 1, 2, [ 3, [ 4, [ 3, 5 ] ] ] ] ], [ [ 3 , 5] ] ] - after connection ( simply copying [3,5] to other wanted position ) , remove connect word - input :["vire_connection", [ [ [ ["connect", [ 3, 4 ] ] ] ] ], [ 2, "connect"]] - output :["vire_connection",[[[[[3,4]]]]], [ 2, [ 3 , 4 ]]] - after connection ( simply copying [3,4] to other wanted position ) , remove connect word - how can I do ? -

    Read the article

  • Blackberry: Simulator stuck up launching through JDE 5.x

    - by user187532
    Hi, When i try to build my project in Blackberry JDE 5.0.0.25. It built successfully. And then when i click on Debug menu "Go" button, simulator is launching and stuck up lanching itself forever, does't come up the simulator screen normally and visible with apps showing. When i built the same project in Blackberry JDE 4.7, it built successfully and then click on "Go", launched the simulator normally and showed the app to play with it. Could someone guide me what should be problem? Do i need to set any settings specific to BB JDE 5.x? I have just the basic hello world empty screen in my project, so don't provide any code here. Thanks.

    Read the article

  • Python: Errors saving and loading objects with pickle module

    - by Peterstone
    Hi, I am trying to load and save objects with this piece of code I get it from a question I asked a week ago: Python: saving and loading objects and using pickle. The piece of code is this: class Fruits: pass banana = Fruits() banana.color = 'yellow' banana.value = 30 import pickle filehandler = open("Fruits.obj","wb") pickle.dump(banana,filehandler) filehandler.close() file = open("Fruits.obj",'rb') object_file = pickle.load(file) file.close() print(object_file.color, object_file.value, sep=', ') At a first glance the piece of code works well, getting load and see the 'color' and 'value' of the saved object. But, what I pursuit is to close a session, open a new one and load what I save in a past session. I close the session after putting the line filehandler.close() and I open a new one and I put the rest of your code, then after putting object_file = pickle.load(file) I get this error: Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> object_file = pickle.load(file) File "C:\Python31\lib\pickle.py", line 1365, in load encoding=encoding, errors=errors).load() AttributeError: 'module' object has no attribute 'Fruits' Can anyone explain me what this error message means and telling me how to solve this problem? Thank so much and happy new year!!

    Read the article

  • Script or Batch File to Automate Logon from Welcome Screen

    - by Guy Thomas
    Is there a script or batch file to automate the log-on process from the XP Welcome screen? As all details are the same Username, Password, and Domain in a room of 30 machines. The reason I don't use Windows AutoAdminLogon is I only want to logon temporary at different times as a user to run such things as online test for a class of high school students without the students logging on individually first, also it would be useful for admin tasks if I can change/specify the user details.

    Read the article

  • Change filtering method used by Firefox when zooming

    - by peak
    I often zoom in a step or two when reading long texts in Firefox, but when I do so the images become super blurry. It's not really a big deal but when reading text on images (mathematical equations mostly), it's a bit distracting. It seems as if they are scaled using only bilinear interpolation. If I scale an image the same amount in for example Paint.NET or Photoshop the result is much better. Is there any way to change the filtering method used by Firefox to bicubic or another better method? I am Using Firefox 3.5 on Windows BTW.

    Read the article

  • Collision Detection for 2D

    - by Bhaskar
    I am working on a simple game, where I need to do a collision detection of two Texture2D. The code I have written is: bool perPixelCollission = false; Texture2D texture1 = sprite1.Texture; Texture2D texture2 = sprite1.Texture; Vector2 position1 = new Vector2(sprite1.CurrentScope.X, sprite1.CurrentScope.Y); Vector2 position2 = new Vector2(sprite2.CurrentScope.X, sprite2.CurrentScope.Y); uint[] bitsA = new uint[texture1.Width * texture1.Height]; uint[] bitsB = new uint[texture2.Width * texture2.Height]; Rectangle texture1Rectangle = new Rectangle(Convert.ToInt32(position1.X), Convert.ToInt32(position1.Y), texture1.Width, texture1.Height); Rectangle texture2Rectangle = new Rectangle(Convert.ToInt32(position2.X), Convert.ToInt32(position2.Y), texture2.Width, texture2.Height); texture1.GetData<uint>(bitsA); texture2.GetData<uint>(bitsB); int x1 = Math.Max(texture1Rectangle.X, texture2Rectangle.X); int x2 = Math.Min(texture1Rectangle.X + texture1Rectangle.Width, texture2Rectangle.X + texture2Rectangle.Width); int y1 = Math.Max(texture1Rectangle.Y, texture2Rectangle.Y); int y2 = Math.Min(texture1Rectangle.Y + texture1Rectangle.Height, texture2Rectangle.Y + texture2Rectangle.Height); for (int y = y1; y < y2; ++y) { for (int x = x1; x < x2; ++x) { if (((bitsA[(x - texture1Rectangle.X) + (y - texture1Rectangle.Y) * texture1Rectangle.Width] & 0xFF000000) >> 24) > 20 && ((bitsB[(x - texture2Rectangle.X) + (y - texture2Rectangle.Y) * texture2Rectangle.Width] & 0xFF000000) >> 24) > 20) { perPixelCollission = true; break; } } // Reduce amount of looping by breaking out of this. if (perPixelCollission) { break; } } return perPixelCollission; But this code is really making the game slow. Where can I get some very good collision detection tutorial and code? What is wrong in this code?

    Read the article

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