Daily Archives

Articles indexed Wednesday November 13 2013

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

  • I can't modify the screen brightness on Xubuntu 13.10

    - by linuxer
    I got this problem with brightness on my fresh xubuntu 13.10 install.. It ain't inc/decrease the screen brightness when pressing Fn+F5/F6 !! I've tried some solutions like setting these values in the /etc/default/grub file and sudo updating grub (this worked for me on my previous xubuntu 13.04 install) GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor" GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor" But still not working though :/ I got a Sony VAIO VPCEJ3B1E running xubuntu 13.10 x64bit and an NVidia GeForce 410M and using the propritory drivers 319 Thanks in advace!

    Read the article

  • Please help, mounting other partitions on startup [duplicate]

    - by Kongthap
    This question already has an answer here: Is there a program to mount all of my drives automatically? 2 answers These are my all partitions. This is my /etc/fstab I would like to auto mount sda3 (NTFS), sda6 (ext4), sda7 (ext4) on startup, please help me edit the /etc/fstab file. I've searched for GUI way of doing this but I cannot find pysdm on the software center. Thanks. Edited!!! I've edited fstab as shown in the picture, I got error during booting, please help me find out what went wrong. P.S. I've created /mnt/extdisk1, I copied and pasted the UUID so it was not misspelling.

    Read the article

  • Automatic switching between monitor configurations

    - by Michael Aquilina
    I have a laptop and an external monitor and i was wondering if there was a simple approach to switching between multiple monitor configurations based on the detected available displays. For example: When i am at home and i plug in my external monitor i would like this to automatically become enabled and the laptop screen to become disabled. As soon as i pull out the display cable for the external monitor, i would like the laptop screen to automatically become enabled. I was expecting this to just "work" just like it does in windows - but it seems to be much harder than that. I am aware of the xrandr command to turn displays on and off but i cannot seem to find a way to get this to work the way i describe above. I had also found this post about switching between multiple monitor configurations and the results seem a bit inconclusive. However i was hoping that with xrandr there would be a simpler solution. For me, the fact that when i pull out my external monitor the screen just goes black and i get an error message is a big issue holding me back from making the complete switch to linux as i move around alot as a student. My OS of choice is currently Kubuntu 12.04 but i am willing to change to something else if it provides a better way of setting up the described setup.

    Read the article

  • How to remove the black bar at the top of my screen?

    - by Casper Li
    The display area is not fit to my monitor(1440x900) and there is a black bar at the top of my screen. The bottom of the display area can't be displayed. How can I deal with this problem? Moreover, I don't know how to install my display card's driver(MSI R4770 Cyclone). Do I need to install it? Here are some related pictures : My monitor My monitor Displays xrandr Thank you for your attention

    Read the article

  • Unable to locate Grizzly packages in Ubuntu 13.04 Server

    - by user162681
    I have installed Ubuntu 13.04 server in my x86 based laptop and then added the desktop packages on top of it. I have downloaded all the packages using apt-get. I have MySQL, PostgreSQL, Python 3.3, etc. But I am unable to locate Grizzly-specific Nova, Swift, and Glance packages (OpenStack). I am using this command: dpkg -l | grep Nova dpkg -l | grep Glance etc. Isn't Ubuntu 13.04 Server supposed to come with Grizzly automatically?

    Read the article

  • How to dynamically generate PDF documents

    - by Thomas
    I want to build a web application for generating stylish PDF documents. The layout should be based on a design templates and the data should come dynamically from the database. Ideally I want to design the template in a "publishing like" tool with placeholders and replace these placeholders by the web application with the data from the database. Think of something like an invoice generator, where a customer could choose from different invoice templates and the invoice data itself coming from the DB. Thanks for your ideas!

    Read the article

  • Include latest searches in search engines index

    - by drcelus
    My websites generally include a page with the (user input) latest searches. I know it's not a good security practice to allow this since you can find undesired content. On the other hand it boosts the number of pages indexed since every new search can provide a link on google and people can find you with related keywords that you are not using on your web page. What is the rationale behinf including or excludingthis results in search engines index ?

    Read the article

  • Beginning android games, 2nd edition engine

    - by Benjamin Stephen
    I recently bought the book from Apress and have worked my way through it, unfortunately, it seems to just be dealing with side scrolling games and not Zelda-like top down games. I was wondering if anyone out there can tell me if it's possible to use their engine to create such a game? It doesn't go into how to build a top down tile map. Using the engine in their book, how can I make a tile map easily that has walls and things like that? Any help would be appreciated. Thanks in advance.

    Read the article

  • Implementing Light Volume Front Faces

    - by cubrman
    I recently read an article about light indexed deferred rendering from here: http://code.google.com/p/lightindexed-deferredrender/ It explains its ideas in a clear way, but there was one point that I failed to understand. It in fact is one of the most interesting ones, as it explains how to implement transparency with this approach: Typically when rendering light volumes in deferred rendering, only surfaces that intersect the light volume are marked and lit. This is generally accomplished by a “shadow volume like” technique of rendering back faces – incrementing stencil where depth is greater than – then rendering front faces and only accepting when depth is less than and stencil is not zero. By only rendering front faces where depth is less than, all future lookups by fragments in the forward rendering pass will get all possible lights that could hit the fragment. Can anyone explain how exactly you need to render only front faces? Another question is why do you need the front faces at all? Why can't we simply render all the lights and store the ones that overlap at this pixel in a texture? Does this approach serves as a cut-off plane to discard lights blocked by opaque geometry?

    Read the article

  • Naming the Weapons and Designing Weapons Based in Real-life During Game Development [duplicate]

    - by David Dimalanta
    This question already has an answer here: Do you need a license for weapon models? 6 answers Is it legit or copyright safe if I name the actual name of the gun model such as AK-47, M16, Remington 870, and so on? I'm on the works for making a simple 2D 3rd-person shooter game. One of the examples is the Counter Strike and the game listed the name of weapons based on the real life models and so developers decided to created this named it for the weapon designs. If not, should I make either falsify the name of weapons (e.g. 9mm instead of Glock 17 from a Syphon Filter game) or make fictional weapons like the ones developed behind Halo games?

    Read the article

  • Proper method to update and draw from game loop?

    - by Lost_Soul
    Recently I've took up the challenge for myself to create a basic 2d side scrolling monster truck game for my little brother. Which seems easy enough in theory. After working with XNA it seems strange jumping into Java (which is what I plan to program it in). Inside my game class I created a private class called GameLoop that extends from Runnable, then in the overridden run() method I made a while loop that handles time and such and I implemented a targetFPS for drawing as well. The loop looks like this: @Override public void run() { long fpsTime = 0; gameStart = System.currentTimeMillis(); lastTime = System.currentTimeMillis(); while(game.isGameRunning()) { currentTime = System.currentTimeMillis(); long ellapsedTime = currentTime - lastTime; if(mouseState.leftIsDown) { que.add(new Dot(mouseState.getPosition())); } entities.addAll(que); game.updateGame(ellapsedTime); fpsTime += ellapsedTime; if(fpsTime >= (1000 / targetedFPS)) { game.drawGame(ellapsedTime); } lastTime = currentTime; } The problem I've ran into is adding of entities after a click. I made a class that has another private class that extends MouseListener and MouseMotionListener then on changes I have it set a few booleans to tell me if the mouse is pressed or not which seems to work great but when I add the entity it throws a CME (Concurrent Modification Exception) sometimes. I have all the entities stored in a LinkedList so later I tried adding a que linkedlist where I later add the que to the normal list in the update loop. I think this would work fine if it was just the update method in the gameloop but with the repaint() method (called inside game.drawGame() method) it throws the CME. The only other thing is that I'm currently drawing directly from the overridden paintComponent() method in a custom class that extends JPanel. Maybe there is a better way to go about this? As well as fix my CME? Thanks in advance!!!

    Read the article

  • Mirror a website with httrack while executing javascript

    - by Martin
    I want do save a mirror of www.youtube.com/tv. I obviously do not want to save the videos. I want the code running the website in a local copy, everything else can stay remote. The code I want is mainly contained in 2 files: live.js and app-prod.js. I tried using httrack. I have issue parsing the javascript to load anything past the first file: live.js. The %P parameter does not help. httrack www.youtube.com/tv +* -r6 --mirror -%P -j It doesn't go further than live.js because some javascript needs to be executed to load the next file. I know I can do this manually with any browser. I want to automate the process. Is httrack able to do this by itself? If yes, how?

    Read the article

  • Android app crashes on Async Task

    - by Telmo Vaz
    why is my APP crashing when I invoke the AsyncTask? public class Login extends Activity { String mail; EditText mailIn; Button btSubmit; @Override protected void onCreate(Bundle tokenArg) { super.onCreate(tokenArg); setContentView(R.layout.login); mailIn = (EditText)findViewById(R.id.usermail); btSubmit = (Button)findViewById(R.id.submit); btSubmit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View thisView) { new LoginProc().execute(); } }); } public class LoginProc extends AsyncTask<String, Void, Void> { @Override protected void onPreExecute() { mailIn = (EditText)findViewById(R.id.usermail); mail = mailIn.getText().toString(); super.onPreExecute(); } @Override protected Void doInBackground(String... params) { Toast.makeText(getApplicationContext(), mail, Toast.LENGTH_SHORT).show(); return null; } } } I'm trying to make the String name get it's value on the preExecute method, but it happens that the app crashes on that point. Even if I take the preExecute and do that on the doInBrackground, it still crashes. What's wrong?

    Read the article

  • Javascript ( jQuery ) Error: SyntaxError: missing ) after argument list

    - by Obmerk Kronen
    I have the simplest function : jQuery(document).ajaxSuccess(function(e, xhr, settings) { var widget_id_base = '099_cf_samurai_widget'; if(settings.data.search('action=save-widget') != -1 && settings.data.search('id_base=' + widget_id_base) != -1) { // alert(\'yay!'\); my_function_chosen_099(); } }); function my_function_chosen_099(){ jQuery(".chzn-select").chosen(); } which works just fine , but When I add the width Parameter like so : function my_function_chosen_k99(){ jQuery(".chzn-select").chosen(width:'95%'); } it gives me an error of: Error: SyntaxError: missing ) after argument list Source File: http://localhost/my-path/js/o99.chosen.init.js?ver=k99 Line: 20, Column: 41 Source Code: jQuery(".chzn-select").chosen(width:"95%"); .............................................| I have tried escaping: jQuery(".chzn-select").chosen(width:\"95%"\); and even double jQuery(".chzn-select").chosen(width:\\"95%"\\); and in my desperation, even jQuery(".chzn-select").chosen( width:"95%" ); I checked and rechecked the closing of brackets , and also tried with single quotes ' - but nothing . There appear to be a lot of similar questions here , but all I saw was escaping problems, ANd I have tried all that I know .. What is wrong here ?? I assume it is not a simple syntax error - or is it ? ( one which I can not find .. )

    Read the article

  • what is the format of a binary image & how is it different from jpg, png images?

    - by Rahulsingh190
    I searched the internet for the basic formats of image files (e.g. .jpg, .png, .gif) as there is a specific format for .doc, .pdf etc. But didn't got anything relevant. And today I also came with an .bin image format. BIN signifies that the image is in the Binary format. So, what is the Internal format of .jpg image file. And How is it different from .bin (Binary) format. Because everything is Basically saved in Binary Form. And How is BITMAP Image different from .jpg format.

    Read the article

  • Overriding CSS style 'display:none' in javascript

    - by jsarma
    I'm trying to add a checkbox toggle that hides and shows list elements by changing their style display attribute from "none" to "inline", but it's not working. I'm setting the attribute's style to "display:none" in the CSS file. Then I set it to "display:inline" in javascript when someone checks a box. The javascript is successfully changing the element's property to inline, but for some reason the element remains invisible. If I do the opposite, by setting the display to inline in the CSS and overriding it to none in the javascript, it works fine. I don't see why this would work one way but not the other. I'm using chrome. Here is the code. Any feedback is appreciated. CSS file: #tabmenu li[status='disabled'] a, a.active, #disabled { color: #777777; background: #DDDDDD; font: normal 1em Arial; border: 1px solid black; border-radius: inherit; padding: 0px 5px 0px 5px; margin: 0px; text-decoration: none; cursor:hand; display:none; } HTML: <ul id="tabmenu"> <li name='tab' id='tab1' selected='no' status='disabled'></li> </ul> JAVASCRIPT (from command line, or onchange of a checkbox) tab = document.getElementById('tab1'); tab.style.display = 'inline';

    Read the article

  • Car Class (first time with classes)

    - by user2967605
    For an assignment I needed to use a class named car and have it display the make and model, and also have the speed increase by 5 when you use accelerate and decrease by 5 when you brake. My teacher helped me along the way but when I got to the end I couldn't get it to run. Could someone correct me and tell my why it's wrong? Imp--------- #include <iostream> #include <string> using namespace std; void accelerate() { int speed; speed = speed + 5; } void brake() { int speed; speed = speed - 5; } Header #include <iostream> #include <string> using namespace std; class car { public: car(int getYear, string getMake); void accelerate(); void brake(); private: int year; string make; int speed; }; CarClass.cpp #include <string> #include "CarClass.h" using namespace std; int main() { car.(2013,"Kia") car.accelerate() car.brake() }

    Read the article

  • Issued by DNOA service access token parsing and validating in Java application

    - by Regfor
    I am creating OAuth 2.0 access token using DotNetOpenAuth, like here public AccessTokenResult CreateAccessToken( IAccessTokenRequest accessTokenRequestMessage) { var token = new AuthorizationServerAccessToken(); token.Lifetime = TimeSpan.FromMinutes(10); var signCert = LoadCert(Config.STS_CERT); token.AccessTokenSigningKey = (RSACryptoServiceProvider) signCert.PrivateKey; var encryptCert = LoadCert(Config.SERVICE_CERT); token.ResourceServerEncryptionKey = (RSACryptoServiceProvider) encryptCert.PublicKey.Key; var result = new AccessTokenResult(token); return result; } Token issued by this method looks like: { "access_token": "gAAAAH44atDAyWeu8BFwhLof7rtBRpiZrSlAC0zci8xU81tXHZDVkBX8LXrMLDHDYfimjuSOsdrXQIAY7Xf4JnK1x_fo_JSmvuiA5CvO5JUJNuEmHNSlR4ePO4tBPkOHQnN50DIRJMbHJdQrFZCqqaWz6s0iuvCuTMcTua6J0yaTPQaD9AAAAIAAAADHgef78SHh4-K2aZ87xYRoRFfmQ0lc3ET7Y5vAS7BadLM5btYvmrSkAWsCxhUji92D0LbKgyVkbQuuw5LnRP_zsxe_W_VztTqZ5m9PwJDL6q7McrUfiVQj_XBQqpv2slBeouD0F1k1KjVedR9Pwm7ganz4R7dmeYivnx8f0_isEGBqSZrtnILoit3SOCPyVxmIwizYwLE2bQOtlwVpqtrBMyzc4MVPVyaSiJb2-Lj5tOftEWl0k93Qmr8uzmjDyeCn3TsFX0f_qFgCmxp32_kt4ZTMf4zgmh5yUS1Hy7ERNQxpCIxRTx9yma7JN_K5Pss", "token_type": "bearer", "expires_in": 43200, } I need to know whether Java application will be able to parse and validate token issued in such manner?

    Read the article

  • Counting the amount of letters in all permutations of words in R

    - by Rhodo
    I have some words: shapes<- c("Square", "Triangle","Octagon","Hexagon") I want to arrange them in pairs: shapescount<-combn(shapes, 2) shapescount [,1] [,2] [,3] [,4] [,5] [,6] [1,] "Square" "Square" "Square" "Triangle" "Triangle" "Octagon" [2,] "Triangle" "Octagon" "Hexagon" "Octagon" "Hexagon" "Hexagon" I want to count each of the groupings of the letters in the pairs, for instance first pair is "6" for "Square" and "8" for "Triangle" giving me "14" for the first pair, and so on.

    Read the article

  • Git in terminal

    - by goodcow
    I tried making my first repo on github. I copy pasted their code while on the directory of my entire system (I think that was a mistake). As a result, the terminal line always says ~ git:(master) ? before every command. It does not go away even when I quit terminal. I am using zsh. The code I pasted was: touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/***/***.git git push -u origin master On top of that, I can't even seem to figure out how to add my files to the repo. Help on how to not always have git:(master) before every bash command and how to make a repo? Thanks!

    Read the article

  • How to use switch statement with Enumerations C#

    - by Maximus Decimus
    I want to use a switch statement in order to avoid many if's. So I did this: public enum Protocol { Http, Ftp } string strProtocolType = GetProtocolTypeFromDB(); switch (strProtocolType) { case Protocol.Http: { break; } case Protocol.Ftp: { break; } } but I have a problem of comparing an Enum and a String. So if I added Protocol.Http.ToString() there is another error because it allows only CONSTANT evaluation. If I change it to this switch (Enum.Parse(typeof(Protocol), strProtocolType)) It's not possible also. So, it's possible to use in my case a switch statement or not?

    Read the article

  • Find -type d with no subfolders

    - by titatom
    Good morning ! This is a simple one I believe, but I am still a noob :) I am trying to find all folders with a certain name. I am able to do this with the command find /path/to/look/in/ -type d | grep .texturedata The output gives me lots of folders like this : /path/to/look/in/.texturedata/v037/animBMP But I would like it to stop at .texturedata : /path/to/look/in/.texturedata/ I have hundreds of these paths and would like to lock them down by piping the output of grep into chmod 000 I was given a command with the argument -dpe once, but I have no idea what it does and the Internet has not be able to help me determine it's usage Thanks you very much for your help !

    Read the article

  • C++ Recursive function that reverses the order of an array's indexes between two bounds

    - by CPT Kirk
    I am trying to write a recursive function that has three arguments; an array and two array indexes. The function should reverse the order of the values between the two indexes. I would like to understand what is happening instead of just being told an answer. Here is my code so far: #include <iostream> using namespace std; char switchAroo(char a[], int b1, int b2); int main() { char a[6] {'A', 'B', 'C', 'D', 'E', '\0'}; cout << a; switchAroo(a, 2, 5); return 0; } char switchAroo(char a [], int b1, int b2) { char temp; if (b1 == b2) cout << "The array after switchAroo is " << a << endl; else { temp = a[b1]; a[b1] = a[b2]; a[b2] = temp; b1++; b2--; return switchAroo(a, b1, b2); } } I am getting the following warning code: warning C4715: 'switchAroo' : not all control paths return a value Any help would be greatly appreciated.

    Read the article

  • Regular expressions in python unicode

    - by Remy
    I need to remove all the html tags from a given webpage data. I tried this using regular expressions: import urllib2 import re page = urllib2.urlopen("http://www.frugalrules.com") from bs4 import BeautifulSoup, NavigableString, Comment soup = BeautifulSoup(page) link = soup.find('link', type='application/rss+xml') print link['href'] rss = urllib2.urlopen(link['href']).read() souprss = BeautifulSoup(rss) description_tag = souprss.find_all('description') content_tag = souprss.find_all('content:encoded') print re.sub('<[^>]*>', '', content_tag) But the syntax of the re.sub is: re.sub(pattern, repl, string, count=0) So, I modified the code as (instead of the print statement above): for row in content_tag: print re.sub(ur"<[^>]*>",'',row,re.UNICODE But it gives the following error: Traceback (most recent call last): File "C:\beautifulsoup4-4.3.2\collocation.py", line 20, in <module> print re.sub(ur"<[^>]*>",'',row,re.UNICODE) File "C:\Python27\lib\re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or buffer What am I doing wrong?

    Read the article

  • golang closure variable scope

    - by waaadim
    I'm reading 'CreateSpace An Introduction to Programming in Go 2012' and on page 86 I found this evil magic func makeEvenGenerator() func() uint { i := uint(0) return func() (ret uint) { ret = i i += 2 return } } // here's how it's called nextEven := makeEvenGenerator() fmt.Println(nextEven()) fmt.Println(nextEven()) fmt.Println(nextEven()) 1) Why is i not resetting ? 2) is nextEven() returning and uint or is Println so smart that it can work with everything ?

    Read the article

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