Daily Archives

Articles indexed Saturday March 13 2010

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

  • Isolated storage misunderstand

    - by Costa
    Hi this is a discussion between me and me to understand isolated storage issue. can you help me to convince me about isolated storage!! This is a code written in windows form app (reader) that read the isolated storage of another win form app (writer) which is signed. where is the security if the reader can read the writer's file, I thought only signed code can access the file! If all .Net applications born equal and have all permissions to access Isolated storage, where is the security then? If I can install and run Exe from isolated storage, why I don't install a virus and run it, I am trusted to access this area. but the virus or what ever will not be trusted to access the rest of file system, it only can access the memory, and this is dangerous enough. I cannot see any difference between using app data folder to save the state and using isolated storage except a long nasty path!! I want to try give low trust to Reader code and retest, but they said "Isolated storage is actually created for giving low trusted application the right to save its state". Reader code: private void button1_Click(object sender, EventArgs e) { String path = @"C:\Documents and Settings\All Users\Application Data\IsolatedStorage\efv5cmbz.ewt\2ehuny0c.qvv\StrongName.5v3airc2lkv0onfrhsm2h3uiio35oarw\AssemFiles\toto12\ABC.txt"; StreamReader reader = new StreamReader(path); var test = reader.ReadLine(); reader.Close(); } Writer: private void button1_Click(object sender, EventArgs e) { IsolatedStorageFile isolatedFile = IsolatedStorageFile.GetMachineStoreForAssembly(); isolatedFile.CreateDirectory("toto12"); IsolatedStorageFileStream isolatedStorage = new IsolatedStorageFileStream(@"toto12\ABC.txt", System.IO.FileMode.Create, isolatedFile); StreamWriter writer = new StreamWriter(isolatedStorage); writer.WriteLine("Ana 2akol we ashrab kai a3eesh wa akbora"); writer.Close(); writer.Dispose(); }

    Read the article

  • How to display a two column ListView in Android?

    - by Josemalive
    Hi, I have an android application that shows a grid view that shows: 1 2 3 4 GridView gridview=(GridView)findViewById(R.id.GridView_test); DataBaseHelper dbhelper=new DataBaseHelper(this); ArrayList<String> test=new ArrayList<String>(5); backlinksadapter.add("1"); backlinksadapter.add("2"); backlinksadapter.add("3"); backlinksadapter.add("4"); ArrayAdapter mAdapter=new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, test); gridview.setAdapter(mAdapter); By the moment is working, but i would like to show foreach line of the grid, 2 columns with the values of a 2 dimensional array (something like the GridView in ASP.Net - as datasource -). I would like to show: 1 | Person 1 2 | Person 2 3 | Person 3 4 | Person 4 Any idea?

    Read the article

  • Reference from UITableViewCell to UITableView to UINavigationController

    - by Nick
    If the user taps and holds on a Foo table view cell for 2 seconds, a modal view should be shown. The modal view is also displayed when a new Foo is added to the cell. The modal view's delegate protocol is implemented by the parent UITableView subclass. My tap and hold detection code is in the Foo UITableViewCell class. I'm having difficulty referencing the parent tableview's navigation controller to display the modal view. FooModalViewController *modalController = [[FooModalViewController alloc] initWithNibName:@"FooModalViewController" bundle:nil]; FooTableViewController *tableView = (FooTableViewController *) self.superview; foo.delegate = tableView; Seems OK but I'm having problems referencing the navigation controller that contains the tableview.. The code below builds OK but throws an exception - NSOBject DoesNotRecognizeSelector. UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:modalController]; [[tableView.navigationController] presentModalViewController:navigationController animated:YES]; I think that perhaps my design is flawed..?

    Read the article

  • cmake and visual studio

    - by robUK
    Hello, gcc 4.4.2 / Visual Studio C++ 2008 I have been using cmake on linux, without any problems. Now I have ported by application to run on windows. I generated the solution files using cmake -G "Visual Studio 9 2008 ../src" However, I know that cmake only creates a Makefile that is used by the compiler to build your application. I open my solution in Visual Studio, I press the F7 key to compile. I am wondering does it actually use the Makefile that was generated by cmake? Or it is just compiling the application like any normal visual studio program? Many thanks for any advice,

    Read the article

  • Design Web Templates

    - by Pradeep
    Hi, I am a PHP, VB.NET programmer and i like to build websites. I am good at coding but have never done website designing. Please suggest me some good study resource on Photoshop and flash website design. I have recently made few templates on photoshop but don't know how to code them for valid HTML-CSS. Please let me know which is the best method to design website template e.g. Photoshop, DreamWeaver etc. Also provide links to good study and practice resource for the same. Thanks in advance.

    Read the article

  • how to run progress-bar through insert query ?

    - by Gold
    hi i have this insert query: try { Cmd.CommandText = @"INSERT INTO BarcodTbl SELECT * FROM [Text;DATABASE=" + PathI + @"\].[Tmp.txt];"; Cmd.ExecuteNonQuery(); Cmd.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message); } and i have two question: how to run progress-bar from the begging to the end of the insert ? if there any error i got the error exception and the action is stop - the query stop and the BarcodTbl is empty. how i can see the error and that the query will continue to fill the table ? thank's in advance

    Read the article

  • Oracle TNS names not showing when adding new connection to sqldeveloper

    - by Americus
    Hello, I'm trying to connect to an oracle database with sqldeveloper. I've installed the .Net oracle drivers and placed the tnsnames.ora file at C:\Oracle\product\11.1.0\client_1\Network\Admin. I'm using the following format in tnsnames.ora. dev = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.XXX.XXX)(PORT = XXXX)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = idpdev2) ) ) In sqldeveloper, when I try to create a new connection, no tns names show up as options. Is there something I'm missing?

    Read the article

  • Tool that automatically keeps old versions of a file? Shadow Copy in Win7?

    - by Michael Stum
    When I'm working with a Graphics App, I press CTRL+S a lot to Quicksave. Sometimes, I just went too far and made a bad decision, sometimes to the point Undo wouldn't help either. I would love to retain old versions of a file. Normally, Source Control would be of use here, but that's a manual process (same as just making some copies). I wonder if there is an automatic way to do that? Everytime the file changes, keep a backup. I believe that in Windows Server, Shadow Copies can do that. When I check in my Windows 7 (Ultimate), I do see "Previous Versions" as a tab, but that seems to be part of the backup function which is once again manual. Is there a way to get that type of automatic versioning?

    Read the article

  • Why is it taking longer to log into windows7?

    - by acidzombie24
    I installed windows 7 and it was file for weeks. Recently i created a 2nd user account, installed important updates, installed 1 game and AFAIK that is it. What did it? All three of theses doesnt seem they would cause logging in to take longer (maybe important updates did it?). It takes 90+ seconds to get a fully loaded desktop when it use to take ~30 second. Looking at msconfig and starup i see vmware, dtools, launchy and live messenger (msn). I know i had three of these and maybe all 4 during the last install how can i find out what made loggin in slow? -edit- i also installed visual studios rc1 team instead of beta2 and msvs 2008. But i hardly doubt msvs rc1 did it.

    Read the article

  • MySQL Rating system (calculating average from two tables).

    - by MussuR
    I have two tables, videos and videos_ratings. The videos table has an int videoid field (and many others but those fields are not important I think) and many records. The videos_ratings table has 3 int fields: videoid, rating, rated_by which has many records (multiple records for each fields from the videos table) but not for all records from the videos table. Currently I have the following mysql query: SELECT `videos`.*, avg(`videos_ratings`.`vote`) FROM `videos`, `videos_ratings` WHERE `videos_ratings`.`videoid` = `videos`.`videoid` GROUP BY `videos_ratings`.`videoid` ORDER BY RAND() LIMIT 0, 12 It selects all the records from table videos that have a rating in table video_ratings and calculates the average correctly. But what I need is to select all records from the videos table, no matter if there is a rating for that record or not. And if there aren't any records in the videos_ratings table for that particular videos record, the average function should show 0. Hope someone could understand what I want... :) Thanks!

    Read the article

  • What are your favorite extension methods for C#/.NET? (codeplex.com/extensionoverflow)

    - by bovium
    Let's make a list of answers where you post your excellent and favorite extension methods. The requirement is that the full code must be posted and a example and an explanation on how to use it. Based on the high interest in this topic I have setup an Open Source Project called extensionoverflow on Codeplex. Please mark your answers with an acceptance to put the code in the Codeplex project. Please post the full sourcecode and not a link. Codeplex News: 11.11.2008 XmlSerialize / XmlDeserialize is now Implemented and Unit Tested. 11.11.2008 There is still room for more developers. ;-) Join NOW! 11.11.2008 Third contributer joined ExtensionOverflow, welcome to BKristensen 11.11.2008 FormatWith is now Implemented and Unit Tested. 09.11.2008 Second contributer joined ExtensionOverflow. welcome to chakrit. 09.11.2008 We need more developers. ;-) 09.11.2008 ThrowIfArgumentIsNull in now Implemented and Unit Tested on Codeplex.

    Read the article

  • Unable to start phpmyadmin ?

    - by Madhup
    hi, I did installed xampp on my macbook a day before. It worked perfectly yesterday. But today when I try to start the phpmyadmin it gives the following error: Can't create/write to file '/var/folders/Uu/UuhwtR9xE3Ozsao8ttdIWU+++TI/-Tmp-/#sql1b5_8_0.MYI' (Errcode: 13) Can anybody tell the solution for this problem. Thanks, Madhup

    Read the article

  • How do I get the IVsTextView of a specific OutputWindowPane?

    - by Jeremy Bell
    I have a visual studio integration package that tracks output from the debug window. I can get the IVsTextView of the output window, like so: IVsTextView view = GetService(typeof(SVsOutputWindow)) as IVsTextView; // grab text from the view and process it However, if a different panel other than the "Debug" panel is currently active, then this IVsTextView will have text from that panel, and not the "Debug" panel. Is it possible to get an IVsTextView for a specific output window panel, without calling OutputWindowPanel.Activate() prior to getting the IVsTextView of the output window?

    Read the article

  • Is the method addSubview of NSView inherently slow? (Cocoa OSX)

    - by Michael Minerva
    I am trying to speed my gui that loads very slow slow when I am loading a large project (the gui is a representation of groups and sub groups and is made up of many views). During this process I was looking at how long certain code segments take to execute and I have found that a call to addsubview is taking between 10 and 20 milliseconds most of the time. The subview I was looking at is a disclosure button. I am wondering if this method is just inherently slow or is their some other factor at work here? Is the time it takes to add the subview dependent on the complexity of the subview or is that not a factor? Also, is there some other method that can be used to add a subview that might be faster?

    Read the article

  • how to update database table in sqlite3 iphone

    - by Ajeet Kumar Yadav
    Hi I am new in Iphone i am developing application that is use database but i am face problem. In My application I am using table view. I am fetch the value from database in the table view this is done after that we also insert value throw text field in that table of database and display that value in table view.I am also use another table in database table name is Alootikki the value of table alootikki is display in other table view in application and user want to add this table alootikki value in first table of database and display that value in table view when we do this value is display only in the table view this is not write in the database table. when value is display and user want to add other data throw text field then only that add value is show first value is remove from table view. I am not able to solve this plz help me. The code is given bellow for database -(void)Data1 { //////databaseName = @"dataa.sqlite"; databaseName = @"Recipe1.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0]; databasePath =[documentsDir stringByAppendingPathComponent:databaseName]; [self checkAndCreateDatabase]; list1 = [[NSMutableArray alloc] init]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { if(addStmt == nil) { ////////////const char *sql = "insert into Dataa(item) Values(?)"; const char *sql = " insert into Slist(Incredients ) Values(?)"; if(sqlite3_prepare_v2(database, sql, -1, &addStmt, NULL) != SQLITE_OK) NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database)); } sqlite3_bind_text(addStmt, 1, [i UTF8String], -1, SQLITE_TRANSIENT); //sqlite3_bind_int(addStmt,1,i); // sqlite3_bind_text(addStmt, 1, [coffeeName UTF8String], -1, SQLITE_TRANSIENT); // sqlite3_bind_double(addStmt, 2, [price doubleValue]); if(SQLITE_DONE != sqlite3_step(addStmt)) NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database)); else //SQLite provides a method to get the last primary key inserted by using sqlite3_last_insert_rowid coffeeID = sqlite3_last_insert_rowid(database); //Reset the add statement. sqlite3_reset(addStmt); // sqlite3_clear_bindings(detailStmt); //} } sqlite3_finalize(addStmt); addStmt = nil; sqlite3_close(database); } -(void)sopinglist { databaseName= @"Recipe1.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0]; databasePath =[documentsDir stringByAppendingPathComponent:databaseName]; [self checkAndCreateDatabase]; list1 = [[NSMutableArray alloc] init]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { if(addStmt == nil) { ///////////const char *sql = "insert into Dataa(item) Values(?)"; const char *sql = " insert into Slist(Incredients,Recipename,foodtype ) Values(?,?,?)"; ///////////// const char *sql =" Update Slist ( Incredients, Recipename,foodtype) Values(?,?,?)"; if(sqlite3_prepare_v2(database, sql, -1, &addStmt, NULL) != SQLITE_OK) NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database)); } /////for( NSString * j in k) sqlite3_bind_text(addStmt, 1, [k UTF8String], -1, SQLITE_TRANSIENT); //sqlite3_bind_int(addStmt,1,i); // sqlite3_bind_text(addStmt, 1, [coffeeName UTF8String], -1, SQLITE_TRANSIENT); // sqlite3_bind_double(addStmt, 2, [price doubleValue]); if(SQLITE_DONE != sqlite3_step(addStmt)) NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database)); else //SQLite provides a method to get the last primary key inserted by using sqlite3_last_insert_rowid coffeeID = sqlite3_last_insert_rowid(database); //Reset the add statement. sqlite3_reset(addStmt); // sqlite3_clear_bindings(detailStmt); //} } sqlite3_finalize(addStmt); addStmt = nil; sqlite3_close(database); } -(void)Data { ////////////////databaseName = @"dataa.sqlite"; databaseName = @"Recipe1.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0]; databasePath =[documentsDir stringByAppendingPathComponent:databaseName]; [self checkAndCreateDatabase]; list1 = [[NSMutableArray alloc] init]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { if(detailStmt == nil) { const char *sql = "Select * from Slist "; if(sqlite3_prepare_v2(database, sql, -1, &detailStmt, NULL) == SQLITE_OK) { //NSLog(@"Hiiiiiii"); //sqlite3_bind_text(detailStmt, 1, [t1 UTF8String], -1, SQLITE_TRANSIENT); //sqlite3_bind_text(detailStmt, 2, [t2 UTF8String], -2, SQLITE_TRANSIENT); //sqlite3_bind_int(detailStmt, 3, t3); while(sqlite3_step(detailStmt) == SQLITE_ROW) { NSLog(@"Helllloooooo"); //NSString *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; NSString *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; char *str=( char*)sqlite3_column_text(detailStmt, 0); if( str) { item = [ NSString stringWithUTF8String:str ]; } else { item= @""; } //+ (NSString*)stringWithCharsIfNotNull: (char*)item /// { // if ( item == NULL ) // return nil; //else // return [[NSString stringWithUTF8String: item] //stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]]; //} //NSString *fame= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 1)]; //NSString *cinemax = [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 2)]; //NSString *big= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 3)]; //pvr1 = pvr; item1=item; //NSLog(@"%@",item1); data = [[NSMutableArray alloc] init]; list *animal=[[list alloc] initWithName:item1]; // Add the animal object to the animals Array [list1 addObject:animal]; //[list1 addObject:item]; } sqlite3_reset(detailStmt); } sqlite3_finalize(detailStmt); // sqlite3_clear_bindings(detailStmt); } } detailStmt = nil; sqlite3_close(database); } (void)recpies { /////////////////////databaseName = @"Data.sqlite"; databaseName = @"Recipe1.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0]; databasePath =[documentsDir stringByAppendingPathComponent:databaseName]; [self checkAndCreateDatabase]; list1 = [[NSMutableArray alloc] init]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { if(detailStmt == nil) { //////const char *sql = "Select * from Dataa"; const char *sql ="select *from alootikki"; if(sqlite3_prepare_v2(database, sql, -1, &detailStmt, NULL) == SQLITE_OK) { //NSLog(@"Hiiiiiii"); //sqlite3_bind_text(detailStmt, 1, [t1 UTF8String], -1, SQLITE_TRANSIENT); //sqlite3_bind_text(detailStmt, 2, [t2 UTF8String], -2, SQLITE_TRANSIENT); //sqlite3_bind_int(detailStmt, 3, t3); while(sqlite3_step(detailStmt) == SQLITE_ROW) { //NSLog(@"Helllloooooo"); //NSString *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; NSString *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; char *str=( char*)sqlite3_column_text(detailStmt, 0); if( str) { item = [ NSString stringWithUTF8String:str ]; } else { item= @""; } //NSString *fame= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 1)]; //NSString *cinemax = [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 2)]; //NSString *big= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 3)]; //pvr1 = pvr; item1=item; //NSLog(@"%@",item1); data = [[NSMutableArray alloc] init]; list *animal=[[list alloc] initWithName:item1]; // Add the animal object to the animals Array [list1 addObject:animal]; //[list1 addObject:item]; } sqlite3_reset(detailStmt); } sqlite3_finalize(detailStmt); // sqlite3_clear_bindings(detailStmt); } } detailStmt = nil; sqlite3_close(database); }

    Read the article

  • Why browser vendors make their own css properties?

    - by jitendra
    Why browser vendors make their own css properties, even they know these will not pass the w3c validation? What is the purpose? is for their own testing, or for web developers, ot to demonstrate browser capabilities to the world and to the W3C organizations and to CSS development team of W3C? is it like a beta version of demonstration? if i use any browser specific for now can they remove that property's support from future versions.will i have to edit my css in future for example: https://developer.mozilla.org/en/CSS_Reference/Mozilla_Extensions

    Read the article

  • how to preserve filter values after opertion on grid.

    - by Pankaj Pareek
    Hi experts. I have some filter and one grid.And grid have some buttons like modify/edit.I am selecting some value from filters and getting some result in grid.now i want to modify some record.when i come again on grid data in filter should be remain same. There is two pages. one contain filters and grid second contain modify details. Thanks Pankaj Pareek.

    Read the article

  • OPENSSL_add_all_algorithms_noconf could not be located

    - by Fedrick
    Hi all, I am getting an error when I go to start my world. it says that " The procedure entry point OPENSSL_add_all_algorithms_noconf could not be located in the dynamic link library libeay32.dll".I have tried re loading the whole thing, just downloading the dll file, downloading a dll file form the internet but nothing fixes it. Anyone got a suggestion? Thanks in Advance

    Read the article

  • How do I override a Spring bean definition yet still reference the overriden bean?

    - by Kevin
    I'm attempting to implement a delegate Service provider by overriding the bean definition for the original service with my delegate Service. However, as the name would imply, the delegate Service needs a reference to the original service to delegate calls to. I'm having trouble figuring out how to override the bean definition while using the original bean def without running into a circular reference issue. For example: <!-- Original service def in spring-context.xml --> <bean id="service" class="com.mycompany.Service"/> <!-- Overridden definition in spring-plugin-context.xml --> <bean id="service" class="com.mycompany.DelegatedService"/> <constructor-arg ref="service"/> </bean> Is this possible?

    Read the article

  • JVMTI: FollowReferences : how to skip Soft/Weak/Phantom references?

    - by Jayan
    I am writing a small code to detect number of objects left behind after certain actions in our tool. This uses FollowReferences() JVMTI-API. This counts instances reachable by all paths. How can I skip paths that included weak/soft/phantom reference? (IterateThroughHeap counts all objects at the moment, so the number is not fully reliable) Thanks, Jayan

    Read the article

  • Using array of asp inside javascript is not working in the loop

    - by Poomjai
    I have a problem that when i bring the array of asp and use it in the javascript, When i use the counter (i++) and print for each index of array just like "<%=app[i] %" and it is not return the value back to me. Please help me i solve this problem for a day !!!-Thanks ^_^ edit <% String[] asp = {"a","b","c"}; %> <script language="javascript"> for(var i=0;i<"<%=asp %>".length;i++){ document.write("<%=asp[i] %>") } </script> the error is = Compiler Error Message: CS0103: The name 'i' does not exist in the current context

    Read the article

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