Daily Archives

Articles indexed Wednesday May 19 2010

Page 8/122 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Une banque est la risée des hackers et du web, suite à sa manière particulière de se prémunir des in

    Une banque est la risée des hackers et du web, suite à sa manière particulière de se prémunir des injections SQL Une banque californienne a une manière bien particulière de se protéger des attaques par injection SQL. Dans la FAQ de son site, l'établissement demande à ses clients de ne pas utiliser les mots suivants (comme réponse à leur question secrète) : insert, delete, drop, update, null et select. Cette information a été découverte le 14 mai et depuis, elle a fait le tour du web, suscitant de grands fous rires dans la communautés des amateurs et professionnels de la sécurité informatique. Depuis hier, la FAQ n'est plus en ligne mais, fort heureusement, nous disposons d'une capture d'écran de ce qui avait été publié :

    Read the article

  • Grails / GORM, Disable First-level Cache

    - by Stephen Swensen
    Suppose I have the following Domain class mapping to a legacy table, utilizing read-only second-level cache, and having a transient field: class DomainObject { static def transients = ['userId'] Long id Long userId static mapping = { cache usage: 'read-only' table 'SOME_TABLE' } } I have a problem, references to DomainObject are being shared due to first-level caching, and thus transient fields are writing over each other. For example, def r1 = DomainObject.get(1) r1.userId = 22 def r2 = DomainObject.get(1) r2.userId = 34 assert r1.userId == 34 That is, r1 and r2 are references to the same instance. This is undesirable, I would like to cache the table data without sharing references. Any ideas? [Edit] Understanding the situation better now, I believe my question boils down to the following: Is there anyway to disable first level cache for a specific domain class while still using second level cache?

    Read the article

  • Eclipse organization: workspaces, working sets, projects, folders, multiple source folders, ....!!!

    - by Ricket
    There is quite a tier of organization in Eclipse. You can have multiple workspaces, each of which can have projects, these projects can be assigned to working sets, and then each project can have source folders... How do you use all this organization? Do you even use it all? Working sets are so hidden that I hardly know what they are; are they commonly used, or are they hidden because they are so uncommonly used? What is even the methodology behind all this? I'd like a good explanation of the recommended way to use all these different organizational layers, because at the moment I basically just have a bunch of random projects in a single workspace (the default %USER%/workspace folder) and it's getting to be quite an alphabetical mess. So in essence: How do you keep your Eclipse workspace(s) organized?

    Read the article

  • Tables in LaTeX

    - by rosalia
    When I try centering my table & getting a caption so that it reads something like "Table 1. This is the caption." the table appears at the top of the page no matter what I do. If I don't do the caption then I can get it in the part of the document that I want. How do I fix this problem? \begin{table} \caption{This is the caption.} \begin{center} \begin{tabular}{ | l | l | l | l |} \hline ... \hline \end{tabular} \end{center} \end{table}

    Read the article

  • TStringGrid with BOTH editing AND range selection?

    - by Kevin Killion
    Question: Can anyone point to an article or code samples anywhere on how to provide BOTH editing AND range selection in a TStringGrid? Yes, I KNOW there are third-party grids that do this, but it's frustrating that the built-in grid lacks this basic capability. Background: It's pretty normal to expect to be able to both edit a cell in a grid, and also to select a range of cells such as for a Copy operation. As delivered, TStringGrid doesn't do that. It's either/or. In fact, the docs tell us about the grid Options, "When goEditing is included in Options, goRangeSelect has no effect". However, it looks like it may be possible to do editing and rangeselects in a TStringGrid anyway!!! Through careful use of the mousedown, mouseup, selectcell and exit events, you can get dang close by switching editing elements on and off at the right times. But I still don't have it perfect, and that only covers mouse use, not keyboard changes.

    Read the article

  • iPhone: how do i redraw subviews while pinch zooming a uiscrollview

    - by Mike
    I am developing an iPhone app that places multiple custom UIViews as subviews in a UIScrollView. The subviews are placed on top of each other as transparent views as each view has its own drawing routines that traces parts of the base view. The base view is a UIImageView that is typically a large image that I want the user to be able to pan and zoom in and out of. The problem I am having is that when I zoom in and out of my UIScrollView, the subviews do not redraw themselves while the user is zooming. I can reposition and scale the subviews properly once the zoom is completed, but the user experience is less than desirable. I have not been able to find a way to either hide or redraw the subviews as the zoom is taking place to scale the subviews along with the ImageView. Any ideas? thanks! Here is the code that I have implemented: - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale { for (UIView *view in subViews) { [view updateView:scale]; } } - (UIView *)viewForZoomingInScrollView:(UIScrollView *) scrollView { return imageView; }

    Read the article

  • PHP access class inside another class

    - by arxanas
    So I have two classes like this: class foo { /* code here */ } $foo = new foo(); class bar { global $foo; public function bar () { echo $foo->something(); } } I want to access the methods of foo inside all methods bar, without declaring it in each method inside bar, like this: class bar { public function bar () { global $foo; echo $foo->something(); } public function barMethod () { global $foo; echo $foo->somethingElse(); } /* etc */ } I don't want to extend it, either. I tried using the var keyword, but it didn't seem to work. What do I do in order to access the other class "foo" inside all methods of bar?

    Read the article

  • simple photo viewer

    - by Blaise
    Hi, I am fairly new to all this. I am trying to make a simple photo viewer with javascript or anything easy to alter. I just want a next and prev. button to take you between photos. Click next and next photo shows. Just that simple. I have a flash version but I would like to avoid using flash. I've been doing it the long way by making multiple pages, one for each photo and a button that repeats. I know there must be a better way but I just can't seem to figure it out. Please help

    Read the article

  • Chrome and its Spellcheck -- How Hard Would This Be To Implement

    - by bobber205
    From a programmer's perspective. The dictionary in chrome, Google's "own" browser, does not have the same dictionary as their search engine. Countless times I have right clicked on a poorly misspelled word only to have no correct spelling appear. I Google the word and almost 100% of the time it knows what I was trying to type. :) I realize there are probably very good reasons for this, but why can't Chrome simply Google for a word when you right click on it when it can't find a correct spelling. I am sometimes a bad speller and it would be really nice if the spell check in Chrome at least utilized Google's landmark product to provide more accurate word spelling lookups. How hard must this be to implement or are there other reasons you think they are not?

    Read the article

  • Shall the website switches language based on IP address or browser language?

    - by SuperRomia
    Geo-location has been using most by Websites to redirection, but I have found that several IP addresses locate a country which has using several languages. Meantime, some users prefer to using the language setup in their system. For example, a person from United States goes to Japan and using the Internet connection from there to surf Website, but the Website redirects him to Japanese language. So, shall I giving the web user choice to select the language detect on their browser or force them to the website detected by IP address?

    Read the article

  • Catching the return of main function before it deallocates resources

    - by EpsilonVector
    I'm trying to implement user threads in Linux kernel 2.4, and I ran into something problematic and unexpected. Background: a thread basically executes a single function and dies, except that when I call thread_create for the first time it must turn main() into a thread as well (by default it is not a thread until the first call, which is also when all the related data structures are allocated). Since a thread executes a function and dies, we don't need to "return" anywhere with it, but we do need to save the return value to be reclaimed later with thread_join, so the hack I came up with was: when I allocate the thread stack I place a return address that points to a thread_return_handler function, which deallocates the thread, makes it a zombie, and saves its return value for later. This works for "just run a function and die" threads, but is very problematic with the main thread. Since it actually is the main function, if it returns before the other threads finish the normal return mechanism kicks in, and deallocates all the shared resources, thus screwing up all the running threads. I need to keep it from doing that. Any ideas on how it can be done?

    Read the article

  • how to extend a protocol for a delegate in objective C, then subclass an object to require a conform

    - by fess .
    I want to subclass UITextView, and send a new message to the delegate. So, I want to extend the delegate protocol, What's the correct way to do this? I started out with this: interface: #import <Foundation/Foundation.h> @class MySubClass; @protocol MySubClassDelegate <UITextViewDelegate> - (void) MySubClassMessage: (MySubClass *) subclass; @end @interface MySubClass : UITextView { } @end implementation: #import "MySubClass.h" @implementation MySubClass - (void) SomeMethod; { if ([self.delegate respondsToSelector: @selector (MySubClassMessage:)]) { [self.delegate MySubClassMessage: self]; } } @end however with that I get the warning: '-MySubClassMessage:' not found in protocol(s). I had one way working where I created my own ivar to store the delegate, then also stored the delegate using [super setDelegate] but that seemed wrong. perhaps it's not. I know I can just pass id's around and get by, but My goal is to make sure that the compiler checks that any delegate supplied to MySubClass conforms to MySubClassDelegate protocol. To further clairfy: @interface MySubClassTester : NSObject { } @implementation MySubClassTester - (void) one { MySubClass *subclass = [[MySubClass alloc] init]; subclass.delegate = self; } @end will produce the warning: class 'MySubClassTester' does not implement the 'UITextViewDelegate' protocol I want it to produce the warning about not implementing 'MySubClassDelegate' protocol instead. Thanks, a bunch. (thanks brad)

    Read the article

  • Problem restarting my Ubuntu system

    - by VoY
    Whenever I try to restart my Ubuntu either from the command line by typing reboot or in GNOME the computer goes from X to console, starts the shutdown process and then a message saying "[ some number ] Starting new kernel" appears on the screen and the computer goes back to X login screen. I suspect this must have something to do with nvidia drivers, because it seemed to have appeared around the time I bought a new graphic card. Also, when I reboot the second time I see weird graphical artifacts on the screen. When I boot from ubuntu live cd I can reboot just fine. I used jaunty, recently I switched to karmic with no change. This bug is very annoying, because I have to hard reset my computer in order to reboot. Also not good for the filesystems, I suspect. Can you suggest a way to debug the cause or if not at least the easiest way to go about reinstalling ubuntu without losing customizations/settings/data?

    Read the article

  • Can't resolve localhost on Mac OS X Server

    - by iainbeeston
    I have a server running OS X Server 10.5 and it can't resolve localhost to 127.0.0.1. When I try ping this is what happens: ping localhost ping: cannot resolve localhost: Unknown host SSH and web browsers get similar results (uknown host). If I try using 127.0.0.1 or the ip address assigned on the LAN all of the above work. Here's the contents of my /etc/hosts file: cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost I have no local DNS service running. Does anyone have any idea why this might be happening or how I can fix it?

    Read the article

  • Notes???????????Web???????????????

    - by atsuko.nishihata
    ??????????????????????????!! 2010?5?20?(?)??????????????????????????????Developer Day????????????? 13:30-14:30 Notes???????????? ????????????????Notes??????????????????! ?????????????????????????????????????????????????????????????????????????????Notes?????????????????????????????????????????????????? 15:00-16:00 Web?????????/????????????? ????????????????????????????????·Web????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????!! ·Oracle Direct Seminar????? ·?????????:?????? ·???????????FAQ

    Read the article

  • Need advice on OOP philosophy

    - by David Jenings
    I'm trying to get the wheels turning on a large project in C#. My previous experience is in Delphi, where by default every form was created at applicaton startup and form references where held in (gasp) global variables. So I'm trying to adapt my thinking to a 100% object oriented environment, and my head is spinning just a little. My app will have a large collection of classes Most of these classes will only really need one instance. So I was thinking: static classes. I'm not really sure why, but much of what I've read here says that if my class is going to hold a state, which I take to mean any property values at all, I should use a singleton structure instead. Okay. But there are people out there who for reasons that escape me, think that singletons are evil too. None of these classes is in danger of being used anywhere except in this program. So they could certainly work fine as regular objects (vs singletons or static classes) Then there's the issue of interaction between objects. I'm tempted to create a Global class full of public static properties referencing the single instances of many of these classes. I've also considered just making them properties (static or instance, not sure which) of the MainForm. Then I'd have each of my classes be aware of the MainForm as Owner. Then the various objects could refer to each other as Owner.Object1, Owner.Object2, etc. I fear I'm running out of electronic ink, or at least taxing the patience of anyone kind enough to have stuck with me this long. I hope I have clearly explained my state of utter confusion. I'm just looking for some advice on best practices in my situation. All input is welcome and appreciated. Thanks in advance, David Jennings

    Read the article

  • Font baseline in Silverlight v3

    - by James
    How do I get the baseline of a font in Silverlight v3. I need to be able to do some simple font metrics so that I can reproduce some online render using an external markup system and make the output looks the same. Silverlight renders fonts from top,left but the external system uses font baseline.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >