Search Results

Search found 55 results on 3 pages for 'frederik creemers'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • That assembly does not allow partially trusted callers although the zone is fully trusted.

    - by Frederik Gheysels
    Since yesterday, I receive a security exception when I want to run a unit-test from within VS.NET 2008. The error goes like this: SecurityException: that assembly does not allow partially trusted callers ... The assembly that failed was : file:///S:/MyProject/MyAssembly.dll The S: drive is a mapped drive which points to a physical location on my disk. What I find very strange, is that this used to work for months previously. I mean, I did this all the time. In order to get this to work, I 've created a new security zone with the caspol utility in order to give this S: network share drive FullTrust. In other words, when I run caspol -m -lg I see this (I removed the other zones for the sake of brevity): 1.2. Zone - Intranet: LocalIntranet 1.2.1. All code: Same site Web 1.2.2. All code: Same directory FileIO - 'Read, PathDiscovery' 1.2.3. Url - file://R:/*: FullTrust 1.2.4. Url - file://S:/*: FullTrust 1.2.5. Url - file:///S:/*: FullTrust I've added the 1.2.5 zone just recently because the error that was given, mentionned file:///s:/.... Any ideas ? Could it be that this has something to do with the installation of VS.NET 2010 or the .NET Framework version 4.0 ?

    Read the article

  • Choosing random numbers efficiently

    - by Frederik Wordenskjold
    I have a method, which uses random samples to approximate a calculation. This method is called millions of times, so its very important that the process of choosing the random numbers is efficient. I'm not sure how fast javas Random().nextInt really are, but my program does not seem to benefit as much as I would like it too. When choosing the random numbers, I do the following (in semi pseudo-code): // Repeat this 300000 times Set set = new Set(); while(set.length != 5) set.add(randomNumber(MIN,MAX)); Now, this obviously has a bad worst-case running time, as the random-function in theory can add duplicated numbers for an eternity, thus staying in the while-loop forever. However, the numbers are chosen from {0..45}, so a duplicated value is for the most part unlikely. When I use the above method, its only 40% faster than my other method, which does not approximate, but yields the correct result. This is ran ~ 1 million times, so I was expecting this new method to be at least 50% faster. Do you have any suggestions for a faster method? Or maybe you know of a more efficient way of generation a set of random numbers.

    Read the article

  • Set the focus on Popup Panel

    - by Jan-Frederik Carl
    Hello, I use a modalpopupextender to show a popup when the user clicks on a button. <ajaxToolkit:ModalPopupExtender ID="mpe1" runat="server" TargetControlID="statusInfoLb" PopupControlID="statusInfoPanel" DropShadow="false" OkControlID="okBtn" OnOkScript="onOk()"> </ajaxToolkit:ModalPopupExtender> <asp:Panel ID="statusInfoPanel" runat="server" Height="185px" Width="454px" SkinID="Panel_Notification2" DefaultButton="okBtn"> The panel has an OK-Button to dispose the popup. It is also possible to click Return to dispose the popup, because the panel has the property DefaultButton="okBtn". But this only works when the popup has the focus, which is not so from the start. How do I get the popup panel to have the focus when it shows? I would like to use jQuery.

    Read the article

  • Deeplinking with SWFAddress and Facebook connect

    - by Frederik
    After prompting the user for the login and submitting it's details, my application appears in the facebook lightbox instead of the browser window. This is not the case when I remove the SWFAddress params (all the info after the hash in the URL bar). Is it possible to tell the API to ignore the info after the hash or is there a way i can determine the redirect URL myself? Any help would be greatly appreciated,

    Read the article

  • table with black outer, but grey inner border

    - by Jan-Frederik Carl
    Hello, I want to create a html table with a 1pt black outer border and the same border around every td. Should look like this (only the borders, of course) link text I use <table border="1" style="border-collapse:collapse; border-color:Black; border-style:solid; border-width:1pt"> As a result I get a black outer, but grey inner borders.

    Read the article

  • java.sql.SQLException: Parameter number X is not an OUT parameter

    - by Frederik
    Hi guys, I'm struggling with getting the result OUT variable from a MySQL stored procedure. I get the following error: java.sql.SQLException: Parameter number 3 is not an OUT parameter The stored procedure looks like this: CREATE DEFINER=`cv_admin`@`localhost` PROCEDURE `CheckGameEligibility`( IN gID INT(10), IN uID INT(10), OUT result TINYINT(1) ) BEGIN # Do lots of stuff, then eventually: SET result = 1; END My java function takes an array of strings* and creates the CallableStatement object dynamically: public static int callAndReturnResult( String sql , String[] values ) { int out = 0 ; try { // construct the SQL. Creates: CheckGameEligibility(?, ?, ?) sql += "(" ; for( int i = 0 ; i < values.length ; i++ ) { sql += "?, " ; } sql += "?)" ; System.out.println( "callAndReturnResult("+sql+"): constructed SQL: " + sql ); // Then the statement CallableStatement cstmt = DB.prepareCall( sql ); for( int i = 0 ; i < values.length ; i++ ) { System.out.println( " " + (i+1) + ": " + values[ i ] ) ; cstmt.setString(i+1, values[ i ] ); } System.out.println( " " + (values.length+1) + ": ? (OUT)" ) ; cstmt.registerOutParameter( values.length + 1 , Types.TINYINT ); cstmt.execute(); out = cstmt.getInt( values.length ); cstmt.close(); } catch( Exception e ) { System.out.println( "*** db trouble: callAndReturnResult(" + sql + " failed: " + e ); e.printStackTrace() ; } return out ; } *) I suppose I should be using an int array instead of a string array, but it doesn't seem to be what the error message was about. Anyway, here's the output it generates: callAndReturnResult(CheckGameEligibility(?, ?, ?)): constructed SQL: CheckGameEligibility(?, ?, ?) 1: 57 2: 29 3: ? (OUT) *** db trouble: callAndReturnResult(CheckGameEligibility(?, ?, ?) failed: java.sql.SQLException: Parameter number 3 is not an OUT parameter at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:929) at com.mysql.jdbc.CallableStatement.checkIsOutputParam(CallableStatement.java:692) at com.mysql.jdbc.CallableStatement.registerOutParameter(CallableStatement.java:1847) at org.apache.commons.dbcp.DelegatingCallableStatement.registerOutParameter(DelegatingCallabl>eStatement.java:92) at Tools.callAndReturnResult(Tools.java:156) Any ideas what might be the problem? :) Thanks in advance!

    Read the article

  • How to keep the highlight border of a JComponent, when custom border is set

    - by Frederik Wordenskjold
    I have a JTextField, where I've set some custom properties: nameField.setPreferredSize(new Dimension(275,40)); nameField.setBackground(bgColor); nameField.setForeground(txtColor); nameField.setFont(new Font("HelveticaNeue",Font.PLAIN,22)); nameField.setBorder(BorderFactory.createLineBorder(Color.WHITE, 2)); When the component has focus, there is no highlight shown around the field. On a Mac, it is usually a blue glowing rectangle, indicating that this component has focus. If I comment out the nameField.setBorder(...), the highlight reappears. How do I keep the highlight, but also my custom border!? Basically, I just want the highlight-border to show when the component has focus, and no border when the component is unfocused.

    Read the article

  • Remove GridView row with jQuery

    - by Jan-Frederik Carl
    Hello, I have a GridView and a asp:TextBox containing a Number. The GridView also contains cells with numbers (one in each row). I want to know wether a cell contains this number and if so, the whole row has to be removed. I want to do this via jQuery.

    Read the article

  • Connection reset when calling disconnect() using enterprisedt's ftp java framework

    - by Frederik Wordenskjold
    I'm having trouble disconnecting from a ftp-server, using the enterprisedt java ftp framework. I can simply not call disconnect() on a FileTransferClient object without getting an error. I do not do anything, besides connecting to the server, and then disconnecting: // create client log.info("Creating FTP client"); ftp = new FileTransferClient(); // set remote host log.info("Setting remote host"); ftp.setRemoteHost(host); ftp.setUserName(username); ftp.setPassword(password); // connect to the server log.info("Connecting to server " + host); ftp.connect(); log.info("Connected and logged in to server " + host); // Shut down client log.info("Quitting client"); ftp.disconnect(); log.info("Example complete"); When running this, the log reads: INFO [test] 28 maj 2010 16:57:20.216 : Creating FTP client INFO [test] 28 maj 2010 16:57:20.263 : Setting remote host INFO [test] 28 maj 2010 16:57:20.263 : Connecting to server x INFO [test] 28 maj 2010 16:57:20.979 : Connected and logged in to server x INFO [test] 28 maj 2010 16:57:20.979 : Quitting client ERROR [FTPControlSocket] 28 maj 2010 16:57:21.026 : Read failed ('' read so far) And the stacktrace: com.enterprisedt.net.ftp.ControlChannelIOException: Connection reset at com.enterprisedt.net.ftp.FTPControlSocket.readLine(FTPControlSocket.java:1029) at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:1089) at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:988) at com.enterprisedt.net.ftp.FTPClient.quit(FTPClient.java:4044) at com.enterprisedt.net.ftp.FileTransferClient.disconnect(FileTransferClient.java:1034) at test.main(test.java:46) It should be noted, that I without problems can connect, and do stuff with the server, like getting a list of files in the current working directory. But I cant, for some reason, disconnect! I've tried using both active and passive mode. The above example is by the way copy/pasted from their own example. I cannot fint ANYTHING related to this by doing a Google-search, so I was hoping you have any suggestions, or experience with this issue.

    Read the article

  • How do I convert CamelCase into human-readable names in Java?

    - by Frederik
    I'd like to write a method that converts CamelCase into a human-readable name. Here's the test case: public void testSplitCamelCase() { assertEquals("lowercase", splitCamelCase("lowercase")); assertEquals("Class", splitCamelCase("Class")); assertEquals("My Class", splitCamelCase("MyClass")); assertEquals("HTML", splitCamelCase("HTML")); assertEquals("PDF Loader", splitCamelCase("PDFLoader")); assertEquals("A String", splitCamelCase("AString")); assertEquals("Simple XML Parser", splitCamelCase("SimpleXMLParser")); assertEquals("GL 11 Version", splitCamelCase("GL11Version")); }

    Read the article

  • Latex: Text cannot be placed below image

    - by Frederik Wordenskjold
    I love latex! But sometimes, it does not love me... I'm having a problem with an image and some text. I have this code: Some text...\\ \begin{figure}[ht] \centering \includegraphics[scale=0.75]{picture.jpg} \caption{The caption} \label{fig:picture} \end{figure} Some more text... Basically, I want this: Some text. (Above image in the code) [end of page / new page] image Some more text. (Below the image in the code) [start of new section] But, what the above code gives me is this: Some text. (Above image in the code) Some more text. (Below the image in the code) [end of page / new page] image [start of new section] Latex insists on putting everything but a new section above the image even though its below the image in the code. Its probably because the image floats on top - but whats my alternative? There's not enough space on the first page to display the image there, to I cannot use [h] as the float-alignment. I can "hack it", by creating an empty new section, like \section*{}, but this creates some white-space, which looks weird. Any suggestions?

    Read the article

  • ASP.NET Custom Validator Error Message: Control referenced by the property cannot be validated

    - by Jan-Frederik Carl
    Hello, I use ASP.NET and have a Button and a CustomValidator, which has to validate the button. <asp:Button ID="saveButton" runat="server" OnClick="SaveButton_Click" Text="Speichern" CausesValidation="true"/> <asp:CustomValidator runat="server" ID="saveCValidator" Display="Static" OnServerValidate="EditPriceCValidator_ServerValidate" ControlToValidate="saveButton" ErrorMessage=""> When loading the page, I receive the error message: "Control 'saveButton' referenced by the ControlToValidate property of 'saveCValidator' cannot be validated." What might be the problem? I searched on the net, but this didn´t help much.

    Read the article

  • Compare term to current date in HQL (with .Net)

    - by Jan-Frederik Carl
    Hello, I want to compare a column value to the current date, using HQL. I tried IQuery someQuery = session.CreateQuery(String.Format( @"Select s.Id From InventoryProductStateItem s where s.ValidFrom < current_date()")); This throws the exception "Incorrect syntax near keyword current_date()" Can someone help me?

    Read the article

  • Why is the destructor called when the CPython garbage collector is disabled?

    - by Frederik
    I'm trying to understand the internals of the CPython garbage collector, specifically when the destructor is called. So far, the behavior is intuitive, but the following case trips me up: Disable the GC. Create an object, then remove a reference to it. The object is destroyed and the __del__ method is called. I thought this would only happen if the garbage collector was enabled. Can someone explain why this happens? Is there a way to defer calling the destructor? import gc import unittest _destroyed = False class MyClass(object): def __del__(self): global _destroyed _destroyed = True class GarbageCollectionTest(unittest.TestCase): def testExplicitGarbageCollection(self): gc.disable() ref = MyClass() ref = None # The next test fails. # The object is automatically destroyed even with the collector turned off. self.assertFalse(_destroyed) gc.collect() self.assertTrue(_destroyed) if __name__=='__main__': unittest.main() Disclaimer: this code is not meant for production -- I've already noted that this is very implementation-specific and does not work on Jython.

    Read the article

  • JQuery UI datepicker in Asp.Net MVC

    - by Frederik
    I have tried to use some of the widgets in JQuery UI on an Asp.Net MVC site without luck. For example the basic datepicker from jQuery UI - functional demos. I have created a simple MVC project and added the script references in Site.Master like this: <script src="../../Scripts/jquery-1.2.6.min.js" type="text/javascript"></script> <script src="../../Scripts/jquery-ui-personalized-1.5.3.min.js" type="text/javascript"></script> <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> <link href="../../Content/ui.datepicker.css" rel="stylesheet" type="text/css" />" In the Index.aspx file I have cleared all default content and added the following: <script type="text/javascript"> $("#basics").datepicker(); </script> <input type="text" size="10" value="click here" id="basics"/> The core jQuery works fine. Any clues?

    Read the article

  • Read out result of a PageMethod into a jQuery-script

    - by Jan-Frederik Carl
    Hello, I am quite a jQuery novice and try to read out the result of a PageMethod into my jQuery script. I have a ScriptManager installed and the following WebMethod: [WebMethod(EnableSession = true)] public static string CheckSystemDefault(string _id) { int id = Convert.ToInt16(_id); addressTypeRepository = new AddressTypeRepository(); AddressType addressType = addressTypeRepository.GetById(id); if (addressType.IsSystemDefault == true) return "IsSystemDefault"; else return "IsNotSystemDefault"; } I use this to check if an object has the property IsSystemDefault. In the script, I hand over the id from the url and want to evaluate the result: var id = $(document).getUrlParam("id"); var check = PageMethods.CheckSystemDefault(id); if (check == "IsSystemDefault") { ... } if (check == "IsNotSystemDefault") { ... } But as a result, the variable "check" is undefined. What do I have to change?

    Read the article

  • Add row to GridView after header row

    - by Jan-Frederik Carl
    I have a GridView with a header and some rows and want to add another row just below the header using jQuery. <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" ShowHeader="true" runat="server"> <Columns> <asp:TemplateField HeaderText="Activity Name"> <ItemTemplate> <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:Button Text="Add Activity" runat="server" OnClientClick="addActivity(); return false;" /> </div> </form> My tries were $('#GridView1 tbody').prepend('<tr><td>new activity</td></tr>'); Puts a new row above the header $('#GridView1 table tr:first').after('<tr><td>new activity</td></tr>'); Does nothing (at least nothing visible, as well with any other tr element)

    Read the article

  • css coding on Myspace - Problem

    - by Frederik Wessberg
    Hey Folks. I've read what I could, and I'm certainly no master, but I'm fixing up a colleagues profile on myspace.com, and im working with 2 divs in each side of the screen, and I want them to align so that they are next to each other. I've tried float: left; and float: right;, and I've tried margin: right; on div 1 and such. Could you help? Here's the site: http://www.myspace.com/jonasjohansen This is info for div1: <div class="textBox" align="left" style="width: 290px; word-wrap:break-word"> <span class="orangetext15"> BANDS </span> <b>MOVE</b><br /> Fredrik ....balbalbalbla </div> <style> .textBox { position: relative; left:-320px; top:0px; width: 290px; height: 350px; overflow-y: visible; overflow-x: visible; top: YYYpx; z-index: 3; background-color: transparent; border:none; } </style> This is info for div2: <style>.i {display:none;}{!-eliminate bio header!-}table table td.text table td.text {display:none;}{!-recover in shows and friends-!}table table td.text div table td.text,table table td.text table.friendSpace td.text {display:inline;}{! move up our custom section. You may change px value !}div.myDivR {position:relative; top:0px; margin-bottom:-300px; }{! you can apply style to the custom div !}div.myDivR {background-color:white; border:2px solid; border-color:darkgreen; float: right;}</style></td></tr></table></td></tr></table><span class="off">Re-Open Bio Table give it our own Class </span><table class="myBio" style="width:435px;"><tr><i class="i"></i><td class="myBioHead" valign="center" align="left" width="auto" bgcolor="ffcc99" height="17"> &nbsp;&nbsp;<span class="orangetext15"> ABOUT JONAS JOHANSEN</span> </td></tr><tr><td><table class="myBioI"><tr><td><span class="off"></span> blalbalbalbalbla <span class="off">END Bio Content </span>

    Read the article

  • NHibernate's ISQLQuery returns instances that are of an unexpected type.

    - by Frederik Gheysels
    Hi all, I'm using NHibernate 2.1.2.400, and I'm having an issue with a an ISQLQuery query. The reason why I use an ISQLQuery here, is that this query uses a table for which I have no entity mapped in NHibernate. The query looks like this: ISQLQuery query = session.CreateSQLQuery ( "select p.*, price.* " + "from prestation p left outer join prestationprice price on p.PrestationId = price.PrestationId " + "where p.Id IN ( select id from prestationregistry where ..."); 'Prestationregistry' is the table that is not known by NHibernate (unmapped, so therefore the native SQL Query). my code continues like this: query.AddEntity ("p", typeof(Prestation)); query.AddJoin ("price", typeof(PrestationPrice)); query.SetResultTransformer (Transformers.DistinctRootEntity); var result = query.List(); So far so good. I expect that I'm given a list of 'Prestation' instances as a result of this query, since I declared 'Prestation' as being the root-object that has to be returned by the AddEntity method. I also expect that the PrestationPrices for each Prestation are eagerly loaded by this query (hence the AddJoin method). To my surprise, the List() method returns a collection of PrestationPrice instances instead of Prestation instances. How come ? Am I doing something wrong ? And if so, could you be so kind to tell me what I'm doing wrong ? Edit: Additional Info: When I debug, and put a watch on the 'query' instance, I can see that the queryReturns member of the query contains 2 items: - one NativeSqlQueryRootReturn instance who'se ReturnEntityName is 'Prestation' - one NativeSqlQueryJoinReturn When I do not specify the 'DistinctRootEntity' result transformer, the query returns instances of 'Prestation' instead of PrestationPrice. However, it contains multiple copies of the same instance.

    Read the article

  • SQL Query in NHibernate diction

    - by Jan-Frederik Carl
    I have a SQL Query which works in SQL Management Studio: Select Id From table t Where t.Date= (Select Max(Date) From ( Select * From table where ReferenceId = xy) u) Reason is, from all entries with a certain foreign key, I want to receive the one with the highest date. I tried to reform this Query for use in NHibernate, and I got IQuery query = session.CreateQuery(String.Format( @"Select t.Id From table t Where t.Date = (Select Max(Date) From (Select * From table t where t.ReferenceItem.Id = " + item.ReferenceItem.Id + ")u)")); I get the error message: "In expected" How do I have to form the NHibernate query? What does the "In" mean?

    Read the article

  • Confirm box always displays first (javascript, jQuery, .Net)

    - by Jan-Frederik Carl
    Hello, I have a jQuery-Script to accomplish the following tasks: if a gridview in my form contains a row with a certain id, it has to be marked red. a confirm dialogue has to pop up to ask the user if he wants to do this or that. I built this code: if (response == "EntryInList") { $('#entryListContainer div table tbody tr').each(function() { if ($(this).attr('id') == 'entry_' + $('#<%= txtProductNumber.ClientID %>').val()) { $(this).css("color", "red"); } } ); if (!confirm("Entry already exists. Really overwrite?")) { jQuery('#<%= txtProductNumber.ClientID %>').val(''); jQuery('#<%= txtCount.ClientID %>').val(''); jQuery('#<%= txtProductNumber.ClientID %>').focus(); return false; } } As a result, the confirm box pops up first, without the row being turned red. Only after using the box, it becomes red. How would I get the row to be turned red at once? Another of my problems is that the confirm box denies my page to be scrolled down. But I would like to do this if the gridview is longer than the entire page.

    Read the article

  • Change size of ImageIcon in a JRadioButton

    - by Frederik Wordenskjold
    I simply want to change the size (diameter) of the actual (default) ImageIcon of my JRadioButton. I've changed the size of the font displayed in the widget, so it really looks silly with such a large radiobutton. JRadioButton button = new JRadioButton("Button"); button.setFont(new Font("Lucida Grande",Font.PLAIN, 11)); gives me this giant button: Do I really have to create my own ImageIcon? Or can I somehow scale the default one, without too much of a hassle?

    Read the article

  • Preferred data-format for user-data in java applications?

    - by Frederik Wordenskjold
    I'm currently developing a desktop application in java, which stores user data such as bookmarks for ftp-servers. When deciding how to save these informations, I ended up using xml, simply because I like the way xpath works. I was thinking about json too, which seems more lightweight. What is your preferred way to store data in java desktop applications (in general) and why? What about java-persistence, does that have any advantages worth noting? And how much does the size of user data matter? Its not always possible to store data in a database (or preferable), and in my experience xml does not scale well. Let me know what you think!

    Read the article

  • jQuery code not executed

    - by Jan-Frederik Carl
    Hello, I would like to rephrase my previous question which no one could answer. My problem is that a jQuery-script does not execute a command though it "runs" it. I can see it in the debug mode where the debugger hits the command. Nonetheless, the command is not executed.

    Read the article

< Previous Page | 1 2 3  | Next Page >