Do I have to do anything special to avoid session hijacking using Kohana framework?
(Assuming the session is manipulated only with the Kohana Session library)
Thanks in advance
I am working one Eclipse RCP project where I have got one situation that I wanted to set classpath at runtime. So initially, I can set the classpath
from project\lib\sample.jar file in order to avoid the compilation error. But once the Eclipse RCP application started, and click one update button, a new sample.jar file would be generated at workspace. Now I wanted to update the classpath for newly generated sample.jar from workspace. Which is the best option for setting such a runtime classpath ?
hi,
i'm building a faq page and i want to load the content inside a page page via ajax with jqyery tabs.
i want to avoid to have different pages for every faq so i want to load the content with and anchor. how can i do?
this doesn't work:
Accedo alle offerte online
I'm hashing a large number of files, and to avoid hash collisions, I'm also storing a file's original size - that way, even if there's a hash collision, it's extremely unlikely that the file sizes will also be identical. Is this sound (a hash collision is equally likely to be of any size), or do I need another piece of information (if a collision is more likely to also be the same length as the original).
Or, more generally: Is every file just as likely to produce a particular hash, regardless of original file size?
Hi,
Am using regex.Replace() to replace the whole occurrence of a string.. so I gave like Regex.Replace(str,@stringToReplace,"**"); where stringToReplace = @"session" + "\b";
if i give like that its not replacing.. but if i give like Regex.Replace(str,@"session\b","**"); then its working.. how to avoid this.. i want to pass value which will be set dynamically..
Thanks
nimmi
I do the following when drawing:
Matrix m = new Matrix()
m.Scale(_zoom, _zoom)
e.Graphics.Transform = m
e.Graphics.DrawLine(...) ' line representation
e.Graphics.DrawString(...) ' line text
Now, the text became also scaled. Is it possible to avoid it?
I want to start learning Python - and I'm having trouble getting scripts to load up in a browser (using Wamp). So far I've tried the following:
1: add the following lines to httpd.conf:
AddHandler cgi-script .py
Options ExecCGI
I navigate to
localhost/path/to/script/myscript.py
but get an Internal Server error.
2: downloaded mod_wsgi-win32-ap22py26-3.0.so
- renamed to mod_wsgi (running Wamp with Apache 2.2)
added the following lines to httpd.conf
AddHandler mod_wsgi .py
WSGIScriptAlias /wsgi/ "path/to/my/pythonscripts/folder/"
but when I navigate to the script - it renders the script in it's entirety i.e.
#!c:/Python26/python.exe -u
print "hello world"
I managed to get CherryPy working, but ideally I want to learn the language in a relatively raw context before digging into a framework. Can anyone give me some pointers?
Hi all,
I recently downloaded the Windows API code pack for .net, and seeing there was VB.net examples inside there, I opened them up. Upon building I get a warning that the referenced components 'Core' and 'Shell' could not be found. Looking in the code pack folder I see there are no DLLs at all, but instead a whole load of C# sources.
Do I have to download C# Express (which I want to avoid) to use the code pack or are there precompiled DLLs somewhere?
Hello colleagues!
Googling today I couldn't found sample or mentioning of best practice: how to escape user input in Struts2.
Of course I can manually convert characters on validate() method, but it looks too obvious. So may be exists some automation to avoid code/script injection?
The installer I'm writing using WiX 3.0 uses a RegistryValue element to modify an existing registry value (originally written by our main product). I'm trying to figure out a way to restore the registry value when the user uninstalls my utility. I'd like to avoid using a custom action, but that might be the only recourse? TIA.
The library in question is Tokyo Cabinet.
I want is to have the native library, JNI library, and all Java API classes in one JAR file to avoid redistribution headaches.
There seems to be an attempt at this at GitHub, but
It does not include the actual native library, only JNI library.
It doesn't work (for me): when I use this JAR, the JVM does not even seem to find the JNI library which is packaged inside the JAR:
java.lang.UnsatisfiedLinkError: no jtokyocabinet in java.library.path (tokyo_cabinet.clj:19)
I'm trying to avoid using a long else if statement.
Lets say I have an object and I want to test if it's of type ClassA, ClassB, ClassC, etc..?
What is a clean way of doing this?
Is there any benefit to developing on a case sensitive file system?
I recently heard that Adobe products do not run on case sensitive file systems. Is developing on a case-sensitive file system the simplest way to avoid such problems?
If you have a modular applicaiton that depends on its modules to be in seperate libraries ( dlls ).
What kind of Re-deployment
strategy would be good to follow?
The application is installed using the Setup Project that is available in Visual Studio.
I would like to avoid the copy and paste approach!
I'm looking to save some data in the Magento database without hassling with creating a new EAV object (or even a DB table if I can avoid it). Is there any place that you all know about that Magento will let you store serialized data?
If it matters, the data is a serialized set of SKUs that I need to retrieve. I know that I could create a new model, or possibly even create an attribute as a flag on each product, but those are both really overkill for my purposes.
Thanks,
Joe
I need to start reading The TCP/IP Guide.
I have to admit that compared to other informative guides/tutorials/articles out there, this guide isn't so cluttered. However, I still find it a little bit hard to read, especially when reading for several hours.
I don't know if it's the font, the contrast or the spacing, but this is why I've always preferred learning from books rather than from the internet.
What can I do to make this guide more readable? I am reading it on Google Chrome.
I have a RESX resource file that I can retrieve the values out of using the strongly typed properties and assign to values in my Silverlight 3 app. However at runtime I need to generate the lookup key based on some values to avoid a ton of if/switch statements. I'm trying to use the ResourceManager, but it doesn't like .resx files.
Searched far and wide... is this just not possible in SL3? Does anyone have another suggestion?
I happened to find this code return 5. It's OK to write it this way or should definitely be avoid?
int& f() {
int i = 5;
return i;
}
int main(){
cout<<f()<<endl;
}
I am passing variable to template in web.py and have the same condition in some places. Like this:
$if myvar=="string1":
$passed argument1
............
$if myvar =="striung2":
$passed argument2
If say myvar is "string1" and I pass passed = "AAA" then I have AAA argument1 on my page, but the other if statements get replaced by empty string?
How to avoid that? I.e. how to leave other statements intact?
I would like to know if it is technically possible to resize an image at a client-side with javascript (really resize, not just change width and height). I know it's possible to do it in flash but I would like to avoid it if possible. Is there any open source algorithm somewhere on the web?
I'm building a small chat application to add to an existing framework. There will only be 20-50 users MAX at any one time. I was wondering if I could get away with updating a cache file containing (semi) live chat data for whichever users happen to be chatting just by performing timed queries and regular AJAX refreshes for new data as opposed to learning how to open and maintain a socket connection.
I'm sure there are existing chat plug-ins out there. But I just had a hell of a time installing one and I could see building the whole damn thing taking just as much time as plugging one in.
Am I off to a bad start?
Thanks in advance -J
(p.s. this is a semi closed network behind a php login so security isn't a great concern)
I know about the boolean column type, but is there a boolean literal in SQLite? In other languages, this might be true or false. Obviously, I can use 0 and 1, but I tend to avoid so-called "magic numbers" where possible.
From this list, it seems like it might exist in other SQL implementations, but not SQLite. (I'm using SQLite 3.6.10, for what it's worth.)
Hi,
I am trying to play continuous stream using android mediaplayer.but am not able to avoid gap in playback while updating the datasource file of mediaplayer.Hw can i overcome this problem?
Thanks in advance
In java adjectives ending in -able are interfaces Serializable, Comparable etc... So why is Throwable a class? Wouldn't exception handling be easier if Throwable were an interface?
Obviously, changing it now is out the question. But could it be made abstract? Wouldn't that avoid the bad practice of throw new Throwable();
In the installation instructions for Yii it is nescessary to use console and command line utility - yiic.
Well, on my shared hosting I don't have ssh access.
This is why I have following questions:
How often and for what reasons will I have to use console?
Is there a way to avoid using yiic?
May I run yiic on local server and then just transfer everything to the final web server?
Thanks!