Daily Archives

Articles indexed Monday April 2 2012

Page 3/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • correct Installation and configuration of openJDK and R

    - by Marco K
    I am relatively new to Ubuntu so I wont know a lot of commands that probably became standard to a lot of you guys. I am trying to set up R and with it the necessary java dependencies to install e.g. JGR, rjava, etc. I read through quite a few instructions to do that but somehow I must have done sth wrong. Here is the state of R and java: R --version R version 2.14.1 (2011-12-22) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit) java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_23 Java home path : /usr/lib/jvm/java-6-openjdk/jre Java compiler : /usr/bin/javac Java headers gen.: /usr/bin/javah Java archive tool: /usr/bin/jar Java library path: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib JNI linker flags : -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm JNI cpp flags : But when I try to install 'JavaGD' in R, which is a dependency for JGR I get: ... checking Java support in R... present: interpreter : '/usr/bin/java' cpp flags : '' java libs : '-L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/jni -L/lib -L/usr/lib -ljvm' configure: error: One or more Java configuration variables are not set. Make sure R is configured with full Java support (including JDK). Run R CMD javareconf as root to add Java support to R. ... Any help would be greatly appreciated. Thanks!

    Read the article

  • Automatically adjust the volume based on content?

    - by megas
    In different audio sources the level of sounds are different. It's very annoying to set the level of sound on almost every media content. Sometimes, when before you had something quiet, you had to adjust it more louder and after some time you want to play another media - bang! it unexpectedly breaks your headphones, the sound is so loud! So, is there some plugin/feature which can automatically adjust the level of sound on every media content?

    Read the article

  • Ubuntu apt-get install linux-image

    - by Karl Kloppenborg
    I'd like someone to enlighten me as to what exactly goes on with aptitude when I want a kernel. As we all know, there's pretty much the following kernel option: linux-image-generic linux-image-server linux-image-virtual This morning I did an install and it had linux-image-generic on it, so I ran the following: apt-get -y remove linux-image-* This removed all my kernels as expected, I followed suit with running: apt-get install linux-image-virtual Says I've installed linux-image-server!? Am I missing something here, because I checked twice and it did it twice, however if I manually select a kernel (in my instance I used: linux-image-2.6.35-30-virtual) it will install linux-image-virtual. This seems rather strange to me? Details: Running Ubuntu 9.10 Am I missing something? :)

    Read the article

  • Silverstripe: How can I disable comments?

    - by SamIAm
    My client site is built in Silverstripe, there is a news page, and it allows people to leave comments. Unfortunately we've got loads of spam emails. I'm new to this, is there any way we can disable the comment field by default? How do I do it? Alternatively is there easy way for me to install a spam protection? Update - Because this is someone else's code, I just realised that they have some sort of spam protection already, so we are trying to disable comments now. I have manage to set no comment as default by changing file BlogEntry.php static $defaults = array( "ProvideComments" => true, 'ShowInMenus' => false ); to static $defaults = array( "ProvideComments" => false, //changed 'ShowInMenus' => false ); Am I on the right track to disable comments by default? Also how can I stop on the news page showing xxx comments link? eg Test Posted by Admin on 21 June 2011 | 3 Comments Tags: P This is a test.... 3 comments | Read the full post

    Read the article

  • Is there a class or id that will cause an ad to be blocked by most major adblockers?

    - by Moak
    Is there a general class or ID for a html element that a high majority of popular adblockers will block on a website it has no information for. My intention is to have my advertisement blocked, avoiding automatic blocking is easy enough... I was thinking of maybe lending some ids or classes from big advertisment companies that area already being fought off quite actively. right now my html <ul id=partners> <li class=advertisment><a href=# class=sponsor><img class=banner></a></li> </ul> Will this work or is there a more solid approach?

    Read the article

  • I'm getting 403 forbidden error on my website

    - by user1230090
    I was accessing the directories through cyberduck and also trying to upload files.But now it started showing this forbidden error.I was getting the homepage first,now i dont get that too.Can anyone please tell me how can I get my website back to show [Fri Mar 02 14:36:21 2012] [error] File does not exist: /var/www/vhosts/example.com/httpdocs/bin [Fri Mar 02 14:37:24 2012] [error] File does not exist: /var/www/vhosts/example.com/httpdocs/httpsdocs [Fri Mar 02 14:39:01 2012] [error] (13)Permission denied: file permissions deny server access: /var/www/vhosts/example.com/httpdocs/index.html

    Read the article

  • Site experiencing low traffic volume between 8AM and 4PM BST

    - by BizNuge
    There may be no definitive answer to this question but I thought peer review of the problem might stimulate some ideas on the topic. We have a boutique sales site that is experiencing low volumes of traffic (both UK and international) between 8AM and 4PM BST. This seems sort of strange since our target audience for the site is UK based, and this would seem to be when people are awake and online. We are in contact with another boutique site in the same sector who don't experience this issue, so it seems kinda strange. Later on in the day we are getting traffic from the UK, as well as a fair amount of international traffic, so I'm at a loss to figure this one out. The site is fairly well optimised including:- sitemap.xml Proper caching policies across the board google merchant dublin core microdata html5 pretty urls meta and content are reviewed as an ongoing concern we have decent sitelinks for direct queries thru google on the site name a decent amount of inbound links FB, Twitter, Google +1 Google maps listing [verified] site has been selling for ~4 months and is getting ~250 users per day. So I'm not entirely sure how to explain the mid day dip in our figures.... Any ideas at all would be useful. Cheers all!

    Read the article

  • Migrating Ruby on Rails Website to New Server (Linux)

    - by GarytheWorm
    I have an existing website that is a Ruby on Rails project. I have another server i need to transfer the existing website too. The server i wish to transfer too was originally hosting the website so has the necessary gems/configuration are installed. I have tar the current releases shared dir from the old server and transfered them over to the new server. I have then unpack the tar in the apps directory to the new location which is a different URL path. My problem is now as you can see below that the path on the current - is pointing to the old url. ( i ran ls -la to see owenership) How can i change this current path to read with my new web address? current releases shared sitepack.tar root@server1:/var/www/clients/client1/NEWSITE.com/web/apps# ls -la current - /var/www/OLDSITE.com/web/apps/releases/20120130171636 root@server1:/var/www/clients/client1/NEWSITE.com/web/apps#

    Read the article

  • Google Apps email hosting for a GoDaddy-hosted site works locally but not on live site

    - by CrB
    GoDaddy email issues are plentiful, but I have not been able to find anyone resolve this same problem: I have a GoDaddy hosted site, and a Google Apps account. The MX info on GoDaddy is correct, as is my server-side code, and the Google Apps credentials in my web.config file (host:smtp.gmail.com, port:587) are correct. I know this because I am able to send emails through SmtpClient hosted my local machine's server when debugging the site. However, once transferred to the GoDaddy hosting account, all emails will not send -- they just time out. Nothing has changed aside from the site being run on the GoDaddy server as opposed to a local server. EDIT - SSL is enabled. A two part question: 1) Does anybody have any ideas about how to tackle this? 2) If not, is there another web hosting or email hosting site, or a combination of 2, that people can confirm is fast, actually works, and is not impossible to coordinate as is everything with GoDaddy? (I am aware that GoDaddy has their own relaying email server, but I initially used it before switching to Google and found emails coming in 30-60 minutes late).

    Read the article

  • Global keyboard states

    - by Petr Abdulin
    I have following idea about processing keyboard input. We capture input in "main" Game class like this: protected override void Update(GameTime gameTime) { this.CurrentKeyboardState = Keyboard.GetState(); // main :Game class logic here base.Update(gameTime); this.PreviousKeyboardState = this.CurrentKeyboardState; } then, reuse keyboard states (which have internal scope) in all other game components. The reasons behind this are 1) minimize keyboard processing load, and 2) reduce "pollution" of all other classes with similar keyboard state variables. Since I'm quite a noob in both game and XNA development, I would like to know if all of this sounds reasonable.

    Read the article

  • Using XNA's XML content pipeline to read arrays of objects with different subtypes

    - by Mcguirk
    Using XNA's XML content importer, is it possible to read in an array of objects with different subtypes? For instance, assume these are my class definitions: public abstract class MyBaseClass { public string MyBaseData; } public class MySubClass0 : MyBaseClass { public int MySubData0; } public class MySubClass1 : MyBaseClass { public bool MySubData1; } And this is my XML file: <XnaContent> <Asset Type="MyBaseClass[]"> <Item> <!-- I want this to be an instance of MySubClass0 --> <MyBaseData>alpha</MyBaseData> <MySubData0>314</MySubData0> </Item> <Item> <!-- I want this to be an instance of MySubClass1 --> <MyBaseData>bravo</MyBaseData> <MySubData1>true</MySubData1> </Item> </Asset> </XnaContent> How do I specify that I want the first Item to be an instance of MySubclass0 and the second Item to be an instance of MySubclass1?

    Read the article

  • RenderTarget2D behavior in XNA

    - by Utkarsh Sinha
    I've been dabbling with XNA for a couple of days now. This chunk of code doesn't work as I expect. The goal is to render sprites individually and composite them on another rendertarget. P = RenderTarget2D(with RenderTargetUsage.PreserveContents) D = RenderTarget2D(with RenderTargetUsage.DiscardContents) for all sprites: graphicsDevice.SetRenderTarget(D); <draw sprite i> graphicsDevice.SetRenderTarget(P); <Draw D> graphicsDevice.SetRenderTarget(null); <Draw P> The result I get is - only the last sprite is visible. I'm sure I'm missing some piece of information about RenderTarget2D. Any hints on what that might be? Cross posted from - http://stackoverflow.com/questions/9970349/weird-rendertarget2d-behaviour

    Read the article

  • Any ideas on reducing lag in terrain generation?

    - by l5p4ngl312
    Ok so here's the deal. I've written an isometric engine that generates terrain based on camera values using 2D perlin noise. I planned on doing 3D but first I need to work out the lag issues I'm having. I will try to explain how I am doing this so that maybe someone can spot where I am going wrong. I know it should not be this laggy. There is the abstract class Block which right now just contains render(). BlockGrass, etc. extend this class and each has code in the render function to create a textured quad at the given position. Then there is the class Chunk which has the function Generate() and setBlocksInArea(). Generate uses 2D perlin noise to make a height map and stores the heights in a 2D array. It stores the positions of each block it generates in blockarray[x][y][z]. The chunks are 8x8x128. In the main game class there is a 3D array called blocksInArea. The blocks in this array are what gets rendered. When a chunk generates, it adds its blocks to this array at the correct index. It is like this so chunks can be saved to the hard drive (even though they aren't yet) but there can still be optimization with the rendering that you wouldn't have if you rendered each chunk separately. Here's where the laggy part comes in: When the camera moves to a new chunk, a row of chunks generates on the end of the axis that the camera moved on. But it still has to move the other chunks up/down in the blocksInArea (render) array. It does this by calculating the new position in the array and doing the Chunk.setBlocksInArea(): for(int x = 0; x < 8; x++){ for(int y = 0; y < 8; y++){ nx = x+(coordX - camCoordX)*8 ny = y+(coordY - camCoordY)*8 for(int z = 0; z < height[x][y]; z++){ blockarray[x][y][z] = Game.blocksInArea[nx][ny][z]; } } } My reasoning was that this would be much faster than doing the perlin noise all over again, but there are still little spikes of lag when you move in between chunks. Edit: Would it be possible to create a 3 dimensional array list so that shifting of chunks within the array would not be neccessary?

    Read the article

  • divide the image into 3*3 blocks

    - by Jayanth Silesh
    I have a matrix that does not happen to have dimensions that are multiples of 3 or it might. How can we divide the entire image into blocks of 3*3 matrices. (Can ignore the last ones which does not come under the 3*3 multiples. Also, the 3*3 matrices can be be saved in arrays. a=3; b=3; %window size x=size(f,1)/a; y=size(f,2)/b; %f is the original image m=a*ones(1,x); n=b*ones(1,y); I=mat2cell(f,m,n);

    Read the article

  • ajax call success function never called

    - by Shai
    The following code is a very simple ajax call to server that alerts back on success and complete events. From a reason I cannot understand on my development machine it works fins and alerts on success and complete but on server it never alerts on success. WHY ??? ** <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script> <script type="text/javascript"> function dummy() { $.ajax({ url: 'services/chatEngine.asmx/dummy', async: true, type: "POST", complete: function () { alert('Done'); }, success: function (a, b, c) { alert('Success'); } }); } </script> </head> <body> <form id="form1" runat="server"> <div> <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </ajaxToolkit:ToolkitScriptManager> <div id="userList">Users:<br /></div> <input id="Button3" type="button" value="dummy" onclick="dummy()" /> </div> </form> </body> </html> ** The server side dummy function returns nothing, code follows - Public Function dummy() As String Return "" End Function

    Read the article

  • Reading files from an embedded ZIP archive

    - by aix
    I have a ZIP archive that's embedded inside a larger file. I know the archive's starting offset within the larger file and its length. Are there any Java libraries that would enable me to directly read the files contained within the archive? I am thinking along the lines of ZipFile.getInputStream(). Unfortunately, ZipFile doesn't work for this use case since its constructors require a standalone ZIP file. For performance reasons, I cannot copy the ZIP achive into a separate file before opening it. edit: Just to be clear, I do have random access to the file.

    Read the article

  • preg_match_all to get all occurrences of a string

    - by i5z
    I am trying to find offset of all occurrences with preg_match_all e.g. $haystack = 'aaaab'; $needle = 'aa'; preg_match_all('/' . $needle . '/', $haystack, $matches); $matches is Array ( [0] => Array ( [0] => Array ( [0] => aa [1] => 0 ) [1] => Array ( [0] => aa [1] => 2 ) ) ) It returns offset of first and second group of aa ("aa" "aa" "b") from the haystack, while I am expecting it to return "aa" starting at index 1 as well. Array ( [0] => Array ( [0] => Array ( [0] => aa [1] => 0 ) [1] => Array ( [0] => aa [1] => 1 ) [2] => Array ( [0] => aa [1] => 2 ) ) ) Is there a way I can fix the regex or use some other function (which accepts regex) to get this done? PS: I know strpos which can do this, but I have few more things to search for hence will go with preg_match_all.

    Read the article

  • c++ networking issue- retrnsmittion without ccongestion

    - by gln
    I wrote an application in c++ which send data over tcp connection to several machines.as part of the protocol I use in my application, the other side sends hearbeat messages from time to time, then I know that the connection is still alive. now, I want this application to work on 100 machines or more at the same time. but, I see that sometimes I don't get these heartbeat messages although they sent: I see in wireshark that the packet arrived, then my OS doesn't ack on this message, so there are some retransmit without any ack from my OS. if I look in the window size property - I saw that there is no issue in this part. what can be the root cause for this behavior? it is something in my code that I should change? this is my select code: int res = select(fdCount, &readFds, NULL, NULL, NULL ); I'm using server 2008 r2. Please help me! thanks

    Read the article

  • What's the correct way to hide/prevent access to wp-admin

    - by Jaypee
    I'm dealing with this matter since a while, I have read a ton of articles and stuff out there but I couldn't find a place that shows the RIGHT way, standard, correct, whatever you like to call it, to prevent access to my wp-admin or wp-login.php On all Wordpress sites I see (the well made ones) you will never see anything if you type thesite.com/wp-admin As I could see, one way to do this is by restricting the access to that folder by creating an .htaccess file and restrict by IP the access to the folder. Seems to be the "cleanest" way to do. What I'm not sure about it is that I have a dynamic address provided by my ISP, so on a certain time my IP will change, that will force me to also change the .htaccess to my new address, I don't see that practical. I can set a range also, but by doing that I will also authorize access to all people within that range of IPs (other clients of my ISP for example). I'm then struggling to find the best/standard way to do this. Anyone can help me? Thanks

    Read the article

  • My php project work properly on local server but does not work properly when I put it online on the web server, WHY?

    - by Amr Mekkawy
    I'm working on a php project.. And I started building the admin login system and have already finished it and it works properly on my machine (local server) where I'm developing the project.. But when I moved it to a (web server) it didn't work properly as it was working on (local server). the problem that showed up is that when the admin get authentication to log in to the admin area, once he clicks any link in the page or even he reloads the page that page disappear and the login page appear again which mean the admin forced to log out even he didn't.

    Read the article

  • android custom map marker bounds

    - by max4ever
    Hello i am using a resized version of this marker( http://www.clker.com/clipart-orange-pin-4.html ) for showing markers in google maps on android. The problem is i don't know how to make the marker point match the coordinates. The arrow point is at about 1/5 of the Width coordinates and MAX of the Height. here is my class public class GestionaleItemizedOverlay extends com.google.android.maps.ItemizedOverlay { public GestionaleItemizedOverlay(Drawable defaultMarker, Context context) { //super(boundCenterBottom(defaultMarker)); super(boundCenter(defaultMarker)); this.mContext = context; } ... And this this.marker_poi = this.getContext().getResources().getDrawable(R.drawable.marker); this.marker_poi.setBounds(this.marker_poi.getIntrinsicWidth() / 2, this.marker_poi.getIntrinsicHeight(), this.marker_poi.getIntrinsicWidth() / 2, 0); new GestionaleItemizedOverlay(this.poi, this.context); Do i need to setBounds on the marker before passing it to the constructor? and why does super(defaultMarker) makes all the markers not to show ?

    Read the article

  • how to access jquery internal data?

    - by Unknown
    As you may or may not be aware as of jQuery 1.7 the whole event system was rewritten from the ground up. The codebase is much faster and with the new .on() method there is a lot of uniformity to wiring up event handlers. One used to be able to access the internal events data and investiate what events are registered on any given element, but recently this internal information has been hidden based on the following scenario... It seems that the "private" data is ALWAYS stored on the .data(jQuery.expando) - For "objects" where the deletion of the object should also delete its caches this makes some sense. In the realm of nodes however, I think we should store these "private" members in a separate (private) cache so that they don't pollute the object returned by $.fn.data()" Although I agree with the above change to hide the internal data, I have found having access to this information can be helpful for debugging and unit testing. What was the new way of getting the internal jquery event object in jQuery 1.7?

    Read the article

  • Error: The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value

    - by CPM
    I know that there are simmilar questions like this on the forum, however I am still having problems to update a datetime field o the database. I dont get any problems when inserting but I get problems when updating and I am formating the same way , like this: e.Values.Item("SelectionStartDate") = Format(startdate, "yyyy-MM-dd") + " " + startTime1 + ".000" startTime is of type string. I have tried different solution that I came across on the internet but still get this error. Please help. Thanks in advance

    Read the article

  • Event consumption in WPF

    - by webaloman
    I have a very simple app written in Silverlight for Windows Phone, where I try to use events. In my App.xaml.cs code behind I have implemented a GeoCoordinateWatcher which registers a gCWatche_PositionChanged method. This works ok, method is called after the position has been changed. What I want to do is fire an other event lets say DBUpdatedEvent after DB has been updated in the gCWatche_PositionChanged method. For this i delclared in the App.xaml.cs public delegate void DBUpdateEventHandler(object sender, EventArgs e); and I have in my App class: public event DBUpdateEventHandler DBUpdated; the event is fired like this in the end of gCWatche_PositionChanged method like this: OnDBUpdateEvent(new EventArgs()); and also I have declared : protected virtual void OnDBUpdateEvent(EventArgs e) { if (DBUpdated != null) { DBUpdated(this, e); } } Now I need to consume this event in my other Windows Phone app page which is a separate class PhoneApplicationPage. So I declared this method in this other Phone Page: public void DBHasBeenUpdated(object sender, EventArgs e) { Debug.WriteLine("DB UPDATE EVENT CATCHED"); } And in the constructor of this page I declared: DBUpdateEventHandler dbEH = new DBUpdateEventHandler(DBHasBeenUpdated); But when I test the application event is fired (OnDBUpdateEvent is called, but DBUpdated is null, therefore DBUpdated is not called - strange) and I have a problem that the other Phone Page is not catching the event at all... Any suggestions? How to catch that event. Thanks.

    Read the article

  • Autocomplete in rails format data and display in a beatiful way

    - by alexeyb
    I use rails 3.2.2 and autocomplete, I m selecting customer by name and formating it in a following way format.json { render :json = @customers.map{ |c| "#{c.name}:#{c.phone1}:#{c.email}" } } so, i need to parse json properly an display in a way i want for example I want write name in but make phone smaller and bold ,display it in different color. How i can achive that? <ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1; top: 416px; left: 0px; display: none; width: 419px;"> <li class="ui-menu-item" role="menuitem"> <a class="ui-corner-all" tabindex="-1">Adele Brekke:1-244-712-4421 x313:[email protected]</a> </li> <li class="ui-menu-item" role="menuitem"> <a class="ui-corner-all" tabindex="-1">Madeline O'Conner Sr.:486-349-1046 x6765:[email protected]</a> </li> </ul> Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >