Search Results

Search found 102 results on 5 pages for 'marius jonsson'.

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

  • SharePoint View to automatically show only the current month?

    - by Marius
    I need to create a view that will automatically change from month to month to show only the current month (i.e. if current month is July - show items posted in July). Currently I have a view set up, but I have to manually change the month each time it changes (it's set up based on the first day of the current month and the last day of current month). Thanks

    Read the article

  • java applet stops running on exceptions

    - by Marius
    I've developed a simple applet that imports an image from the clipboard. When i run the class file from NetBeans, everything works fine. But when i try to run it as an applet ... it gives me lots of errors in the java console and does not run ... - The applet is signed - There is a static method in one class, called getImageFromClipboard(). When the applet runs, it calls this method. - getImageFromClipboard() method has a try-catch block and suppresses all errors. It simply returns either a BufferedImage or null. - When applet runs, it does some visual adjustments before calling getImageFromClipboard() Now the scenario is as follows: the class from netbeans runs, fails to import the image and adjusts the interface accordingly (displays an error in a label) But when i run it in a browser, java console is filled with errors and nothing after the getImageFromClipboard() line works. Although the applet itself loads and does everything it's supposed do do before importing the image. So why am i getting errors if i accept the certificate and all of the possible errors are in try-catch blocks? None of this code should throw any exceptions. Any ideas why this is happening? Or do you need to see the errors to tell? UPDATE I've managed to find out the problem myself. The class that i'm using is not in the jar file :( How do i add it in? I'm using "add jar folder" in netbeans on the libraries package to import it but it does not seem to get copied to the jar.

    Read the article

  • jQuery: Counter, Tricky problem with effects for brainy people.

    - by Marius
    Hello there! I made this counter that I think is cool because it only makes visible changes to the numbers being changed between each time it is triggered. This is the code // counter $('a').click(function(){ var u = ''; var newStr = ''; $('.counter').each(function(){ var len = $(this).children('span').length; $(this).children('span').each(function(){ u = u + $(this).text(); }); v = parseInt(u) + 1; v = v + ''; for (i=v.length - 1; i >= 0; i--) { if (v.charAt(i) == u.charAt(i)) { break; } } slce = len - (v.length - (i + 1)) updates = $(this).children('span').slice(slce); $(updates).fadeTo(100,0).delay(100).each(function(index){ f = i + 1 + index; $(this).text(v.charAt(f)); }).fadeTo(100,1); }); }); Markup: <span class="counter"> <span></span><span></span><span></span><span></span><span></span><span></span><span style="margin-right:4px;">9</span><span>9</span><span>9</span><span>9</span> </span> <a href="">Add + 1</a> The problem is that I previously used queue() function to delay() $(this).text(v.charAt(f)); by 100ms, (without queue the text()-function would not be delayed because it isnt in the fx catergory) so that the text would be updated before the object had faded to opacity = 0. That would look stupid. When adding multiple counters, only one of the counters would count. When removing the queue function, both counters would work, but as you can imagine, the delay of the text() would be gone (as it isnt fx-category). It is probably a bit tricky to make out how I can have multiple counters, and still delay the text()-function by 100ms, but I was hoping there is somebody here with spare brain capacity for these things ;) You can see a (NSFW) problem demo here: Just look underneath the sharing icons and you will notice that the text changes WHILE the objects fade out. Looking for some help to sove this problem. I would like to call the text() function once the text has faded to opacity 0, then fade in once the text() has executed. Thank you for your time.

    Read the article

  • Upload files with java

    - by Marius
    I'd like to upload a few files to a http server. Basically what i need is some sort of a post request to the server with a few parameters and the files. I've seen examples of just uploading files, but didn't find how to also pass additional parameters. So the question would be what's the simplest and free solution of doing this? Does anyone have any file upload examples that i could study? I've been googling for a few hours, but (maybe it's just one of those days) couldn't find exactly what i needed. The best solution would be something that doesn't involve any third party classes or libraries. Thank you

    Read the article

  • m2eclipse: How to set Eclipse project settings when importing a maven project?

    - by Marius Andreiana
    Using m2eclipse Eclipse plugin, everybody on the dev team should be able to checkout source code, import Maven project in Eclipse and be good to go. I saw m2eclipse is being merged into Eclipse 3.7, and maven-eclipse-plugin won't be maintained any longer, so I'm looking for a m2eclipse-based solution (without running "mvn eclipse:clean eclipse:eclipse" before project import, which is what maven-eclipse-plugin does). maven-eclipse-plugin allows this in pom.xml <additionalConfig> <file> <name>.settings/com.google.gdt.eclipse.core.prefs</name> <content><![CDATA[ eclipse.preferences.version=2 jarsExcludedFromWebInfLib= warSrcDir=${project.build.directory}/${project.build.finalName} warSrcDirIsOutput=true ]]> </content> </file> The more general question is How would m2eclipse do something similar? For some cases, just saving the eclipse .settings/prefs file works (e.g. org.eclipse.jdt.ui.prefs), but in this case, com.google.gdt.eclipse.core.prefs is always overwritten on m2eclipse project import. A specific question is asked here, with no reply. Thanks! UPDATE: Not possible now, see request

    Read the article

  • Cocoa window position anomaly

    - by Marius
    Hello everyone, I have a weird problem with positioning a window on screen. I want to center the window on the screen, but i don't know how to do that. Here's what i've got. The window is created from nib by the main controller: IdentFormController *ftf = [[IdentFormController alloc] initWithWindowNibName:@"IdentForm"]; [[ftf window] makeKeyAndOrderFront:self]; Now the IdentFormController has awakeFromNib() method in which it tries to position the window. For the sake of simplicity i've just tried to do setFrameOrigin(NSMakePoint(0, 0)). What happens is as follows: The first time i create this window, everything works as expected. But if i create it again after releasing the previous, it starts appearing at random positions. Why does it do that?

    Read the article

  • Castle, sharing a transient component between a decorator and a decorated component

    - by Marius
    Consider the following example: public interface ITask { void Execute(); } public class LoggingTaskRunner : ITask { private readonly ITask _taskToDecorate; private readonly MessageBuffer _messageBuffer; public LoggingTaskRunner(ITask taskToDecorate, MessageBuffer messageBuffer) { _taskToDecorate = taskToDecorate; _messageBuffer = messageBuffer; } public void Execute() { _taskToDecorate.Execute(); Log(_messageBuffer); } private void Log(MessageBuffer messageBuffer) {} } public class TaskRunner : ITask { public TaskRunner(MessageBuffer messageBuffer) { } public void Execute() { } } public class MessageBuffer { } public class Configuration { public void Configure() { IWindsorContainer container = null; container.Register( Component.For<MessageBuffer>() .LifeStyle.Transient); container.Register( Component.For<ITask>() .ImplementedBy<LoggingTaskRunner>() .ServiceOverrides(ServiceOverride.ForKey("taskToDecorate").Eq("task.to.decorate"))); container.Register( Component.For<ITask>() .ImplementedBy<TaskRunner>() .Named("task.to.decorate")); } } How can I make Windsor instantiate the "shared" transient component so that both "Decorator" and "Decorated" gets the same instance? Edit: since the design is being critiqued I am posting something closer to what is being done in the app. Maybe someone can suggest a better solution (if sharing the transient resource between a logger and the true task is considered a bad design)

    Read the article

  • Redirect Entry form in SharePoint back to itself once entry submitted?

    - by Marius
    The issue I have is that people in my group are using a link to an Entry Form to post new itmes to a SharePoint list. Everytime they click 'submit' to post new item, SharPoint redirects them to the list. I need a solution for SharePoint to direct them to the empty Entry form instead, no matter how many times they need to use it. Is there such solution? Thanks, I already have this "/EntryForm.aspx?Source=http://" in the link to the Entry form, but works only 2 times, after that will direct to the list.

    Read the article

  • Accessing bitmap array in another class? C#

    - by Marius Mathisen
    I have this array : Bitmap[] bildeListe = new Bitmap[21]; bildeListe[0] = Properties.Resources.ål; bildeListe[1] = Properties.Resources.ant; bildeListe[2] = Properties.Resources.bird; bildeListe[3] = Properties.Resources.bear; bildeListe[4] = Properties.Resources.butterfly; bildeListe[5] = Properties.Resources.cat; bildeListe[6] = Properties.Resources.chicken; bildeListe[7] = Properties.Resources.dog; bildeListe[8] = Properties.Resources.elephant; bildeListe[9] = Properties.Resources.fish; bildeListe[10] = Properties.Resources.goat; bildeListe[11] = Properties.Resources.horse; bildeListe[12] = Properties.Resources.ladybug; bildeListe[13] = Properties.Resources.lion; bildeListe[14] = Properties.Resources.moose; bildeListe[15] = Properties.Resources.polarbear; bildeListe[16] = Properties.Resources.reke; bildeListe[17] = Properties.Resources.sheep; bildeListe[18] = Properties.Resources.snake; bildeListe[19] = Properties.Resources.spider; bildeListe[20] = Properties.Resources.turtle; I want that array and it´s content in a diffenrent class, and access it from my main form. I don´t know if should use method, function or what to use with arrays. Are there some good way for me to access for instanse bildeListe[0] in my new class?

    Read the article

  • Maintaining white space in html select tag

    - by Marius
    Hi, I have a list of strings that I would like to display in a HTML select object. The strings look something like : id - name - description I would like the fields to align however. In PHP I'm using sprintf ("%4s%10s%20s", $id, $name, $description); which works fine. The problem is the multiple spaces is compacted to 1 space in the select list. I tried using the pre and white-space CSS properties of the select box, but it has no effect. Any suggestions?

    Read the article

  • validate constructor arguments or method parameters with annotations, and let them throw an exceptio

    - by marius
    I am validating constructor and method arguments, as I want to the software, especially the model part of it, to fail fast. As a result, constructor code often looks like this public MyModelClass(String arg1, String arg2, OtherModelClass otherModelInstance) { if(arg1 == null) { throw new IllegalArgumentsException("arg1 must not be null"); } // further validation of constraints... // actual constructor code... } Is there a way to do that with an annotation driven approach? Something like: public MyModelClass(@NotNull(raise=IllegalArgumentException.class, message="arg1 must not be null") String arg1, @NotNull(raise=IllegalArgumentException.class) String arg2, OtherModelClass otherModelInstance) { // actual constructor code... } In my eyes this would make the actual code a lot more readable. In understand that there are annotations in order to support IDE validation (like the existing @NotNull annotation). Thank you very much for your help.

    Read the article

  • SharePoint Error - Datasheet View refuses to show up!

    - by Marius
    Hi, Recently the DataSheet view of my list refuses to dispaly. I tried numerouse times and with no luck. Other lists works just fine, except for this one. there is a Java error message on the left bottom corner of the screen that disapears in 2 seconds, then it renders the list in Standard view any time you try it. I even created a new Datasheet View - the result a Standard View. Any suggestions? Thanks,

    Read the article

  • Search relevance from XML docs (XQuery?) vs MySQL

    - by Marius
    Hello there, I have a website where documents are saved in xml documents, all with the same structure. I need a search engine where I am able to choose documents with the highest relevance according to the key words given by a searching user. I thought it could (?) be a good idea to have one using XQuery rather than having the information stored twice (in XML docs + mysql database) and querying the mysql database for relevance searches. Is XQuery any good for this, and how, and what speed can I expect on +1000 documents of about 7kb each. Thank you for your time. Kind regards

    Read the article

  • PHP Type Hinting: array supported, object NOT?

    - by Marius Burz
    Am I missing something or there really is no support for generic object type hinting in PHP 5.x? I find it really strange that hinting arrays is supported while hinting objects is not, at least not out of the box. I'd like to have something like this: function foo(object $o) Just as we have: function foo(array $o) Example of possible use: methods of an objects collection class. Workaround: using an interface "Object" implemented by all classes or extending all classes from a generic class "Object" and writing something like this: function foo(Object $o) Well, that just ain't cute. Edit: somebody suggested in a deleted post using stdClass. It doesn't work: Catchable fatal error: Argument 1 passed to c::add() must be an instance of stdClass, instance of b given

    Read the article

  • authorization services question cocoa

    - by Marius
    Sorry for being a total beginner in cocoa and for asking the following stupid question, but it's too confusing for me to google it myself or maybe i'm just missing something. I need to run a shellscript with elevated privileges in cocoa. As i understand, "AuthorizationExecuteWithPrivileges" is the correct way to do it. So i've created an application and tried to use some code from one example i found online. The problem is ... if i understand it correctly ... there should be a Security framework in /System/Library/Frameworks that i have to import to the project, but ... it's not there. What am i missing here? Thank you.

    Read the article

  • Does isolation frameworks (Moq, RhinoMock, etc) lead to test overspecification?

    - by Marius
    In Osherove's great book "The Art of Unit Testing" one of the test anti-patterns is over-specification which is basically the same as testing the internal state of the object instead of some expected output. To my experience, using Isolation frameworks can cause the same unwanted side effects as testing internal behavior because one tends to only implement the behavior necessary to make your stub interact with the object under test. Now if your implementation changes later on (but the contract remains the same), your test will suddenly break because you are expecting some data from the stub which was not implemented. So what do you think is the best approach to counter this? 1) Implement your stubs/mocks fully, this has the negative side-effect of potentially making your test less readable and also specifying more than necessary to make your test pass. 2) Favor manual, fully implemented fakes. 3) Implement your stubs/fakes so that they make your test just pass, and then deal with the brittleness that this might introduce.

    Read the article

  • Calculation error in Datasheet view in SharePoint

    - by Marius
    I have a custom list, with calculation, in SharePoint. Everything worked fine until recently when the DataSheet will show strange or wrong % calculation in a % column. But the Standard View will show correct values. IT checked the server side and everything looked ok, I checked the formulas and even re-did them in the column and the issue persist. Anyone, any suggestion? Thanks,

    Read the article

  • Wxpython cut copy paste and openfiledialog...

    - by Marius
    i have a web browser made in python with menu. in one menu i have cut copy paste but no functionality and i need to make them work. i need an example of class oncopy.(event menu) Open file i manage to work like this .takes file and print on screen the link to that file but how can make open dialog to open a file at least one type of file?

    Read the article

  • How do I use on delete cascade in mysql?

    - by Marius
    I have a database of components. Each component is of a specific type. That means there is a many-to-one relationship between a component and a type. When I delete a type, I would like to delete all the components which has a foreign key of that type. But if I'm not mistaken, cascade delete will delete the type when the component is deleted. Is there any way to do what I described?

    Read the article

  • C++ struct, public data members and inheritance

    - by Marius
    Is it ok to have public data members in a C++ class/struct in certain particular situations? How would that go along with inheritance? I've read opinions on the matter, some stated already here http://stackoverflow.com/questions/952907/practices-on-when-to-implement-accessors-on-private-member-variables-rather-than http://stackoverflow.com/questions/670958/accessors-vs-public-members or in books/articles (Stroustrup, Meyers) but I'm still a little bit in the shade. I have some configuration blocks that I read from a file (integers, bools, floats) and I need to place them into a structure for later use. I don't want to expose these externally just use them inside another class (I actually do want to pass these config parameters to another class but don't want to expose them through a public API). The fact is that I have many such config parameters (15 or so) and writing getters and setters seems an unnecessary overhead. Also I have more than one configuration block and these are sharing some of the parameters. Making a struct with all the data members public and then subclassing does not feel right. What's the best way to tackle that situation? Does making a big struct to cover all parameters provide an acceptable compromise (I would have to leave some of these set to their default values for blocks that do not use them)?

    Read the article

  • javascript inserting html code

    - by Marius
    Hello, I have a situation when there's a table and you can add a new row by clicking a button. The row is dynamically generated by a server and it is passed back in HTML. So basically what i need to do is prefix the new row to the old table. Something like this: tableelement.innerHTML = newHtml + tableelement.innerHTML; That surely works, but i have a table header and, obviously, i need to insert the new html after it. How would i do this? insertBefore or insertAfter can't help (afaik), because they're meant for inserting elements and not unparsed HTML. So how could i, having an object of the header's row, insert another row (in HTML) after it (or before) ? Thank you for your ideas

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >