Search Results

Search found 148 results on 6 pages for 'dmitry mikhaylov'.

Page 5/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • C++ IDE for Linux with smart reference searching

    - by Dmitry Yudakov
    Is there an IDE supporting C++ with REALLY smart searching of references? By 'reference' I mean usage of a class (or its member), variable, function in the whole Project or Workspace. There's lots of IDE providing it. Some of them seem just to search for the text with same name giving lots of stuff, others are smarter and check the context (like class boundaries, namespace) but aren't accurate enough. The best I've tried so far was Visual SlickEdit, but still there's more to wish. class C1 { int foo; }; class C2 { int foo; }; For example in this situation when searching for C1::foo references I don't want C2::foo to be shown too. So, is there an IDE that would be so smart?

    Read the article

  • NSFetchedResultsController didn't return data

    - by Dmitry Kochkin
    Hello! I get stuck in some problem and after 2 days of seeking I've found solution but didn't get idea why does it work. First, I'm initialized NSFetchedResultsController using following code (it look like a lot of automatically generated): - (NSFetchedResultsController *)fetchedResultsController { if (fetchedResultsController != nil) return fetchedResultsController; NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Profile" inManagedObjectContext:self.managedObjectContext]; [fetchRequest setEntity:entity]; [fetchRequest setFetchBatchSize:20]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lastName" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController; NSError *error = nil; //[aFetchedResultsController performFetch:&error]; [aFetchedResultsController release]; [fetchRequest release]; [sortDescriptor release]; [sortDescriptors release]; return fetchedResultsController; } Have a look at commented string - there wasn't any of these strings and when I asked for data - I didn't get any (and it was there!). When I've uncommented that line, it starts work. Seems evident, but all examples I saw before hadn't that line. And they work. How can it be? I just want to know what am I doing wrong.

    Read the article

  • SQL Structure of DB table with different types of columns

    - by Dmitry Dvornikov
    I have a problem with the optimization of the structure of the database. I'll try to explain it exactly. I create a project, where we can add different values??, but this values must have different types of the columns in the database (eg, int, double , varchar). What is the best way to store the different types of values ??in the database. In the project I'm using Propel 1.6. The point is availability to add value with 'int', 'varchar' and other columns types, to search the table was efficient. In total, I have two ideas. The first is to create a table of "value", which will have columns: "id ", "value_int", "value_double", "value_varchar", etc - with the corresponding column types. Depending on the type of values??, records will be saved with the value in the appropriate column (the rest will be NULL). The second solution is to create separate tables such as "value_int", "value_varchar" etc. There would be columns: "id", "value", which correspond to the relevant types of "value" (ie, such as int, varchar, etc). I must admit that I do not believe any of the above solutions, originally I was thinking about one table "value", where the column would be a "text" type - but this solution would probably be even worse. I would like to know your opinion on this topic, maybe something else would be better. Thanks in advance. EDIT: For example : We have three tables: USER: [table of users] * id * name FIELD: [table of profile fields - where the column 'type' is the type of field, eg int or varchar) * id * type * name VALUE : * id * User_id - ( FK user.id ) * Field_id - ( FK field.id ) * value So we have in each row an user in USER table, and the profile is stored in the VALUE table. Bit each profile field may have a different type (column 'type' in the FIELD table), and based on that I would want this value to add to the appropriate column of the appropriate type.

    Read the article

  • iPhone app. Creating a custom UIView that contains UITextField and UIButton.

    - by Dmitry Burchik
    Hi all. I am new to iPhone programming. And I have an issue. I need to create a custom user control that I will add to my UIScrollView dinamically. The control has an UITextField and an UIButton. See the code below: #import <UIKit/UIKit.h> @interface FieldWithValueControl : UIView { UITextField *txtTagName; UIButton *addButton; } @property (nonatomic, readonly) UITextField *txtTagName; @property (nonatomic, readonly) UIButton *addButton; @end #import "FieldWithValueControl.h" #define ITEM_SPACING 10 #define ITEM_HEIGHT 20 #define SWITCHBOX_WIDTH 100 #define SCREEN_WIDTH 320 #define ITEM_FONT_SIZE 14 #define TEXTBOX_WIDTH 150 @implementation FieldWithValueControl @synthesize txtTagName; @synthesize addButton; - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code txtTagName = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, TEXTBOX_WIDTH, ITEM_HEIGHT)]; txtTagName.borderStyle = UITextBorderStyleRoundedRect; addButton = [UIButton buttonWithType:UIButtonTypeContactAdd]; [addButton setFrame:CGRectMake(ITEM_SPACING + TEXTBOX_WIDTH, 0, ITEM_HEIGHT, ITEM_HEIGHT)]; [addButton addTarget:self action:@selector(addButtonTouched:) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:txtTagName]; [self addSubview:addButton]; } return self; } - (void)addButtonTouched:sender { UIButton *button = (UIButton*)sender; NSString *title = [button titleLabel].text; } - (void)drawRect:(CGRect)rect { // Drawing code } - (void)dealloc { [txtTagName release]; [addButton release]; [super dealloc]; } @end In my code I create an object of that class and add it to scrollView on form. FieldWithValueControl *newTagControl = (FieldWithValueControl*)[[FieldWithValueControl alloc] initWithFrame:CGRectMake(ITEM_SPACING, currentOffset + ITEM_SPACING, 0, 0)]; [scrollView addSubview:newTagControl]; The control looks fine, but if I click to the textbox or to the button nothing happens. Keyboard doesn't appear, the button is not clickable etc.

    Read the article

  • How create single HTML file to viewed in Excel with multiple sheets?

    - by Dmitry Nelepov
    I want know, is it possible create single HTML file wich (after chaging extension to xls) when opened at Excel will parsed to multiple sheets. Little example i got file test.xls with contents <html> <body> <table> <tr> <td> 1 </td> <td> 2 </td> <td> 3 </td> <td> =sum(A1:C1) </td> </tr> </table> </body> </html> When i open this file at Excel i got one Sheet with calculated sum of cells A1 to C1 in A4=6 I wonder, it's possible create a HTML file wich containts multiple tables wich will be parsed as multiple sheets at Excel. Here Excel view of this file

    Read the article

  • Good way to deal with comma seperated values in oracle

    - by dmitry
    I am getting passed comma seperated values to a stored procedure in oracle. I want to treat these values as a table so that I can use them in a query like: select * from tabl_a where column_b in (<csv values passed in>) What is the best way to do this in 11g? Right now we are looping through these one by one and inserting them into a gtt which I think is ineffecient. Any pointers?

    Read the article

  • How to call same method for a list of objects?

    - by Dmitry
    Suppose code like this: class Base: def start(self): pass def stop(self) pass class A(Base): def start(self): ... do something for A def stop(self) .... do something for A class B(Base): def start(self): def stop(self): a1 = A(); a2 = A() b1 = B(); b2 = B() all = [a1, b1, b2, a2,.....] Now I want to call methods start and stop (maybe also others) for each object in the list all. Is there any elegant way for doing this except of writing a bunch of functions like def start_all(all): for item in all: item.start() def stop_all(all): .....

    Read the article

  • linux's fork and system resources

    - by Dmitry Bespalov
    Suppose I have following code in linux: int main() { FILE* f = fopen("file.txt", "w"); fork(); fwrite("A", 1, 1, f); fclose(f); return 0; } What I know about fork from documentation, is that it makes the copy of current process. It copies state of the memory as well, so *f should be equal in both instances. But what happens with system resources, such as a file handle? In this example I open the file with write intentions, so only one instance can write into file, right? Which of the instances will actually write into file? Who should care further about the file handle, and call fclose() ?

    Read the article

  • How to determine if object in another AppDomain has gone

    - by Dmitry Lobanov
    I instantiate an object of some class in other ApDomain using CreateInstanceAndUnwrap(). I can determine if this object resides in other domain by using RemotingServices.IsTransparentProxy(). But can I determine if the real remote object has gone away (e.g. was garbage collected) without probing a call on proxy and catching RemotingException? Is it possible?

    Read the article

  • JAVA. Writing a matrix in a file using column information.

    - by Dmitry
    Hello, everybody! I have a file in which a matrix is stored. This file has a RandomAccessFile type. This matrix is stored by columns. I mean that in an i-th row of this matrix an i-th column (of a real matrix) is stored. There is an example: i-th row: 1 2 3 4 (in the file). That means that the real matrix has an i-th column: (1 2 3 4)(transpose). I need to save this matrix in natural way (by rows) in a new file, which I will then open with FileReader and display with TestArea. DO you know, how to do that? If so, please help =)

    Read the article

  • Task Manager with Trac support for Mac

    - by Dmitry
    Found Mylyn as a very good task manager that supports Trac and Gmail Task. I've seen Tasktop, but looking for something with smaller memory footprint that I could always run in background. Is there any lighter client (not on Eclipse platform) to manager at least Trac tasks (via XML-RPC) and in best case scenario with GMail Tasks support?

    Read the article

  • Referencing other modules in atexit

    - by Dmitry Risenberg
    I have a function that is responsible for killing a child process when the program ends: class MySingleton: def __init__(self): import atexit atexit.register(self.stop) def stop(self): os.kill(self.sel_server_pid, signal.SIGTERM) However I get an error message when this function is called: Traceback (most recent call last): File "/usr/lib/python2.5/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/commando/Development/Diploma/streaminatr/stream/selenium_tests.py", line 66, in stop os.kill(self.sel_server_pid, signal.SIGTERM) AttributeError: 'NoneType' object has no attribute 'kill' Looks like the os and signal modules get unloaded before atexit is called. Re-importing them solves the problem, but this behaviour seems weird to me - these modules are imported before I register my handler, so why are they unloaded before my own exit handler runs?

    Read the article

  • better for-loop syntax for detecting empty sequences?

    - by Dmitry Beransky
    Hi, Is there a better way to write the following: row_counter = 0 for item in iterable_sequence: # do stuff with the item counter += 1 if not row_counter: # handle the empty-sequence-case Please keep in mind that I can't use len(iterable_sequence) because 1) not all sequences have known lengths; 2) in some cases calling len() may trigger loading of the sequence's items into memory (as the case would be with sql query results). The reason I ask is that I'm simply curious if there is a way to make above more concise and idiomatic. What I'm looking for is along the lines of: for item in sequence: #process item *else*: #handle the empty sequence case (assuming "else" here worked only on empty sequences, which I know it doesn't)

    Read the article

  • Retrieving a page of that has a redirect

    - by Dmitry Makovetskiyd
    I get my page content with this function: private function fetch_url($url){ $ch=curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 320); $this->doc = curl_exec($ch); $this->status_code= curl_getinfo($ch, CURLINFO_HTTP_CODE); // echo $this->doc; curl_close($ch); } The problem is that with some urls dont exist on a webpage and there is a redirect to another page.. So say if I put the parameter: http://example.com/uncategorized/ It redirect me to : http://example.com/mature/ The problem is with curl, I dont get any content.. But my aim is to get the content of that page redirect.. Is there an easy way to get the function to work in the way I want..?

    Read the article

  • Javascript: regular expression

    - by Dmitry Nesteruk
    I need to replace a substring from some string. I've already created corrected code for doing it. But I amn't sure is it best way. Please, see code below: var str = 'test ruby,ruby on rails,ruby,' var substr = 'ruby'; var reg = new RegExp(',' + substr + ',|^' + substr + ',', 'gi'); str.replace(reg, ','); //returns "test ruby,ruby on rails,"

    Read the article

  • Libxml2: undefined reference to xmlTextReaderConstName

    - by Dmitry
    I have installed the latest libxml2-2.8.0, as usual: $ ./configure, $ make, $ make install. The $ xml2-config --cflags --libs gives this output: -I/usr/local/include/libxml2 -L/usr/local/lib -lxml2 -lm But trying to compile any example... $ gcc `xml2-config --cflags --libs` xmltest.c The linker says: /tmp/cc8ezrPl.o: In function `processNode': xmltest.c:(.text+0x19): undefined reference to `xmlTextReaderConstName' xmltest.c:(.text+0x38): undefined reference to `xmlTextReaderConstValue' ...etc. Anything I've googled can be solved by xml2-config --cflags --libs flags, or upgrading to the latest version of libxml2, or something. Unfortunately, neither works for me. What can be the steps to identify the problem? Using Ubuntu 12.04 64-bit.

    Read the article

  • If there is a necessary data base

    - by Dmitry
    Hello! I have a desktop program which uses an embedded data base mechanism. For the first time a user will execute a program, it must create a database. So that, next time there is a data base and there is no need to create it. Please, tell me, how to chech if there is a necessary data base.

    Read the article

  • Java. Writing a matrix in a file using column information. ( matrix transposition )

    - by Dmitry
    Hello, everybody! I have a file in which a matrix is stored. This file has a RandomAccessFile type. This matrix is stored by columns. I mean that in an i-th row of this matrix an i-th column (of a real matrix) is stored. There is an example: i-th row: 1 2 3 4 (in the file). That means that the real matrix has an i-th column: (1 2 3 4)(is transposed). I need to save this matrix in a natural way (by rows) in a new file, which I will then open with FileReader and display with TextArea. Do you know, how to do that? If so, please help =)

    Read the article

  • Caching images with asp/http

    - by Dmitry Makovetskiyd
    I want to cache all the images on my site, so I used this code: <%Response.AddHeader "Expires","Tue, 2 October 2013 00:00:00 GMT"%> The problem is that google says the images are not cached, whenever I go to this site: https://developers.google.com/speed/pagespeed Also in chrome, I can see that it gives a Get response for all the images. Why is that and how can I cache the images for the next year.

    Read the article

  • There is more then one Point class

    - by Dmitry
    Today I hit something very annoying while working with one of my colleagues. It seems there are two Point classes in .NET and by mistake we were trying for a good few minutes to figure out why our "Point(x,y)" wouldn’t take double, but only Int. Turns out we were using the wrong one since the XAML element in question needed the version with Double. So, based on what you actually want to do, make sure you’re using the right namespace. Please see below for MSDN reference links for each namespace version of Point, hope this saves you some time. System.Windows Point (MSDN Ref - Double version) System.Dawing Point (MSDN Ref - Int version)

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >