Search Results

Search found 147 results on 6 pages for 'dmitry beransky'.

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

  • 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

  • How to properly load HTML data from third party website using MVC+AJAX?

    - by Dmitry
    I'm building ASP.NET MVC2 website that lets users store and analyze data about goods found on various online trade sites. When user is filling a form to create or edit an item, he should have a button "Import data" that automatically fills some fields based on data from third party website. The question is: what should this button do under the hood? I see at least 2 possible solutions. First. Do the import on client side using AJAX+jQuery load method. I tried it in IE8 and received browser warning popup about insecure script actions. Of course, it is completely unacceptable. Second. Add method ImportData(string URL) to ItemController class. It is called via AJAX, does the import + data processing server-side and returns JSON-d result to client. I tried it and received server exception (503) Server unavailable when loading HTML data into XMLDocument. Also I have a feeling that dealing with not well-formed HTML (missing closing tags, etc.) will be a huge pain. Any ideas how to parse such HTML documents?

    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

  • 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

  • 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

  • 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

  • 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

  • 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 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 10 Best Programming Podcast 2010 Edition

    - by mbcrump
    This list is in no particular order. Just the 10 best programming podcast that I have found so far. Stack Overflow Podcast -  Jeff Atwood (of codinghorror.com) and Joel Spolsky (of joelonsoftware.com) discuss the development of their new programming community, StackOverflow.com. [This Podcast hasn’t been updated in a while, but its always great to hear more from Jeff Atwood] Hanselminutes - Hanselminutes is a weekly audio talk show with noted web developer and technologist Scott Hanselman and hosted by Carl Franklin. Scott discusses utilities and tools, gives practical how-to advice, and discusses ASP.NET or Windows issues and workarounds. [This Podcast has recently started talking about random topics like diabetes, plane travel and geek relationship tips.  I am not sure if Scott is trying to move to a more mainstream audience or not] Herding Code - A weekly discussion featuring K. Scott Allen (odetocode.com), Kevin Dente, Scott Koon (lazycoder.com), and Jon Galloway. [Great all all-around podcast that I would recommend to all] Deep Fried Bytes - Deep Fried Bytes is an audio talk show with a Southern flavor hosted by technologists and developers Keith Elder and Chris Woodruff. The show discusses a wide range of topics including application development, operating systems and technology in general. Anything is fair game if it plugs into the wall or takes a battery. [This is one that just keeps getting better] Dot Net Rocks - .NET Rocks! is an Internet Audio Talk Show for Microsoft .NET Developers. [One of the first and usually very high quality content] Connected Show - Connected Show Podcast! A podcast covering new Microsoft technology for the developer community. The show is hosted by Dmitry Lyalin and Peter Laudati. [This and Polymorphic are one of my favorite podcast – Dmitry is a great host and would recommend this to all] Polymorphic Podcast - Object oriented development, architecture and best practices in .NET [Craig is a ASP.NET MVP and a great presenter. His podcast is great and it could only be better if he recorded it more often] ASP.NET Podcast - Wallace B. (Wally) McClure presents interviews and short technical talks on .NET Technologies. [Has great information on ASP.NET of course as well as iPhone Dev] Ruby on Rails Podcast - News and interviews about the Ruby language and the Rails website framework. [Even though I am not a Ruby programmer, I’ve found this podcast very interesting] Software Engineering Radio - Software Engineering Radio is a podcast targeted at the professional software developer. The goal is to be a lasting educational resource, not a newscast. Every ten days, a new episode is published that covers all topics software engineering. Episodes are either tutorials on a specific topic, or an interview with a well-known character from the software engineering world. All SE Radio episodes are original content ? we do not record conferences or talks given in other venues. Each episode comprises two speakers to ensure a lively listening experience. SE Radio is an independent and non-commercial organization. [Another excellent podcast – I would recommend any programmer add this to his/her drive home] If I have missed something, please feel free to email me and it might make the 2011 list. =)

    Read the article

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