Search Results

Search found 12397 results on 496 pages for 'maybe'.

Page 26/496 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Which design pattern should I be using?

    - by Gabriel
    Here's briefly what I'm trying to do. The user supplies me with a link to a photo from one of several photo-sharing websites (such as Flickr, Zooomr, et. al). I then do some processing on the photo using their respective APIs. Right now, I'm only implementing one service, but I will most likely add more in the near future. I don't want to have a bunch of if/else or switch statements to define the logic for the different websites (but maybe that's necessary?) I'd rather just call GetImage(url) and have it get me the image from whatever service the url's domain is from. I'm confused how the GetImage function and classes should be designed. Maybe I need the strategy pattern? I'm still reading and trying to understand the various design patterns and how I could make one fit in this case. I'm doing this in C#, but this question is language-agnostic.

    Read the article

  • Undefined symbols when attempting to use CoverStory with iPhone app: _vproc_transaction_end

    - by dbarker
    After following these steps to set up an iphone project with CoverStory, my build fails with two linker errors. Undefined symbols: "_vproc_transaction_end", referenced from: _gcov_exit in libgcov.a(_gcov.o) _vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o) (maybe you meant: _vproc_transaction_end$non_lazy_ptr) "_vproc_transaction_begin", referenced from: ___gcov_init in libgcov.a(_gcov.o) _vproc_transaction_begin$non_lazy_ptr in libgcov.a(_gcov.o) (maybe you meant: _vproc_transaction_begin$non_lazy_ptr) ld: symbol(s) not found collect2: ld returned 1 exit status The second error is similar to above, except for _vproc_transaction_begin. I'm using Xcode 3.2, GCC 4.2 on Snow Leopard. Any ideas what I'm missing?

    Read the article

  • Preventing the opening of a form on an ad

    - by Jonathan
    Hey guys, Did you guys know how to prevent the open of a Form when I click on a add button? Maybe using beforeShowForm? function(formid) { if(jQuery('#gridap').getGridParam('selrow')) { idgridap=jQuery('#gridap').getGridParam('selrow'); jQuery('#FK_numerocontrato_ap',formid).val(idgridap).attr('readonly','readonly'); } else { // I want to prevent the openning of the add form here and maybe show an alert using the "alertcap" } } CHECAROW; $grid->setNavEvent('add','beforeShowForm',$checarowid); BTW, there's a way to call the alertmod of jqgrid and add a custom message to it? tks!

    Read the article

  • What is the sense of permiting the user to use no passwords longer than xx chars?

    - by reox
    Its more like a usability question or maybe database, or even maybe security (consider injection attacks) but what is the sense of permiting the user's password to a be not longer than xx chars? It does not make any sense to me, because longer passwords are mostly considered better and even harder to crack, and some users use password safes, so the password length should not matter. I understand that passwords with more than 20 chars are hardly to remember, but if you use diceware or password safe you dont have any problem with that. I really cant understand why there are sites that say "your password need to be between 5 and 8 chars"... also should the password saved as hash, so the length of the field in the database is fixed, so where is the problem? i think that most of the sites where the password is has to be a fixed length are not even using any hashing method...

    Read the article

  • Outlook 2003 Addin, How to open Select name dialog?

    - by IamStalker
    Hi, i know that is not so easy question, but i have to ask this cause i am struggling with it for almost two weeks maybe more... How can i open a SELECT NAMES DIALOG (Contacts) in Outlook2003 Addin C#? I know how to do it in 2007 and it's doesn't work's in 2003 so please help me... I Develop with C# this addin and if i can find any code examples or maybe you can show me how to do it, it will be highly appreciated... Thanks in advance.

    Read the article

  • How can I get the associated ref path for a git SHA?

    - by andreb
    Hi, I want to be able to pass anything to a git command (maybe its a SHA, maybe it's just something like "origin/master" or "devel/epxerimental" etc.) and git tells me the ref path of the branch that the passed something lives in, e.g. <git_command> 0dc27819b8e9 => output: refs/heads/master <git_command> xyz/test => output: refs/remotes/xyz/master ... I've been looking at git show or git log or git rev-parse and apart from --pretty=format:%d I couldn't find anything. (--pretty=format:%d output is quite strange with lotsa free space and empty lines and sometimes more than one ref paths are on one line bunched together). There has to be a better way? Thanks for reading. Andre

    Read the article

  • Converting an AWT application to SWT/JFace

    - by data
    I am currently toying with the idea of converting a small/medium sized project from AWT to SWT, although Swing is not totally out of the picture yet. I was thinking about converting the main window to an SWT_AWT bridge object, but I have no idea how the semantics for this work. After that, I plan to update dialog for dialog, but not necessarily within one release. Is this possible? Has someone done a conversion like this and can give me some hints? Is there maybe even a tutorial somewhere out there? Is there maybe even a tool that can automate parts of this? I have tried googling, but to no avail. Update: One additional thing is: Currently, this is a netbeans project. Might be of help or not, I don't know.

    Read the article

  • long processes php

    - by significance
    hi, i need to run a really long php script (four and half, five hours). the script sometimes runs successfully, but sometimes gets killed inexplicably (poss something to do with the shared hosting??). i think that the solution maybe to run the script is smaller chunks. in order to do this i have written a script that stores it's status & position in an xml file, and executes one chunk of the script, before moving the position on. i am having problems hooking up the last bit of the script, which should end the current process & re-execute the script. or maybe i am barking up the wrong tree completely! i have read through what i can find on SO and elsewhere but i'm still none the wiser :( please help!!! dan

    Read the article

  • Exporting classes containing std:: objects (vector, map, etc) from a dll

    - by RnR
    I'm trying to export classes from a DLL that contain objects such as std::vectors and std::stings - the whole class is declared as dll export through: class DLL_EXPORT FontManager { The problem is that for members of the complex types I get this warning: warning C4251: 'FontManager::m__fonts' : class 'std::map<_Kty,_Ty' needs to have dll-interface to be used by clients of class 'FontManager' with [ _Kty=std::string, _Ty=tFontInfoRef ] I'm able to remove some of the warnings by putting the following forward class declaration before them even though I'm not changing the type of the member variables themselves: template class DLL_EXPORT std::allocator<tCharGlyphProviderRef>; template class DLL_EXPORT std::vector<tCharGlyphProviderRef,std::allocator<tCharGlyphProviderRef> >; std::vector<tCharGlyphProviderRef> m_glyphProviders; Looks like the forward declaration "injects" the DLL_EXPORT for when the member is compiled but is it safe? Does it realy change anything when the client compiles this header and uses the std container on his side? Will it make all future uses of such a container DLL_EXPORT (and possibly not inline?)? And does it really solve the problem that the warning tries to warn about? Is this warning anything I should be worried about or would it be best to disable it in the scope of these constructs? The clients and the dll will always be built using the same set of libraries and compilers and those are header only classes... I'm using Visual Studio 2003 with the standard STD library. ---- Update ---- I'd like to target you more though as I see the answers are general and here we're talking about std containers and types (such as std::string) - maybe the question really is: Can we disable the warning for standard containers and types available to both the client and the dll through the same library headers and treat them just as we'd treat an int or any other built-in type? (It does seem to work correctly on my side.) If so would should be the conditions under which we can do this? Or should maybe using such containers be prohibited or at least ultra care taken to make sure no assignment operators, copy constructors etc will get inlined into the dll client? In general I'd like to know if you feel designing a dll interface having such objects (and for example using them to return stuff to the client as return value types) is a good idea or not and why - I'd like to have a "high level" interface to this functionality... maybe the best solution is what Neil Butterworth suggested - creating a static library?

    Read the article

  • Emacs cheat sheet that lists equivalents to everyday vim commands

    - by Yktula
    There were two things that I want to know how to do in Emacs (23.2, *nix): Go to the first character after indentation in a line Go to the first character that's the equivalent to a given character (an equivalent to vim's fx command that goes forward until it hits the x character; maybe C-s (incremental search) is the best way to do this) But, I think it would be better if I had a cheat sheet that listed navigational bindings. Maybe Emacs (self-documenting) can do this on it's own. Is there a list of commands that are equivalent to vim's default commands anywhere? How about a list of navigational key-bindings in Emacs?

    Read the article

  • Python and urllib2: how to make a GET request with parameters

    - by Infinity
    I'm building an "API API", it basically a wrapper for a in house REST web service that the web app will be making a lot of requests to. Some of the web service calls need to be GET rather than post, but passing parameters. Is there a "best practice" way to encode a dictionary into a query string? e.g.: ?foo=bar&bla=blah I'm looking at the urllib2 docs, and it looks like it decides by itself wether to use POST or GET based on if you pass params or not, but maybe someone knows how to make it transform the params dictionary into a GET request. Maybe there's a package for something like this out there? It would be great if it supported keep-alive, as the web server will be constantly requesting things from the REST service. Thanks!

    Read the article

  • Good book(s) for MMORPG design & implementation?

    - by mawg
    I am a long time professional C/C++ programmer (mostly embedded systems) and a hobbyist windows & php hacker. Can anyone recommend a book(s) specifically aimed at designing and (hopefully) implementing an MMORPG? I don't need general how to design or how to code books. Maybe a really good generic games book, but I am not interested in 1st person shooters, I want to know what it takes to implement an MMORPG. Good books, maybe also good URLs. Thanks just searching eBay and Amazon threw up a whole slew of books. Amazon's customer reviews give me an idea of how good they are, and the overview tells me what areas they cover

    Read the article

  • Working with the Grails g:timeZoneSelect tag?

    - by tinny
    I am wanting to use the g:timeZoneSelect tag within my application, problem is im finding the resulting html select to be quite overwhelming. Over 600 options are being displayed, IMHO this is to much to display to the user. Maybe someone could point me to an example of a much more manageable list of timezones? Maybe you have seen a site that does timezone selection well? Im sure over 600 option is "technically" correct, but this will just look like noise to the user. The display value of the timezone is to long. E.g. "CST, Central Standard Time (South Australia/New South Wales) 9.5:30.0" Just "CST, Central Standard Time" or "Australia/Broken_Hill" would be better Is there a way to address these issues via tag attributes of some sort (cant find any in the docs) or config that I am unaware of? Or, is my best bet to wrap an html select within a custom tag lib and "roll my own" solution (Id prefer not to). Thanks

    Read the article

  • What are some C++ Standard Library usage best practices?

    - by apphacker
    I'm learning C++ and the book I'm reading (The C++ Programming Language) says to not reinvent the wheel, to rely on the standard libraries. In C, I often end up creating a linked list, and link list iteration over and over again (maybe I'm doing that wrong not sure), so the ideas of containers available in C++, and strings, and algorithms really appeal to me. However I have read a little online, and heard some criticisms from my friends and coworkers about STL, so I thought I maybe I'd pick some brains here. What are some best practices for using STL, and what lessons have you learned about STL?

    Read the article

  • Can I interpolate two HEX color values without converting them to RGB?

    - by navand
    I'm trying to make a Gradient Class for a Blackberry app. At first I thought about converting the HEX values to RGB and then interpolating them before converting the result back into HEX, but since I will be doing this for every pixel line of an area, and the calculations will be made by a mobile, I thought that maybe there's a more efficient way of doing it. Maybe involving those pesky bitwise operators which I know nothing of... or something. So, is there a way of interpolating without converting to RGB and back? If so, is it faster than the original way? In any case, can you help me make the most efficient color interpolation? Thank you in advance!

    Read the article

  • Good workflow with emacs+swank+slime+clojure?

    - by grm
    I just wanted opinion on good workflow using the emacs environment with clojure+swank+slime. I often find myself doing very repetitive keycommands and wonder if there is an obvious better way. I include swank with lein and start my project using lein swank from shell. Then I connect with emacs and do the correct use commands so that I can start to use (run-tests ). Then I do some coding and then want to test. To run the test I need to change buffer in emacs to the swank-repl C-x o, then I need to go to the prompt M-, then repeat the command M-p, then enter, maybe with an exception, then back to the code buffer and continue all over again with all the emacs commands. I find it a bit repetitive. I guess the solution would be to start hack on emacs and maybe add a shortcut for doing this repetitive task, but I would love to hear some suggestions because I can't be the only one who find this tedious?

    Read the article

  • release vs setting-to-nil to free memory

    - by Dan Ray
    In my root view controller, in my didReceiveMemoryWarning method, I go through a couple data structures (which I keep in a global singleton called DataManager), and ditch the heaviest things I've got--one or maybe two images associated with possibly twenty or thirty or more data records. Right now I'm going through and setting those to nil. I'm also setting myself a boolean flag so that various view controllers that need this data can easily know to reload. Thusly: DataManager *data = [DataManager sharedDataManager]; for (Event *event in data.eventList) { event.image = nil; event.thumbnail = nil; } for (WondrMark *mark in data.wondrMarks) { mark.image = nil; } [DataManager sharedDataManager].cleanedMemory = YES; Today I'm thinking, though... and I'm not actually sure all that allocated memory is really being freed when I do that. Should I instead release those images and maybe hit them with a new alloc and init when I need them again later?

    Read the article

  • HTML Audio performance

    - by user1888309
    I'm working on HTML drum machine, and I`ve met some performance issues, rhythm start to break if BPM is higher than 110 but I'm expecting to make it work on BPM over 180. I guess that it can be related with format or codec of audio files, however it also maybe that my code is not very optimised (as I can see from JS CPU profiling it's not). So I'm expecting you guys give me some code review or some hints on optimisation. Although all similar projects I've found on internet didn't work good and maybe it's just restrictions of Audio API. By the way, it's very raw and sounds works only on Chrome under Mac OS, so any advise on audio encoding for web also would be great Project on Github pages Screenshot of Groove which breaks UPDATE Ok, I've found that I was encoding audio files incorrectly, after fixing that rhythm stopped breaking, and also it started working in Mozilla. But still there are issues on windows OS.

    Read the article

  • How to get cheap version control?

    - by gotch4
    Hello, I'm a programmer, contractor, self experimenter and so on. I'd need to have cheap version control. I've been working with Subversion and recently with Mercurial. I've seen around many cheap hosting but, even if they are great (like BitBucket), many of them don't allow many private projects (1 or 2). Much of the code I need to keep on VC is not open, maybe because it is stuff I'm working on for clients, or maybe because it's code I usually need for my development, but it is not intended and usable as a open source project. Now, I've a cheap web hosting, with unlimited space and free mysql. I CAN'T install Mercurial or SVN on those machinese, but I was asking myself if is it there a way to use a common CVS with it, with "common" I mean something that has its good IDE plugins (Eclipse or Netbeans) that may avoid me to write commands by hand. Thank you

    Read the article

  • Getting WAP embedded video in android AND iphone?

    - by Jon
    Recently a client asked me to make their site "work on smart phones", which normally wouldn't be too much of an issue... However it's a video site, and I have absolutely no idea where to even begin. Right off the bat I'm not even going to consider allowing the site to even function in anything other than Android (Maybe even 2.0+) and iPhone, maybe Blackberry and WinMo. But beyond that... What do I do? I'm looking at using the tag, however I'm unsure what, if any, codecs which phone uses. Is HTML5 even adopted in their browsers yet? Could someone please point me in the right direction? Am I going about this the right way, using the tag? Or is there some magical html element both iPhone and Android (And BB and WMo) that lets them run video in their native video players (Like on youtube).

    Read the article

  • segmented reduction with scattered segments

    - by Christian Rau
    I got to solve a pretty standard problem on the GPU, but I'm quite new to practical GPGPU, so I'm looking for ideas to approach this problem. I have many points in 3-space which are assigned to a very small number of groups (each point belongs to one group), specifically 15 in this case (doesn't ever change). Now I want to compute the mean and covariance matrix of all the groups. So on the CPU it's roughly the same as: for each point p { mean[p.group] += p.pos; covariance[p.group] += p.pos * p.pos; ++count[p.group]; } for each group g { mean[g] /= count[g]; covariance[g] = covariance[g]/count[g] - mean[g]*mean[g]; } Since the number of groups is extremely small, the last step can be done on the CPU (I need those values on the CPU, anyway). The first step is actually just a segmented reduction, but with the segments scattered around. So the first idea I came up with, was to first sort the points by their groups. I thought about a simple bucket sort using atomic_inc to compute bucket sizes and per-point relocation indices (got a better idea for sorting?, atomics may not be the best idea). After that they're sorted by groups and I could possibly come up with an adaption of the segmented scan algorithms presented here. But in this special case, I got a very large amount of data per point (9-10 floats, maybe even doubles if the need arises), so the standard algorithms using a shared memory element per thread and a thread per point might make problems regarding per-multiprocessor resources as shared memory or registers (Ok, much more on compute capability 1.x than 2.x, but still). Due to the very small and constant number of groups I thought there might be better approaches. Maybe there are already existing ideas suited for these specific properties of such a standard problem. Or maybe my general approach isn't that bad and you got ideas for improving the individual steps, like a good sorting algorithm suited for a very small number of keys or some segmented reduction algorithm minimizing shared memory/register usage. I'm looking for general approaches and don't want to use external libraries. FWIW I'm using OpenCL, but it shouldn't really matter as the general concepts of GPU computing don't really differ over the major frameworks.

    Read the article

  • My AES encryption/decryption functions don't work with random ivecs

    - by Brendan Long
    I was bored and wrote a wrapper around openSSL to do AES encryption with less work. If I do it like this: http://pastebin.com/V1eqz4jp (ivec = 0) Everything works fine, but the default ivec is all 0's, which has some security problems. Since I'm passing the data back as a string anyway, I figured, why not generate a random ivec and stick it to the front, the take it back off when I decrypt the string? For some reason it doesn't work though. With random ivec: http://pastebin.com/MkDBFcn6 Well actually, it almost works. It seems to decrypt the middle of the string, but not the beginning or end: String is: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF Encrypting.. ???l%%1u???B! ?????`pN)?????[l????{?Q???2?/?H??y"?=Z?Cu????l%%1u???B! Decrypting.. String is: ?%???G*?5J?0??0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF!-e????V?5 I honestly have no idea what's going wrong. Maybe some stupid mistake, or maybe I'm missing something about AES?

    Read the article

  • drupal (CMS) or codeigniter (MVC) for creating a new web application?

    - by ajsie
    im going to create a new web application that is very customized. it will contain images, that are fully searchable - in a very, very customized way. when you click on the pictures you can add comments and so on. it requires users to be registered, but the registration/login process will be highly customized too. at the moment im using CodeIgniter for this. But i've read a lot of posts about CMS like Drupal and it sounds like i could let it handle basic stuff, maybe design and other front end work. i have no experience with CMS, in fact, i just started to use a MVC framework like CI and was impressed of how much easier it gets to start developing. so i wonder, if i'm going to create this kind of application, could i use drupal and then add the usual stuff, as i was going to do with CodeIgniter, like controllers, views, models, config files, my own libraries and so on? how does it work on a system like Drupal. how do you code PHP with it as with any MVC framework. it sounds like it has a lot of modules, i just wonder, if i can use it as a MVC framework but have the benefit of having all these basic stuff and design ready to use? cause then it sounds like the best "library" to provide for a web application from scratch. or is it difficult to create a customized app with it? i guess it has modules like images and users, but then how could i customize these so that every image has tags on it and country information, or have every user subscribing to changes to an image, that email will be sent to users and so on? cause i guess its easy to install a module. the question is, how do i customize it. maybe i don't need all that table columns. maybe i want to add/remove business logic. what are the pros and cons with using Drupal for this? is it even the right way to go? can you make a Stackoverflow with Drupal? Facebook? Twitter? Youtube? assuming that you know php of course. share your thoughts cause im totally new on creating a web application! thanks

    Read the article

  • Typical text encoding and EOL behavior on mobile devices

    - by Dan W
    Typical things to worry about when dealing with text are the BOM/signature, encoding, and the end of line (EOL) char/chars. I know that Windows often favours \r\n (CR+LF) and Mac/Linux favours \n (LF), but how about popular mobile devices such as the iPhone and Android? Do typical apps on those platforms favour one or the other (or maybe even \r for iOS)? I'll supply both types to the user just in case, but I'd like to choose one as default. Also, which text encodings are mobiles most likely to use - UTF-8, iso-8859-1, Windows 1252 (or other default codepage) or maybe even UTF-16? And if they use UTF-8/16, are they likely to need (or require not having) a BOM/signature? What is the typical behavior here? Once again, I'll supply a range of encodings to the user just in case, but I'd like to prioritize or use certain encodings as default if it's appropriate.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >