I missed the application period for this year's Google Summer of Code.
I'm wondering if there's any other open source program like that somewhere, perhaps for fall or winter?
What's the best way to sanitise user input for a Python-based web application? Is there a single function to remove HTML characters and any other necessary characters combinations to ensure that an XSS or SQL injection attack isn't possible?
Hi
I have a table with a column event_time. How can I select two rows right before NOW() and the next one after NOW(), ordered by event_time?
Is is possible with a single query?
For adding instrumentation roots to a Profiler, I need to write the method signature.
For example, in case of the method:
String toString()
The VM Method signature is
()Ljava/lang/String;
Question is, is there any way to check such signatures in Eclipse if you have the source code? Is there any shortcut to see this?
I am trying to create some dynamic html out of some data from db. My data returned from db is:
ApplicationName URL
AppName1 URL1
AppName2 URL1
AppName2 URL2
AppName1 URL2
I want that all URL's for a single application should be rendered under one heading of ApplicationName. Like:
AppName1
URL1
URL2
AppName2
URL1
URL2
Can anyone help me in the code for this?
I have an Access database and the source of data comes from generated CSV files. I'd like to have an easy way for the users to simply select the data file and import it. Import should append the existing data to the data already in the data table. Is there a way in Access to create a file selector and import using saved CSV import settings that are already in the file?
Python's SimpleHTTPServer is a great way of serve the contents of the current directory from the command line:
python -m SimpleHTTPServer
However, as far as web servers go, it's very slooooow...
It behaves as though it's single threaded, and occasionally causes timeout errors when loading JavaScript AMD modules using RequireJS. It can take five to ten seconds to load a simple page with no images.
What's a faster alternative that is just as convenient?
i am taking an image from a source, say, facebook.
now when i want to insert that image in a container with fixed width and height, the image stretches to fit that space. is there a way the image can display in its normal size and the rest of the area clipped out?
Can someone explain me the way reusable cells works for single table view?
How many reusable cells a datasource should create? So far in all samples I've seen only one. Would one even need more?
In my javascript I create my <OBJECT> tag
var htmlEmbedSilverlight = "<div id='silverlightControlHost'> "
+ "<object data='data:application/x-silverlight-2,' type='application/x-silverlight-2' width='550px' height='250px'> "
+ "<param name='source' value='../../ClientBin/FotoEmprestimoChave.xap'/> "
+ "<param name='onError' value='onSilverlightError' /> "
+ "<param name='background' value='white' /> "
+ "<param name='minRuntimeVersion' value='4.0.60310.0' /> "
+ "<param name='autoUpgrade' value='true' /> "
+ "<param name='initparams' values='chave_id=" + data + "' /> "
+ "<a href='http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.60310.0' style='text-decoration:none'> "
+ "<img src='http://go.microsoft.com/fwlink/?LinkId=161376' alt='Get Microsoft Silverlight' style='border-style:none'/> "
+ "</a> "
+ "</object><iframe id='_sl_historyFrame' style='visibility:hidden;height:0px;width:0px;border:0px'></iframe></div>";
$("#tiraFotoSilverlight").html(htmlEmbedSilverlight);
This is a reference to my Silverlight application where I call in my Web Application. The problem is my <param name='initparams' values='chave_id=" + data + "' /> " because in my App.xaml in Silverlight, I have the code below
private void Application_Startup(object sender, StartupEventArgs e)
{
if (e.InitParams != null)
{
foreach (var item in e.InitParams)
{
this.Resources.Add(item.Key, item.Value);
}
}
this.RootVisual = new MainPage();
}
Where InitParams always has Count = 0 and I don't know why. Can someone help me ? I'm just trying to pass a value to my Silverlight application, without a PostBack.
Rendered
<object width="550px" height="250px" type="application/x-silverlight-2" data="data:application/x-silverlight-2,">
<param value="../../ClientBin/FotoEmprestimoChave.xap" name="source">
<param value="onSilverlightError" name="onError">
<param value="white" name="background">
<param value="4.0.60310.0" name="minRuntimeVersion">
<param value="true" name="autoUpgrade">
<param values="chave_id=1" name="initparams">
<a style="text-decoration:none" href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.60310.0">
</object>
I need to send post message to iframe.
currently its working if i have single iframe inside parent page.But I want to make it work for nested iframes.
Criterias are :
I can just add listener code in last leaf iframe.
Do not know length of iframe nesting.
Need both way communication , from parent to child also by leaf iframe to parent.
I am sick of third part iframes , please suggest me some appropriate solution.
My C# application throws a System.IO.IOExcepton (The directory name is invalid) for the following code for implementing a filewatcher:
public void OnChanged(object source, FileSystemEventArgs e)
{
DirectoryInfo dList = new DirectoryInfo(e.FullPath);
FileInfo[] TxtFiles = dList.GetFiles("*.TXT");
}
e.FullPath is "C:/Documents and Settings/Bi/Application Data/TestApp/Reports\\0MA01P62240_000005798_TRI_4947712701738551.TXT".
If you notice it seems to append a "\\" to the path when it tracks the file. Any idea what the problem may be?
Thanks
I have a simple query over a table, which returns results like the following:
id id_type id_ref
2702 5 31
2702 16 14
2702 17 3
2702 40 1
2702 26 4
And I would like to merge the results into a single row, for instance:
id concatenation
2702 5,16,17,40,26:31,14,3,1,4
Is there any way to do this within a trigger?
NB: I know I can use a cursor, but I would really prefer not to unless there is no better way.
I'm trying to use the gdata java client library on android and have managed a decent hack to get it working. However because the jar for gdata had some package discrepancies with android I had to import the source into my project. This source is dependent on the JavaMail API and the JavaBeans Activation Framework as specified here.
My issue is that the JavaMail jar throws a class definition not found when seeking a class which is in the Activation Framework jar. A stack trace is listed below. I am working in Eclipse and have both jars in a lib folder and added to my build path. I'm not very experienced dealing with jars in a situation like this so any help or insight would be appreciated.
03-29 09:55:26.204: ERROR/AndroidRuntime(331): Uncaught handler: thread AsyncTask #3 exiting due to uncaught exception
03-29 09:55:26.215: ERROR/AndroidRuntime(331): java.lang.RuntimeException: An error occured while executing doInBackground()
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at android.os.AsyncTask$3.done(AsyncTask.java:200)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.lang.Thread.run(Thread.java:1096)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): Caused by: java.lang.NoClassDefFoundError: javax.activation.DataHandler
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at javax.mail.internet.MimeBodyPart.setContent(MimeBodyPart.java:684)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at com.google.gdata.data.media.MediaBodyPart.<init>(MediaBodyPart.java:95)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at com.google.gdata.data.media.MediaMultipart.<init>(MediaMultipart.java:126)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at com.google.gdata.client.media.MediaService.insert(MediaService.java:382)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at android.os.AsyncTask$2.call(AsyncTask.java:185)
03-29 09:55:26.215: ERROR/AndroidRuntime(331): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
hi..
i want to log messages from multiple classes. the problem is that currently i can log all messages into single file.i want to do this class A should log its messages into ALog.txt and class B should log its messages into BLog.txt
please tell me the sample config file for these settings
After using Git from the command line for a while, I am ready for the convenience a GUI plugin (for Eclipse) can offer.
However, I prefer a Git plugin similar to to MS Visual Studio's Git Source Control Provider which is only a wrapper around the already installed msysgit. I really don't want two different Git implementations accessing the same repository.
EGit sounds perfect - if it can use the already installed msysgit in my PC.
But can it?
What compiler tools and supporting libraries are available that would help in implementing a compiler targeting .NET and the CLR? Preferably open source. I am especially interested in frameworks that implement a high-level IR and support for common high-level and middle-level optimizations.
I am creating an desktop application which is capable of sending emails. I downloaded mail.jar and javaee.jar and added it to my project libraries. However, when I am trying to use it, it gives me the error
java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Uncompilable source code - package javax.mail does not exist
I imported those packages as,
import javax.mail.*
It added correctly, as shown in the following image. Please help!! How can I make this work?
Hi,
I have started out with macvim and now fairly comfortable with the navigation (on a single file) and now I need to write a whole project (say rails) using mvim.
In textmate, you have mate project_dir which opens the project in a side drawer, so my question is:
Is there a similar feature in mvim?
How can a complete project managed in traditionally in macvim?
Links to some write-ups are welcomed.
Hi,
I'm wondering if someone knows how to store an array into a user session?
This is the method to store a single attribute:
$this->getUser()->setAttribute('something', $something);
And the documentation says:
"User attributes can store any type of data (strings, arrays, and associative arrays)"
... but doesn't say anything more. The API documentation doesn't have a "SetAttributes" or something similarly obvious.
Thank you.
Hi,
I'm trying to create a single custom UITableViewCell from a xib, among other normal UITableViewCell's. I've tried quite a few varied things with no success. Can anyone help me please?
I want to log some seemingly random errors I'm getting in a Delphi written COM DLL. How do I do this? Is it possible to use the Application.OnException event handler? I have control of the COM DLL source, but not the calling application.
I have a server that is only SSH-accessible to machines within a network and my only access to that network from the outside world is a single publicly-SSH-accessible node. Is there some way that I can mount the nested machine from the outside?
Me - Public SSH-accessible Node - Internal SSH-accessible Machine
Thanks!