Search Results

Search found 5637 results on 226 pages for 'triple slash comments'.

Page 151/226 | < Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >

  • Class Method not working in objective c

    - by byteSlayer
    In my code I have a class called 'ProfileShareViewController', In which I have imported another class I have created called 'OwnProfileData', And I have also created an Instance of that class (class = OwnProfileData) as a property Of 'ProfileShareViewController' and synthesized it (instance called 'OwnProfile'). In another class I have called 'EditProfileViewController', I have imported the 'ProfileShareViewController', and now I am trying to change a property of the OwnProfile object from the ProfileShareViewController within the EditProfileViewController class. For some reason that doesn't work. I have Tried typing: [[ProfileShareViewController ownProfile] setName:@"Ido"]; (The property I am trying to set is Name, and as it is synthesized in OwnProfileData, I am using 'setName'). This doesn't work and I get the warning: "No known class method for selector 'ownMethod'. Any Idea as for why that might happen and how I can fix this? Thanks for your comments! Any support is highly appreciated!

    Read the article

  • Should we develop code on a local machine in a VLAN?

    - by red tiger
    Because of security reasons, we will not be able to use IIS on our local machines. I'm sure that many of you have faced the same problem, so how did you solve it? Here are the options that we're looking at: Create a VLAN that is isolated from the network for development. This will allow us to use any software, including IIS, that we want. A disadvantage is testing Web services with external organizations, which can be overcome by using stubs. Not use a VLAN and use only the ASP.NET Development Server that comes with Visual Studio, and then deploying that code to the development server. This has the disadvantage of not being able to replicate the production environment during local development. In addition, at least one developer needs IIS for GIS development, so he couldn't develop locally. Thank you for comments or suggestions that you may have!

    Read the article

  • Avaliable parallel technologies in .Net

    - by David
    I am new to .Net platform. I did a search and found that there are several ways to do parallel computing in .Net: Parallel task in Task Parallel Library, which is .Net 3.5. PLINQ, .Net 4.0 Asynchounous Programming, .Net 2.0, (async is mainly used to do I/O heavy tasks, F# has a concise syntax supporting this). I list this because in Mono, there seem to be no TPL or PLINQ. Thus if I need to write cross platform parallel programs, I can use async. .Net threads. No version limitation. Could you give some short comments on these or add more methods in this list? Thanks.

    Read the article

  • @echo off in DOS (cmd)

    - by Rayne
    I'm trying to write a BAT script and I have the following: @echo off REM Comments here SETLOCAL ENABLEDELAYEDEXPANSION set PROG_ROOT=C:\Prog set ONE=1 echo 1>> %PROG_ROOT\test.txt echo %ONE%>> %PROG_ROOT\test.txt for /f "tokens=*" %%f in (folders.txt) do ( echo %%f>> %PROG_ROOT\test.txt ) ENDLOCAL My folders.txt contains the number "5". My test.txt output is ECHO is off ECHO is off 5 I don't understand why the first 2 lines of output has "ECHO is off", while the third line is printed out correctly. How do I print the correct output?

    Read the article

  • How to secure an API written in .Net

    - by The Diamond Z
    This is a variation on an existing question in SO about securing/obfuscating .Net applications in general. I'm developing an API in C# that includes some algorithms I'm keen to protect. I understand no method will be perfect, but what's the generally accepted method for doing this? I'd like my clients to be able to code against the API but I don't want them to reverse engineer what's inside (at least I don't want to make it easy for them). If I obfuscate the code, won't that also obfuscate the API? We're looking at smartAssembly any thoughts comments on the product would be appreciated.

    Read the article

  • Another problem with decltype

    - by There is nothing we can do
    template<class IntT, IntT low = IntT(), IntT high = IntT()> struct X { static_assert(std::is_same<decltype(low),decltype(high)>::value,"Different types not allowed");//this should give error if types are different decltype(low) a; decltype(high) b; X():a(decltype(a)()),b(decltype(b)())//WHY THIS DOES NOT COMPILE? { cout << typeid(a).name() << '\n'; cout << typeid(b).name() << '\n'; } }; int _tmain(int argc, _TCHAR* argv[]) { X<char,1,'a'> x;//this according to static_assert shouldn't compile but it does return 0; } Using VS2010. Please see 3 comments in code above.

    Read the article

  • SVN user guidelines

    - by Oliver Moran
    I have been tasked with writing a set of user guidelines for SVN for developers in my company. The guidelines are to be solely from a user perspective (e.g. commit comments, when to commit) and not from an administrative perspective (e.g. when to tag, how to structure). An administrative guideline will be written in a separate document. We are an app development house involved also in embedded development. So our developers range from HTML5 and Flash to Java and C. Some of our coding involves forking very large (millions of files) code bases. Other parts involve us engaging in ground-up development. Are there any best practices for use of SVN from a user (i.e. grunt developer) perspective?

    Read the article

  • Spring security with database and multiple roles?

    - by Joe
    I'm trying to make an application using spring 3.0. Now I've decided to try my hand at spring-security and hibernate. I've already seen that it's possible to back it with a databasem and I've seen a reference to defining your own queries? Now the problem I have is that the tutorials I've been finding aren't too clear and that they assume that a user can only have one role. I want to give some users multiple roles. So I was thinking about a database scheme along the lines of: User: user_id username password registrationDate User_Role: user_id role_id Role: role_id rolename Now I was wondering if anyone had some pointers to some usefull tutorials/advice/comments.

    Read the article

  • passing different structs to a function in c

    - by clear2k
    I have different structures that need to be filled out the same way. The only difference is that they are filled based on different data. I was wondering if it's possible to pass different structures to a certain function. What I have in mind is something like: struct stu1 { char *a; int b; }; struct stu2 { char *a; int b; }; static struct not_sure **some_func(struct not_sure *not_sure_here, original_content_list) { // do something and return passed struct for(i=0; i<size_of_original_content_list; i++){ //fill out passed structure } return the_struct; } int main(int argc, char *argv[]) { return_struct1 = some_func(stu1); return_struct2 = some_func(stu2); // do something separate with each return struct... } Any comments will be appreciate it.

    Read the article

  • Android: Access to an already paired connection

    - by poeschlorn
    Hi community, I have a question on accessing already existing paired bluetooth connections... How can a remote service detect an already paired connection and await a file transfer from it? In all comments on stackoverflow, on tutorials, ebooks or on google there is always shown how to create a new connection using sockets and so on, but no word about accessing to an existing one. Is it possible at all? If yes, can you also tell/show me how? At the moment I have no clue how to get started with it. Would be great if someone can help me get started :)

    Read the article

  • Scroll the entire page with with UITableView that doesn't take up the entire screen

    - by KJF
    The only UITableViews I have worked with thus far are sized to fill the entire page. I'm trying to create a page in my app where I will have an image and a label on the top of the page followed by a UITableView to hold comments below it. Something like this springs to mind: http://www.inquisitr.com/wp-content/fbb.jpg My problem is if I add a UITableView below the image and label, when I scroll the tableview then only the UITableView cells scroll. Not the entire page. How would I go about making the entire page scroll so that the label and image scroll off the page and more table cells appear? Thanks.

    Read the article

  • Beginner for Delphi Network!

    - by Blagoj
    Hello, I worked in Delphi 6 a few years. Now I was beginning in Delphi network and I need some source code For following things: I want make chat application which to have two peer to peer clients But I don’t know how I to measure time for two clients and show it on both Screens. I also want to mark first client with 1,second with 2 ,,,,, In some application I want to have value who accounting number of sending of both clients Generally does it exist variable which is mutual for both clients?! Can somebody to send me source code of this kind?! Comments in source code will be welcome. Thank You Blagoj [email removed, return to this site for answer(s)]

    Read the article

  • Language D compared to C++?

    - by Henrik
    Anyone here with experience of the language D? I was just reading through its presentation at http://www.d-programming-language.org/ and at Wikipedia and it seems like a good (better) alternative to C++. With good/better I mean that it seem simpler yet it has all the good stuff within C/C++. But without some of the difficulties that make C++ more difficult to learn and use in a good and efficient way. So anyone with comments/experience with the language D? Performance?

    Read the article

  • question about adding another column to a sql statement

    - by every_answer_gets_a_point
    i am starting with this table: SELECT [Lab Occurrence Form].[Practice Code], [Lab Occurrence Form].[1 0 Preanalytical (Before Testing)], Count([Lab Occurrence Form].[1 0 Preanalytical (Before Testing)]) AS [CountOf1 0 Preanalytical (Before Testing)] FROM [Lab Occurrence Form] WHERE ((([Lab Occurrence Form].[Occurrence Date]) Between [Forms]![By Number]![Text4] And [Forms]![By Number]![Text2])) GROUP BY [Lab Occurrence Form].[Practice Code], [Lab Occurrence Form].[1 0 Preanalytical (Before Testing)] HAVING ((([Lab Occurrence Form].[Practice Code])<>"") AND ((Count([Lab Occurrence Form].[1 0 Preanalytical (Before Testing)]))<>0)); it selects 3 columns but i need to aggregate the comments and put it in the fourth column where the first two values are the same

    Read the article

  • Form POST or sessions?

    - by eddienotizzard
    If you have an item where you allow users to add comments, how can you pass which item the user is replying too? I've though of using a hidden field in a form, however this can be easily changed using plugins such as firebug: <form method="post" action="blah"> <input type="hidden" name="item_id" value="<?php echo $item_id; ?>"> <!-- other form data here --> <input type="submit" name="submit"> </form> Or just simply using a session: $_SESSION['item_id'] = $item_id Is there a safe way to send the item data in a form?

    Read the article

  • How to yield a single element from for loop in scala?

    - by Julio Faerman
    Much like this question: Functional code for looping with early exit Say the code is def findFirst[T](objects: List[T]):T = { for (obj <- objects) { if (expensiveFunc(obj) != null) return /*???*/ Some(obj) } None } How to yield a single element from a for loop like this in scala? I do not want to use find, as proposed in the original question, i am curious about if and how it could be implemented using the for loop. * UPDATE * First, thanks for all the comments, but i guess i was not clear in the question. I am shooting for something like this: val seven = for { x <- 1 to 10 if x == 7 } return x And that does not compile. The two errors are: - return outside method definition - method main has return statement; needs result type I know find() would be better in this case, i am just learning and exploring the language. And in a more complex case with several iterators, i think finding with for can actually be usefull. Thanks commenters, i'll start a bounty to make up for the bad posing of the question :)

    Read the article

  • Colored sphere in OpenGL

    - by Michael
    Ok so here's link to code in c++ http://pastebin.com/nfPmd0um (with polish comments ;) I would like to make a sphere divided by four planes. Each part of sphere should have a different color. At the moment it displays only 2 colored parts. I know that something's wrong with that part of code in Display() function: glEnable (GL_CLIP_PLANE0 +i); glDisable (GL_CLIP_PLANE1 -i); glEnable (GL_CLIP_PLANE2 +i); glDisable (GL_CLIP_PLANE3 -i); Anyone know what should i change? Thanks in advance :)

    Read the article

  • Should an edit of a comment be sent through POST or PUT?

    - by the_drow
    I have the following URI: Posts/{postId}/Comments/{commentId} I would like to enable users to edit a comment through my API, should the edit be done with POST or PUT? One one hand, POST updates the contents of a resource so that makes sense but on the other hand PUT replaces it with a new one. So if I understand correctly with POST I need to send only what needs to be updates and with PUT I send the whole resource. Usually in edit forms, the whole resource is loaded anyway so what's the point of using POST? If I take one approach or the other, what are the differences?

    Read the article

  • Filtering SQLAlchemy query on attribute_mapped_collection field of relationship

    - by bsa
    I have two classes, Tag and Hardware, defined with a simple parent-child relationship (see the full definition at the end). Now I want to filter a query on Tag using the version field in Hardware through an attribute_mapped_collection, eg: def get_tags(order_code=None, hardware_filters=None): session = Session() query = session.query(Tag) if order_code: query = query.filter(Tag.order_code == order_code) if hardware_filters: for k, v in hardware_filters.iteritems(): query = query.filter(getattr(Tag.hardware, k).version == v) return query.all() But I get: AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' object associated with Tag.hardware has an attribute 'baseband The same thing happens if I strip it back by hard-coding the attribute, eg: query.filter(Tag.hardware.baseband.version == v) I can do it this way: query = query.filter(Tag.hardware.any(artefact=k, version=v)) But why can't I filter directly through the attribute? Class definitions class Tag(Base): __tablename__ = 'tag' tag_id = Column(Integer, primary_key=True) order_code = Column(String, nullable=False) version = Column(String, nullable=False) status = Column(String, nullable=False) comments = Column(String) hardware = relationship( "Hardware", backref="tag", collection_class=attribute_mapped_collection('artefact'), ) __table_args__ = ( UniqueConstraint('order_code', 'version'), ) class Hardware(Base): __tablename__ = 'hardware' hardware_id = Column(Integer, primary_key=True) tag_id = Column(String, ForeignKey('tag.tag_id')) product_id = Column(String, nullable=True) artefact = Column(String, nullable=False) version = Column(String, nullable=False)

    Read the article

  • How does one find a '.' in a string object in Object-C

    - by NaZer
    I am working on getting a simple calculator working as part of my adventure to learning Object-C and iOS development. In Object-C using NSString, how does one look for a period in a string? Based on the comments this is what I got so far. NSString * tmp = [display text]; NSLog(@"%@", tmp); // Shows the number on the display correctly int x = [tmp rangeOfString:@"."].location; NSLog(@"%i", x); // Shows some random signed number if (x < 0) { [display setText:[[display text] stringByAppendingFormat:@"."]]; } It is still not working :(

    Read the article

  • Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'Type[]' to 'Type'?

    - by grady
    I get this error after I created a class from my xsd file using the xsd.exe tool. So I searched the net and found a solution. Here is the link: http://satov.blogspot.com/2006/12/xsdexe-generated-classes-causing.html Problem is that this makes the code run, but somehow the deserialized data seems corrupt. I did what the site suggests and in the end the 2nd array dimension is always empty (see the comments of the site, somebody also had this problem). Question is, how do I solve this issue now? Is there another tool to create the xsd file? I tried Xsd2Code, without success. Thanks :-)

    Read the article

  • I am getting duplicates in UITableView, cellForRowAtIndexPath

    - by Martol1ni
    I am getting duplicates of my array, and wrongly displayed cells in this method: Here I am initializing the array, and adding it to the tableView: NSArray *sectionsArray = [NSArray arrayWithObjects: @"Location", @"Front Post", @"Front Fixing", @"Front Footplate", @"Rear Post", @"Read Fixing", @"Rear Footplate", @"Horizontal Bracing", @"Diagonal Bracing", @"Front Beam", @"Front Lock", @"Rear Beam", @"Rear Lock", @"Guard", @"Accessories", @"Comments", @"Off load ref", @"Loc Empty", @"Loc Affected", nil]; [_tableArray setObject:sectionsArray atIndexedSubscript:2]; [_tableView reloadData]; For some weird reason there are always the 4th object that is messed up, and is either duplicated, or do not have the views from IB. Here is the cellForRowAtIndexPath: method: - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell; if (indexPath.section == 2) { cell = [tableView dequeueReusableCellWithIdentifier:@"EntryCell"]; cell.tag = indexPath.row; UILabel *label = (UILabel *)[cell viewWithTag:3]; [label setText:[[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row]]; } return cell; } I have logged the string [[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row], and it logs the right string.

    Read the article

  • DDD: MailService.SendNotificationToUser() or User.Notify()?

    - by cfs
    I seem to stumble on problem after problem giving my entities behavior. I have a system where a user gets a notification when someone comments his article. Right now it is via an e-mail. I'm struggeling how to implement this the DDD way. Option 1 User entity has a Notify method: User.Notify() The method uses C# built in classes to send an e-mail notification via e-mail The problem with having this in the domain is that it is technology spesific, and how a user is notified might change in the future. I feel this belongs to infrastructure, but how then can a user have behavior? Option 2 I create a Service: NotificationService.Notify(User) The Service uses C# built in classes to send an e-mail The pro is that the service could be an Application Service, and as far as I know an application service can use the infrastructure and call things like the System.Net.Mail and repositories for that sake. How would you implement this?

    Read the article

  • What's the safest way to remove data from mysql? (PHP/Mysql)

    - by ggfan
    I want to allow users as well as me(the admin) to delete data in mysql. I used to have remove.php that would get $_GETs from whatever that needed to be deleted such as... remove.php?action=post&posting_id=2. But I learned that anyone can simply abuse it and delete all my data. So what's the safest way for users and me to delete information without getting all crazy and hard? I am only a beginner :) I'm not sure if I can use POSTs because there is no forms and the data isn't changing. Is sessions good? Or would there be too many with postings, user information, comments, etc. Ex: James wants to delete one of his postings(it is posting_id=5). So he clicks the remove link and that takes him to remove.php?action=post&posting_id=5.

    Read the article

  • My $query->fetch() doesn't work

    - by Tae
    Question edited following the comments. It still doesn't work. Hi there, I'm trying to learn how PDO works, but my script: $database = new PDO('mysql:host=localhost;dbname=***', '***', '***'); $query = $database->prepare("SELECT nombre, tecnica, tamanno, estado FROM obra WHERE anno = ?"); $query->execute(array('2009')); while ($item = $query->fetch(PDO::FETCH_ASSOC)) { $item['nombre']; } Prints nothing. If I do: var_dump($query->fetch()) I get bool(false). After reading lots of examples I can't figure out what I'm doing wrong. Thanks in advance.

    Read the article

< Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >