Search Results

Search found 136 results on 6 pages for 'jmh gr'.

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

  • Get a queryset of objects through an intermediary model

    - by skyl
    I want get all of the Geom objects that are related to a certain content_object (see the function I'm trying to build at the bottom, get_geoms_for_obj() class Geom(models.Model): ... class GeomRelation(models.Model): ''' For tagging many objects to a Geom object and vice-versa''' geom = models.ForeignKey(Geom) content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey() def get_geoms_for_object(obj): ''' takes an object and gets the geoms that are related ''' ct = ContentType.objects.get_for_model(obj) id = obj.id grs = GeomRelation.objects.filter( content_type=ct, object_id=id ) # how with django orm magic can I build the queryset instead of list # like below to get all of the Geom objects for a given content_object geoms = [] for gr in grs: geoms.append(gr.geom) return set(geoms) # A set makes it so that I have no redundant entries but I want the # queryset ordering too .. need to make it a queryset for so many reasons...

    Read the article

  • how to force ejb3 to reload value from data base and not use those of the context

    - by Kohan95
    Hello here I have a big problem that I hope to find help here I have two entities @Entity @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="Role", discriminatorType=DiscriminatorType.STRING) public class Utilisateur implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="id") private Long id; @Column(name="nom",nullable=false) private String nom; @Column(name="Role",nullable=false, insertable=false) private String Role ; //... } @Entity @Table(name="ResCom") @DiscriminatorValue("ResCom") public class ResCom extends Utilisateur { /... } the first thing I do ResCom rsCom= new ResCom(nom,prenom, email,civilite, SysQl.crypePasse(pass)); gr.create(rsCom); I check my database I see that property is ResCom insert but when I check the value of role I get null Utilisateur tets= gr.findByEmail(email); message=tets.getEmail()+" and Role :"+tets.getRole()+""; but in my bass it ResCom !!!!! the problem disappears when I deploy the project again I hope you have a solution And thank you in advance sorry for my English

    Read the article

  • Cannot Import VPN connection

    - by ECII
    Since 12.04 I cannot connect to my VPN. my ovpn file is the following http://email.uoa.gr/help/download/vpn/edunet.ovpn When I try to import the VPN file i get the following error The file 'edunet.ovpn' could not be read or does not contain recognized VPN connection information Error: unknown PPTP file extension. Is there any way arround this error? I have already installed network-manager-openvpn

    Read the article

  • Effective Website Management and Time Saving Tips

    An online store generally has good amount of products and their availability waves in and away of stock and there are products that are discarded out or leaving a dead product on your website is a gr... [Author: Alan Smith - Web Design and Development - April 23, 2010]

    Read the article

  • Chrome OS peut-il viser les entreprises ? Google pense que oui, et s'apprête à lancer une version mo

    Chrome OS peut-il viser les entreprises ? Google pense que oui, et s'apprêterait à lancer une version modifiée de son système d'exploitation Google travaille sur une version entreprise de son système d'exploitation Chrome OS. La nouvelle ne manque pas de poser question. Chrome OS est en effet un OS open-source, certes, mais très fermé. L'utilisateur ne peut pas installer les applications qu'il souhaite comme sur un système classique. Ce verrouillage permet une plus gr...

    Read the article

  • Is there a quick way to enter uppercase accented characters?

    - by agnul
    I know I can enter any character I need using the character-map applet, but that means grabbing the mouse/opening the "run" dialog, switching to another window, selecting the character, copying... you get the idea. Is there a quicker way to enter characters that are not available on the keyboard (and are not available as alt-gr combinations)? In my specific case I'm using a laptop with the Italian keyboard layout, but I suspect a general solution exists.

    Read the article

  • Video and LAN Cards are not recognized on Intel DG41RQ MB

    - by artyom
    Hello, My 32 bit Debian Etch with Etch-n-Half kernel 2.6.24 and Etch-n-half video driver xserver-xorg-video-intel 2.2.1-1~etchnhalf2 does not recognize my on-board LAN and Video. I can work only with VESA display. And additional PCI LAN card (that I wanted to use for Cross-X-Cabel). output of lspci 00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03) 00:01.0 PCI bridge: Intel Corporation 4 Series Chipset PCI Express Root Port (rev 03) 00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01) 04:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10 According to MB Spec: Video: Intel G41 Express Chipset Graphics and Memory Controller Hub Graphics (GMCH) LAN: Realtek 8111D Gigabit Ethernet Controller LAN Support When I run dpkg-reconfigure xserver-xorg is suggest i810 driver but X does not start, it does not start with intel driver as well; only vesa. LAN I even can't find in lspci... the last Realtek card is external one 100MB card. Where to start from?

    Read the article

  • Can Xen be configured to dedicate only one port of a dual-port NIC to a domU?

    - by jamieb
    I'm using CentOS 5.4 on my dom0 with a stock Xen kernel. I'm attempting to use the pciback module to hide some of the Ethernet ports from the host and reserve them for a domU I intend to use for a firewall (process described here). However, when I launch the domU, I get the following error message: Using config file "/etc/xen/firewall". Error: pci: improper device assignment specified: pci: 0000:01:04.0 must be co-assigned to the same guest with 0000:01:06.0, but it is not owned by pciback. lspci gives me the following output: 00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01) 01:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) 01:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) 01:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) From the sound of the error message, it seems like I also need to dedicate eth0 (PCI ID 01:04.0) to the domU. Am I correct? If not, what am I doing wrong? Thanks!

    Read the article

  • Parsing a JSON Response from a .Net webservice

    - by Maskau
    Just to get this out in the open I am new to JAVA, KSOAP, and JSON. So I'll try to explain this the best I can. A while ago I created a webservice to be consumed by Blackberry Apps that we're built using the plug in for Visual Studio. Now the project I am working on, I want to consume the same webservice for Android devices. For the most part I have the base code for the Android app done and working. Here's my problem: I can successfully call the webservice and get a response. I know from creating the webservice that it sends a JSON response. My problem is trying to parse through the JSON response. I have found a few examples that I have been suiting to my needs however I am hung up on one thing. In the JSON each element is preceeded by "anyType" which is forcing my code to return no results (Ultimately I am binding the data to an ArrayList) Here's what I get if I "getProperty(0).toString()... anyType{Artist=anyType{TrackName=Champagne Supernova;}; Here is the code I am using to parse the JSON Object.... SoapObject gr = (SoapObject)envelope.getResponse(); String ro = gr.getProperty(0).toString(); //Added just to see structure of response Artist_Result.add(gr.toString()); if (ro.startsWith("{")) { JSONObject JSONObj = new JSONObject(ro); Iterator<String> itr = JSONObj.keys(); while (itr.hasNext()) { String key = (String)itr.next(); String value = JSONObj.getString(key); //bundleResult.putString(key, value); Artist_Result.add(value); } } else if (ro.startsWith("[")) { JSONArr = new JSONArray(ro); for (int i = 0; i < JSONArr.length(); i++) { JSONObj = (JSONObject)JSONArr.get(i); //bundleResult.putString(String.valueOf(i), JSONObj.toString()); Artist_Result.add(JSONObj.toString()); } } WebService Code: [WebMethod] [return: System.Xml.Serialization.XmlArrayItemAttribute(typeof(Artist))] public Artist[] GetArtist(string ArtistQuery) { // All the SQL Stuff Here SqlDataReader sReader; sReader = cmd.ExecuteReader(); List<Artist> Artists = new List<Artist>(); while (sReader.Read()) { Artist result = new Artist(); result.TrackName = sReader.GetString(0); Artists.Add(result); } sReader.Close(); sqlConn.Close(); return Artists.ToArray(); } public class Artist { public string TrackName; } Sample of XML Output from a browser: <?xml version="1.0" encoding="utf-8" ?> - <ArrayOfArtist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://bb.mcrcog.com/"> - <Artist> <TrackName>Champagne Supernova</TrackName> </Artist> - <Artist> <TrackName>Don't Look Back In Anger</TrackName> </Artist> - <Artist> <TrackName>D'you Know What I Mean</TrackName> </Artist> - <Artist> <TrackName>Go Let It Out</TrackName> </Artist> I have a feeling I will need to implement a Class, and Getters/Setters on the Android side. I'm just not sure how to go about doing that. Any help would be greatly appreciated!

    Read the article

  • HTML: Place an image on top of another one

    - by Dimitris Baltas
    Inside a div, there is a picture that should have 10px margin in all directions from the DIV's border. On the left bottom corner of the picture there is an about-image. The picture is only displayed when its loaded in the DOM through jquery. The problem is that the existence of the about-image dislocates the picture downwards as many pixels as the height of the about-image. I am looking for the cleanest possible alternative to keep the picture inside the DIV and still display the about-image on top of it. Setting the picture as background will not work since i need the picture to load at once. Any improvement on the #about css would be greatly appreciated. Below is a full html page that reproduces the issue <html> <head> <title>Troubleshooting :: align the main picture inside the DIV</title> <style type="text/css"> html, body { background-color: #000000; } #about { z-index:2; position:relative; top:82%; left:3%; } #pic { width:100%; height:96%; } #main-content-image { height:100%; margin-right:10px; margin-left:10px; margin-top:10px; margin-bottom:10px; } #main-content { height:490px; border-width: 1px; border-style: solid; border-color: #777777; } #main-content-image.loading { background: url(http://farros.gr/images/ajax-loader2.gif) no-repeat center center; } a { text-decoration: none; text-decoration: none; color: #868686; outline:none; } .hide { display:none; } </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> <!-- $(document).ready(function(){ $(function () { var img = new Image(); $(img).load(function () { $(this).hide(); $(this).width('100%'); $(this).height('96%'); $('#main-content-image').removeClass('loading').append(this); $(this).fadeIn(); }).error(function () { // notify the user that the image could not be loaded }).attr('src', 'http://farros.gr/images/bg.jpg'); }); }); </script> </head> <body> <div id="main-content"> <div id="main-content-image" class="loading"> <a href="#"><img id="about" src='http://farros.gr/images/about.png' alt='Haris Farros'/></a> </div> </div> </body> </html>

    Read the article

  • jquery with ASP.NET MVC - calling ajax enabled web service

    - by dcp
    This is a bit of a continuation of a previous question. Now I'm trying to make a call to an AJAX enabled web service which I have defined within the ASP.NET MVC application (i.e. the MovieService.svc). But the service is never being called in my getMovies javascript function. This same technique of calling the AJAX web service works ok if I try it in a non ASP.NET MVC application, so it makes me wonder if maybe the ASP MVC routes are interfering with things somehow when it tries to make the AJAX web service call. Do you have any idea why my web service isn't getting called? Code below. <script src="<%= ResolveClientUrl("~/scripts/jquery-1.4.2.min.js") %>" type="text/javascript"></script> <script src="<%= ResolveClientUrl("~/scripts/grid.locale-en.js") %>" type="text/javascript"></script> <script src="<%= ResolveClientUrl("~/scripts/jquery-ui-1.8.1.custom.min.js") %>" type="text/javascript"></script> <script src="<%= ResolveClientUrl("~/scripts/jquery.jqGrid.min.js") %>" type="text/javascript"></script> <script type="text/javascript"> var lastsel2; function successFunction(jsondata) { debugger var thegrid = jQuery("#editgrid"); for (var i = 0; i < jsondata.d.length; i++) { thegrid.addRowData(i + 1, jsondata.d[i]); } } function getMovies() { debugger // ***** the MovieService#GetMovies method never gets called $.ajax({ url: 'MovieService.svc/GetMovies', data: "{}", // For empty input data use "{}", dataType: "json", type: "GET", contentType: "application/json; charset=utf-8", success: successFunction }); } jQuery(document).ready(function() { jQuery("#editgrid").jqGrid({ datatype: getMovies, colNames: ['id', 'Movie Name', 'Directed By', 'Release Date', 'IMDB Rating', 'Plot', 'ImageURL'], colModel: [ { name: 'id', index: 'Id', width: 55, sortable: false, hidden: true, editable: false, editoptions: { readonly: true, size: 10} }, { name: 'Movie Name', index: 'Name', width: 250, editable: true, editoptions: { size: 10} }, { name: 'Directed By', index: 'Director', width: 250, align: 'right', editable: true, editoptions: { size: 10} }, { name: 'Release Date', index: 'ReleaseDate', width: 100, align: 'right', editable: true, editoptions: { size: 10} }, { name: 'IMDB Rating', index: 'IMDBUserRating', width: 100, align: 'right', editable: true, editoptions: { size: 10} }, { name: 'Plot', index: 'Plot', width: 150, hidden: false, editable: true, editoptions: { size: 30} }, { name: 'ImageURL', index: 'ImageURL', width: 55, hidden: true, editable: false, editoptions: { readonly: true, size: 10} } ], pager: jQuery('#pager'), rowNum: 5, rowList: [5, 10, 20], sortname: 'id', sortorder: "desc", height: '100%', width: '100%', viewrecords: true, imgpath: '/Content/jqGridCss/redmond/images', caption: 'Movies from 2008', editurl: '/Home/EditMovieData/', caption: 'Movie List' }); $("#bedata").click(function() { var gr = jQuery("#editgrid").jqGrid('getGridParam', 'selrow'); if (gr != null) jQuery("#editgrid").jqGrid('editGridRow', gr, { height: 280, reloadAfterSubmit: false }); else alert("Hey dork, please select a row"); }); }); </script> <h2> <%= Html.Encode(ViewData["Message"]) %></h2> <p> To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website"> http://asp.net/mvc</a>. </p> <table id="editgrid"> </table> <div id="pager" style="text-align: center;"> </div> <input type="button" id="bedata" value="Edit Selected" /> Here's my RegisterRoutes code: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("*MovieService.svc*"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } Here's what my MovieService class looks like: namespace jQueryMVC { [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class MovieService { // Add [WebGet] attribute to use HTTP GET [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Json)] public IList<Movie> GetMovies() { return Persistence.GetMovies(); } } }

    Read the article

  • Thread safe double buffering

    - by kdavis8
    I am trying to implement a draw map method that will draw the tiled image across the surface of the component. I'm having issue with this code. The double buffering does not seem to be working, because the sprite flickers like crazy; my source code: package myPackage; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Toolkit; import java.awt.image.BufferStrategy; import java.awt.image.BufferedImage; import javax.swing.JFrame; public class GameView extends JFrame implements Runnable { public BufferedImage backbuffer; public Graphics2D g2d; public Image img; Thread gameloop; Scene scene; public GameView() { super("Game View"); setSize(600, 600); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); backbuffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); g2d = backbuffer.createGraphics(); Toolkit tk = Toolkit.getDefaultToolkit(); img = tk.getImage(this.getClass().getResource("cage.png")); scene = new Scene(g2d, this); gameloop = new Thread(this); gameloop.start(); } public static void main(String args[]) { new GameView(); } public void paint(Graphics g) { g.drawImage(backbuffer, 0, 0, this); repaint(); } @Override public void run() { // TODO Auto-generated method stub Thread t = Thread.currentThread(); while (t == gameloop) { scene.getScene("dirtmap"); g2d.drawImage(img, 80, 80,this![enter image description here][1]); } } private void drawScene(String string) { // TODO Auto-generated method stub // g2d.setColor(Color.white); // g2d.fillRect(0, 0, getWidth(), getHeight()); scene.getScene(string); } } package myPackage; import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Toolkit; public class Scene { Graphics g2d; Component c; boolean loaded = false; public Scene(Graphics2D gr, Component co) { g2d = gr; c = co; } public void getScene(String mapName) { Toolkit tk = Toolkit.getDefaultToolkit(); Image tile = tk.getImage(this.getClass().getResource("dirt.png")); // g2d.setColor(Color.red); for (int y = 0; y <= 18; y++) { for (int x = 0; x <= 18; x += 1) { g2d.drawImage(tile, x * 32, y * 32, c); } } loaded = true; } }

    Read the article

  • JavaScript automatically converts some special characters

    - by noplacetoh1de
    I need to extract a HTML-Substring with JS which is position dependent. I store special characters HTML-encoded. For example: HTML <div id="test"><p>l&ouml;sen &amp; gr&uuml;&szlig;en</p></div>? Text lösen & grüßen My problem lies in the JS-part, for example when I try to extract the fragment lö, which has the HTML-dependent starting position of 3 and the end position of 9 inside the <div> block. JS seems to convert some special characters internally so that the count from 3 to 9 is wrongly interpreted as "lösen " and not "l&ouml;". Other special characters like the &amp; are not affected by this. So my question is, if someone knows why JS is behaving in that way? Characters like &auml; or &ouml; are being converted while characters like &amp; or &nbsp; are plain. Is there any possibility to avoid this conversion? I've set up a fiddle to demonstrate this: JSFiddle Thanks for any help! EDIT: Maybe I've explained it a bit confusing, sorry for that. What I want is the HTML: <p>l&ouml;sen &amp; gr&uuml;&szlig;en</p> . Every special character should be unconverted, except the HTML-Tags. Like in the HTML above. But JS converts the &ouml; or &uuml; into ö or ü automatically, what I need to avoid.

    Read the article

  • netbeans shortcuts

    - by coubeatczech
    hi, I have mapped several keys under <alt-gr> - <something> combination, but they don't work in netbeans, how do I cancel this netbeans overriding? thanks for answering... I'm working on linux, the keymap file has lines in the following manner: key <SPCE> { [ space, space, Return, nobreakspace ] };

    Read the article

  • Biff stroganoff

    - by leffen
    oppskrift biff stroganoff for 4 personer   Tilberedning: løk og hvitløk skrelles, hakkes og stekes myk og blank. tas deretter ut av gryten. kjøttet skjæres i terninger og brunes hurtig ved sterk varme, litt om gangen. kok ut gryten med litt vann mellom hver bruning. ha kjøttet, med kraften fra utkoket, tilbake i gryten. demp varmen. ha oppi løk, hvetemel, tomatpuré og rømme. smak til med salt og pepper. la gryten trekke i ca. 4 min på svak varme. serveres med ris eller kokte poteter. gjerne med brød og frisk salat.   Ingredienser i oppskrift: 500 gr ytrefilet 1 stk stor løk 3 ss margarin 1 ts salt 2 stk hvitløksfedd   1 krm pepper 1 ss hvetemel 2-3 ss tomatpuré 3 dl rømme

    Read the article

  • How well supported is the ATI graphics on a Sony VAIO SA?

    - by whoami
    This is the first time i will be buying a laptop/desktop to use as a Ubuntu platform with ATI. Now i did notice a while back that ATI drivers were not in cahoots with Linux as of yet. I am just wondering if any one is still experiencing ATI issues, or this is no longer the case. I am looking to spend money on a laptop Upgrade, but I don't want to spend a screw load of money just to find out I can only use windows and my Graphics driver does not work. So the Question is: What's ATI Support like on Ubuntu 10.10 Here is what im thinking of buying http://www.gadgetfreak.gr/wp-content/uploads/2011/02/SB_S08_keyboard_B_us_FP-1024x716.jpg, If any one has the Sony VAIO SA Series and installed Ubuntu on it, please do share your story, about driver problems. On a side note my old Sony S-Series which im using now, i never got the fingerprint reader or the webcam working on it, has any one been able to do this for the new models? I preferably dont care about the fingerprint reader but do care about the webcam.

    Read the article

  • L'iPad ne serait pas un terminal sûr : un hacker pense que la tablette peut devenir une machine à sp

    Mise à jour du 15/06/10 L'iPad ne serait pas assez sécurisé D'après un hacker qui pense que la tablette peut devenir une machine à spams, voire pire Le groupe de hackers Goatse Security vient d'accuser Apple de ne pas assez prendre au sérieux la sécurité de l'iPad. En mars dernier, le groupe avait découvert une faille dans Safari, le navigateur d'Apple, qui est également présent en natif dans la nouvelle tablette de la marque à la pomme. La faille en question a été colmatée dans la version desktop de l'application, mais pas dans celle de l'iPad. Résultat, le terminal serait une proie idéale pour des attaques à gr...

    Read the article

  • C# Instantiate class which implements generic interface

    - by Martijn B
    Hi there, I have some business classes which implements IBusinessRequest for example: public class PersonBusiness : IBusinessRequest<Person> { } Besides this I have a function: TypeHelper.CreateBusinessInstance(Type businessType, Type businessRequestType) A requirement of a business class is that they must have a parameterless constructor, which I check in the TypeHelper.CreateBusinessInstance function. I want to create a instance of type businessType (which is i.e PersonBusiness) with the generic value businessRequestType for IBusinessRequest<. How can I get this done? Thanks in Advance. Gr Martijn

    Read the article

  • StackOverflow Code Sample vs }

    - by 0plus1
    I want to ask you a question about the stackoverflow's editor. Whenever I need to write code and close a } I get the Code Sample indentation if using: Alt gr + Shift + (+*]) It's pretty annoying, is there any way to avoid this other than: Ctrl+v ? Thank you and sorry if this has been asked before.

    Read the article

  • RMI-applets - Cannot understand error message

    - by aeter
    In a simple RMI game I'm writing (an assignment in uni), I reveice: java.rmi.MarshalException: error marshalling arguments; nested exception is: java.net.SocketException: Broken pipe at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132) at $Proxy2.drawWorld(Unknown Source) at PlayerServerImpl$1.actionPerformed(PlayerServerImpl.java:180) at javax.swing.Timer.fireActionPerformed(Timer.java:271) at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) The error message appears after the second Player is registered with the RMI Server and the server starts to send the image (the array of pixels) to the 2 applets. The PlayerImpl and the PlayerServerImpl both extend UnicastRemoteObject. I have been struggling with other error messages for some time now, but I cannot understand how to troubleshoot this one. Please help. The relevant parts of the code are: PlayerServerImpl.java: ... timer = new Timer(10, new ActionListener() { // every 10 milliseconds do: @Override public void actionPerformed(ActionEvent e) { ... BufferedImage buff_image = new BufferedImage(GAME_APPLET_WIDTH, GAME_APPLET_HEIGHT, BufferedImage.TYPE_INT_RGB); // create a graphics context on the buffered image Graphics buff_g = buff_image.createGraphics(); ... // draw the score somewhere on the screen buff_g.drawString(score, GAME_APPLET_WIDTH - 20, 10); ... int[] rgbs = new int[GAME_APPLET_WIDTH * GAME_APPLET_HEIGHT]; int imgPixelsGrabbed[] = buff_image.getRGB(0,0,GAME_APPLET_WIDTH,GAME_APPLET_HEIGHT,rgbs,0,GAME_APPLET_WIDTH); // send the new state to the applets for (Player player : players) { player.drawWorld(imgPixelsGrabbed); System.out.println("Sent image to player"); } PlayerImpl.java: private PlayerApplet applet; public PlayerImpl(PlayerApplet applet) throws RemoteException { super(); this.applet = applet; } ... @Override public void drawWorld(int[] imgPixelsGrabbed) throws RemoteException { applet.setWorld(imgPixelsGrabbed); applet.repaint(); } ... PlayerApplet.java: ... private int[] world; // an array of pixels for the new image to be drawn ... // register players player = new PlayerImpl(applet); String serverIPAddressPort = ipAddressField.getText(); if (validateIPAddressPort(serverIPAddressPort)) { server = (PlayerServer) Naming.lookup("rmi://" + serverIPAddressPort + "/PlayerServer"); server.register(player); idPlayer = server.sendPlayerID(); ... @Override public void update(Graphics g) { buff_img = createImage((ImageProducer) new MemoryImageSource(getWidth(), getHeight(), world, 0, getWidth())); Graphics gr = buff_img.getGraphics(); paint(gr); g.drawImage(buff_img, 0, 0, this); } public void setWorld(int[] world) { this.world = world; }

    Read the article

  • display wait gif until image is fully loaded

    - by Dimitris Baltas
    Most popular browsers, while rendering an image, they display it line-by-line top-to-bottom as it loads. I have a requirement that a wait gif should be displayed while the image is loading. When the image is fully loaded then it should be displayed instead of the wait gif. If it helps, the site is http://farros.gr, main image: /images/bg.jpg and the div containing the image is named #main-content-image.

    Read the article

  • jQuery slider not visible after container div is toggled

    - by Shahar Evron
    I have a page which contains a jQuery-UI horizontal slider, created using a little function, inside a div which can be displayed / hidden by clicking on it's title, using $.toggle(). Problem is, once the div is hidden, when it is expanded the slider is gone. A simplified demo of the problem can be seen here: http://arr.gr/jquery-issue.html (file contains all relevant source code) - when clicking the "Advanced Options" title to hide and then show the div, the slider is no longer there. Any suggestions on how to work around this?

    Read the article

  • Webmail system script

    - by panidarapu
    Hello, I am planning to launch a free webmail service at mail(dot)com(dot)es where users can signup and have their free webmail account (for example like www.email.gr). I am looking for a free or low cost webmail system script to install on my website. Do you know any free or low cost scripts which would be suitable for this? Thanks

    Read the article

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