Daily Archives

Articles indexed Saturday September 29 2012

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

  • Apply LADSPA filter to only one channel of multichannel output with Alsa and PulseAudio

    - by justinzane
    I want to apply a filter, specifically SWH's glame-bandpass-iir, to only one of several output channels. I want unfiltered output to go to the front, rear and LFE channels with bandpass filtered output for the center channel. I'm assuming that this needs to be done with Alsa's /etc/asound.conf but I cannot understand the documentation well enough to figure out how. If there is a better way, via PulseAudio, Jack or whatever, I'm open to whatever works. Thanks.

    Read the article

  • Nautilus window initial geometry with Gnome 3

    - by elomage
    I would like to open one or more Nautilus windows from the command line or a script at certain positions on my screen/desktop while in Gnome3. I could do this in Ubuntu 11.10 by specifying the geometry. For example, to open the window at the bottom right corner from the command line I could use: nautilus --geometry 600x475-0-0 ~/mystuff But using Gnome3 the geometry option is ignored, or overriden. Is there a way to make this work?

    Read the article

  • DLNA Server/Control Point like Windows Media Player

    - by csde_rats
    Yes, I know that most questions ending with "like Windows" are odd, but this one really bothers me ;) If you ever used some DLNA renderer (in my case DLNA-enabled loudspeakers) you probably know the handy "play to"-feature. From my knowledge of DLNA stuff I would guess, that Windows Media Player is both a DLNA server and control point here, so my question is: Is there any similar software for Linux accomplishing the same thing with minimal configuration effort? I normally use Banshee for my music library, but it doesn't seem that there is anything available for Banshee...

    Read the article

  • Why does Ubuntu reset brightness settings at the loading screen?

    - by leugim
    Since I first installed Ubuntu 11.10, I noticed that volume and screen brightness get reset every time Ubuntu starts. Why is this so? And what ways are there to keep brightness and volume levels after rebooting? I have found some scripts that change the screen-brightness at login. But this is not a good solution since login is slower because it seems to wait until the screen brightness is at the level specified by the script. After entering the password I see the screen brightness go down gradually. Only after this is complete (~1 or 2 seconds) does the background disappear and Unity come up. The screenbrightness is not remembered but instead redefined at login. So it gets remembered for the first part of the boot, then set to MAX and then again re-set to normal value by the script. My boot process is as follows: desired brightness: 2 (13,33%) / Max brightness: 15 (100%) Bios / brightness: OK GRUB (violet background color, white text) / brightness: OK Ubuntu loading screen with the dots / brightness: MAX (win7 loads with OK-brightness) User Login / brightness: MAX Unity starts / brightness: OK It seems to be more like a temporary patch than a actual solution. I'm looking for solutions that set the desired brightness permanently and consistently throughout the whole boot-process After updating to 12.04 the behavior is the same. I tried setpci -s 02:00.0 F4.B=XX The value of F4.B is always '0' regardless of what value I try to set it to (tried 0, ff, f, 5, etc) The solution in this answer does not have any noticeable effect: Desktop doesn't remember brightness settings after a reboot The variables at /sys/class/backlight/acpi_video0/ get changed if I use Fn+UP and Fn+DOWN Any help is appreciated. Thanks!

    Read the article

  • Wireless connection shows up but can't connect to internet with an Intel WiFi Link 5100

    - by Eddy
    I'm using an Asus G50V and I'm completely new to ubuntu. I just installed it and can connect to the internet with a wired connection and through wireless from my windows vista that I installed wubi on, and I can connect to my wireless network, but I can't actually connect to the internet through my wireless network. Thanks in advance. Network controller is an Intel Corporation WiFi Link 5100 according to lspci if that helps Also, the connection somehow started working after I decided to unplug my ethernet cable for the third time and headed upstairs after giving up for the day.. not sure how it happened, but after restarting, the connection stopped working again.. Wifi works on 11.10, but stops working when I upgrade back to 12.04..

    Read the article

  • How can redirect pages from old core PHP site to new Joomla site?

    - by pkachhia
    We have our old site into core PHP and we have developed it again into Joomla 1.5 last year( because of some limitations we have to build it into 1.5). Now the problem is the URL of sites changed as we have use SEO URLS on joomla. In between we have use .htaccess to redirect user from old URL to new like this Redirect /pages/oldpage.php http://www.mydomain.com/products/category/new_page.html Is this good practice to redirect user to new URL or not?(we have used same server). One more thing, We have used splash page on our site, and to set up it we have made some changes and because of it one of the important link is not working, and it is http://www.mydomail.com/index.php How can I get rid of it? I have used DirectoryIndex splash.html home.html index.php in .htaccess to open splash page first when someone open my site http://www.mydomain.com. Note: my website hosted on dedicated ubuntu server.

    Read the article

  • How do I use IIS7 rewrite to redirect requests for (HTTP or HTTPS):// (www or no-www) .domainaliases.ext to HTTPS://maindomain.ext

    - by costax
    I have multiple domain names assigned to the same site and I want all possible access combinations redirected to one domain. In other words whether the visitor uses http://domainalias.ext or http://www.domainalias.ext or https://www.domainalias3.ext or https://domainalias4.ext or any other combination, including http://maindomain.ext, http://www.maindomain.ext, and https://www.maindomain.ext they are all redirected to https://maindomain.ext I currently use the following code to partially achieve my objectives: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="CanonicalHostNameRule" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^MAINDOMAIN\.EXT$" negate="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="https://MAINDOMAIN.EXT/{R:1}" /> </rule> <rule name="HTTP2HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="https://MAINDOMAIN.EXT/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> ...but it fails to work in all instances. It does not redirect to https://maindomain.ext when user inputs https://(www.)domainalias.ext So my question is, are there any programmers here familiar with IIS7 ReWrite that can help me modify my existing code to cover all possibilities and reroute all my domain aliases, loaded by themselves or using www in front, in HTTP or HTTPS mode, to my main domain in HTTPS format??? The logic would be: if entire URL does NOT start with https://maindomain.ext then REDIRECT to https://maindomain.ext/(plus_whatever_else_that_followed). Thank you very much for your attention and any help would be appreciated. NOTE TO MODS: If my question is not in the correct format, please edit or advise. Thanks in advance.

    Read the article

  • Website with sections in Drupal?

    - by Matt Hampel
    What is the best way to create a website with sections in Drupal? Users need to be able to add, remove, and nest pages fairly easily. Pages added to a section should have an appropriate URL, like "/[section name]/[page title]". This seems like a straightforward task, but I can't find the right combination of tools to do it. Subsite comes close, but for some odd reason, doesn't set up the correct content paths. The closest I got was creating a book for each subsection, but that feels like I'm using the wrong tool for the job. Edited with my solution: I used organic groups with pathauto. I set pathauto so that pages in groups had URLs that were of the form [group path]/[page title].

    Read the article

  • Using Instance Nodes, worth it?

    - by Twitch
    I am making a 2d game where there are various environments with lots and lots of objects. There is a forest scene with like 1200 objects in total(trees mainly), of which around 100 are visible on the camera at any given time, as you move through the level. These are comprised of around 20 different kind of trees and other props. Each object is usually 2-6 triangles with a transparent texture. My developer asked me to replace each object in the scene with a node, and keeping only a minimal amount of actual objects which would be 300+ or so(?), since there are a few modified unique meshes. So he can instantiate the actual objects to keep the game light. Is this actually effective? And if so how much? I 've read about draw calls and such and I suppose that if I combine each texture (10 kinds of trees) in 1 mesh it will have the same effect?

    Read the article

  • AI Game Programming : Bayesian Networks, how to make efficient?

    - by Mahbubur R Aaman
    We know that AI is one of the most important part of Game Programming. Bayesian networks is one of the core part of AI at Game Programming. Bayesian networks are graphs that compactly represent the relationship between random variables for a given problem. These graphs aid in performing reasoning or decision making in the face of uncertainty. Here me, utilizing the monte carlo method and genetic algorithms. But tooks much time and sometimes crashes due to memory. Is there any way to implement efficiently?

    Read the article

  • DB2 timestamp PHP DateTime

    - by Dolfa
    After upgrade to PHP 5.3 my application is returning DB2 columns with Timestamp type as "2010-12-15-10.23.22.716000". This is causing problem for PHP DateTime function, as it fails with Failed to parse time string (2010-12-15-10.23.22.716000) at position 25 (0): Unexpected character It seems its having a problem with too much accuracy in DB2 timestamp. Can I somehow force connection to change timestamp format with it is fetching data into?

    Read the article

  • Is it OK to run an array with 22k strings in a PHP code on a shared web host?

    - by kuchikoo
    I'm new to writing code so kindly bear with me if this is a very noobish question. A couple of days back I asked a question about a PHP code that matches the the query entered by users on my website to an array stored within the PHP code and displays the matched queries. Here is the code I'm talking about Now I've ended up with a rather large list (over 22k) of strings that have to be stored in the array. Is it ok to run it like this? I'm hosting the site on a shared hostgator package, will this cause my site to crash? I don't know too much about DBs but can I somehow store this on MySQL instead of having it in the code?

    Read the article

  • 3x3 array = 10 numbers

    - by user1708505
    i have this code #include <math.h> #include <stdio.h> const int n = 3; const int s = 3; int getm(int mat[n][s]); int printm(int mat[n][s]); int main() { int m[n][s]; getm(m); printm(m); return 0; } int getm(int mat[n][s]) { for(int x = 0;x < n;x++) { for (int y = 0;y<s;y++) { scanf("%i ", &mat[x][y]); } } return 0; } int printm(int mat[n][s]) { for(int x = 0;x<n;x++) { for(int y = 0;y<s;y++) { printf("%i ", mat[x][y]); if(y==(s-1)) { printf("\n"); } } } } which shoud ask for 9 numbers to make a 3x3 matrix array, but it actually asks for 10 numbers, printm is working well - printing only 9 numbers. Where is error?

    Read the article

  • BASH: How to count all the human readable files?

    - by user1687406
    I'm taking an intro course to UNIX and have a homework question that follows: How many files in the previous question are text files? A text file is any file containing human-readable content. (TRICK QUESTION. Run the file command on a file to see whether the file is a text file or a binary data file! If you simply count the number of files with the ".txt" extension you will get no points for this question.) The previous question simply asked how many regular files there were, which was easy to figure out by doing find . -type f | wc -l I'm just having trouble determining what "human readable content" is, since I'm assuming it means anything besides binary/assembly, but I thought that's what -type f displays. Maybe that's what the professor meant by saying "trick question"? This question has a follow up later that also asks "What text files contain the string "csc" in any mix of upper and lower case?". Obviously "text" is referring to more than just .txt files, but I need to figure out the first question to determine this!

    Read the article

  • How to make g++ search for header files in a specific directory?

    - by Bane
    I have a project that is subdivided into a few directories with code in them. I'd like to to have g++ search for header files in the project's root directory, so I can avoid different include paths for same header files across multiple source files. Mainly, the root/ directory has sub-directories A/, B/ and C/, all of which have .hpp and .cpp files inside. If some source file in A wanted to include file.hpp, which was in B, it would have to do it like this: #include "../B/file.hpp". Same for another source file that was in C. But, if A itself had sub-directories with files that needed file.hpp, then, it would be inconsistent and would cause errors if I decided to move files (because the include path would be "../../B/file.hpp"). Also, this would need to work from other projects as well, which reside outside of root/. I already know that there is an option to manually copy all my header files into a default-search directory, but I'd like to do this the way I described.

    Read the article

  • Java Socks Proxy Socket Error

    - by Ionut Ungureanu
    I am trying to create a http request through a SOCKS (v4 / v5) proxy in Java. After reading about socks communication protocol on WikiPedia, I have put togheter this piece of code: Socket sock = new Socket(); InetSocketAddress remoteProxyAddress = new InetSocketAddress(proxy ip, proxy port); sock.connect(remoteProxyAddress, connTimeout); InputStream in = sock.getInputStream(); OutputStream out = sock.getOutputStream(); out.write(0x04); out.write(0x01); out.write((endpoint.getPort() >> 8) & 0xff); out.write((endpoint.getPort() >> 0) & 0xff); out.write(endpoint.getAddress().getAddress()); out.write(0x0); out.flush(); And here comes the part where I read from the proxy server. The problem is that the response is always "-1". I have tried the proxy on Firefox and it works perfect. So... the problem is in my app. Can anyone help me? Thanks!

    Read the article

  • getchar does not stop when using scanf

    - by Oz123
    I am have a difficulty understanding getchar(). In the following program getchar works as expected: #include <stdio.h> int main() { printf("Type Enter to continue..."); getchar(); return 0; } However, in the following program, getchar does not create a delay and the program ends: #include <stdio.h> int main() { char command[100]; scanf("%s", command ); printf("Type Enter to continue..."); getchar(); return 0; } I have the following weired workaround, which works, but I understand why: #include <stdio.h> int main() { char command[100]; int i; scanf("%s", command ); printf("Type Enter to continue..."); while ( getchar() != '\n') { i=0; } getchar(); return 0; } So my questions are: 1. What is scanf doing? Why does scanf do this ? 2. Why is my work around working? 3. What is a good way to emulate the following Python code: raw_input("Type Enter to continue")

    Read the article

  • SQL Server column level security

    - by user46372
    I think I need some pointers on security in SQL Server. I'm trying to restrict some of our end users from getting access to certain columns (i.e. SSN) on a table. I thought I could just use column level security to restrict access to the columns. That successfully prevented users from accessing the table directly, but I was surprised that they could still get to those columns through a view that accessed that table. I followed the tips here: http://www.mssqltips.com/sqlservertip/2124/filtering-sql-server-columns-using-column-level-permissions/ Those were very helpful, but when I created a view at the end, the intern was able to access that column by default I've read that views are the best way to accomplish this, but I really don't want to go through and change all of the views and the legacy front-end application. I would rather just restrict it once on the table and if a view tries to access that column it would just fail. Is that possible or am I misunderstanding how security works in SQL Server?

    Read the article

  • Calc_Anniversary Function with a Loop

    - by Rachel Ann Arndt
    Name: Calc_Anniversary Input: Pay_Date, Hire_Date, Termination_Date Output: "Y" if is the anniversary of the employee's Hire_Date, "N" if it is not, and "T" if he has been terminated before his anniversary. Description: Create local variables to hold the month and day of the employee's Date_of_Hire, Termination_Date, and of the processing date using the TO_CHAR function. First check to see if he was terminated before his anniversary. The anniversary could be on any day during the pay period, so there will be a loop to check all 14 days in the pay period to see if one was his anniversary. CREATE OR replace FUNCTION Calc_anniversary( incoming_anniversary_date IN VARCHAR2) RETURN BOOLEAN IS hiredate VARCHAR2(20); terminationdate VARCHAR(20); employeeid VARCHAR2(38); paydate NUMBER := 0; BEGIN SELECT Count(arndt_raw_time_sheet_data.pay_date) INTO paydate FROM arndt_raw_time_sheet_data; WHILE paydate <= 14 LOOP SELECT To_char(employee_id, '999'), To_char(hire_date, 'DD-MON'), To_char(termination_date, 'DD-MON') INTO employeeid, hiredate, terminationdate FROM employees, time_sheet WHERE employees.employee_id = time_sheet.employee_id AND paydate = pay_date; IF terminationdate > hiredate THEN RETURN 'T'; ELSE IF To_char(SYSDATE, 'DD-MON') = To_char(hiredate, 'DD-MON')THEN RETURN 'Y'; ELSE RETURN 'N'; END IF; END IF; paydate := paydate + 1; END LOOP; END; I need help with the loop..

    Read the article

  • jquery can't get the change event on select element

    - by user63898
    i have this code the jquery code never got triggered none of the scripts are triggered : $('select[name=privileges]').change(function(){ alert("id"); var id = $(this).find(':selected')[0].id; alert(id); $('#changevalue').val(id); }) or this: $("#privileges_select").change(function() { alert($('#privileges_select option:selected').html()); }); <form method="GET" action="create_new_user.php"> user:<input type="text" size="40" name="user_name"/> password:<input type="text" size="40" name="password"/> <select name=privileges id="privileges_select"> <option name='opt_1'>admin</option> <option name='opt_2'>ordinary</option> </select> <input type="hidden" name="item_options_id" value="" id="changevalue" /> <input type="submit" value ="create" /> <input type="reset" /> </form> in the end i like to send the selected option id in the form get

    Read the article

  • Create a rich text control field in VBA for Word 2010

    - by mkn
    I have a control field where I dynamically add certain text. That works well so far. The problem is that in one text I have an input field where the user can type in text. I need to hardcode the form text input field into the VBA code. How is this achieved? Or can someone point me in the right direction? In the following code snippet I need to replace the [InputField] by a VBA input field. ActiveDocument.SelectContentControlsByTitle("Bottom").Item(1).Range.Text = _ "Some Text" & vbNewLine & _ "Some Text" & vbNewLine & _ "Some Text" & vbNewLine & _ "Text [InputField] Text"

    Read the article

  • Unicode in fpc doesn't work

    - by user1546454
    Hi I'm Romanian and I can't write Unicode in Free Pascal Compiler. I try to write ?,î,â,a,? and it doesn't work. I tried with dos windows changed fonts, tried chcp. I even made a batch file which would do chcp 65001 and start the app. By default when I tried to write these letter I got "?" but when I started it with the batch file it just didn't write anything. I tried AnsiString, UnicodeString, UTF8String and all didn't work. And I think the problem is in the compiler. Does anyone know a solution?

    Read the article

  • get Random in ArrayList has error of java.lang.IllegalArgumentException: n must be positive

    - by gabrielle fregil
    In my ArrayList, i have get a random Item from my ArrayList for the equip method. Whenever i use my tester, the terminal window prints java.lang.IllegalArgumentException: n must be positive when I try to call random for the size. I tried to change the value of totalElements to the integer size of the elements, then the error would be an OutOfBoundsExeption import java.util.*; import java.util.Scanner; import java.util.Random; public class GameMaster { private int turn, totalElements; private boolean winner; private Avatar x1; private Avatar x2; private ArrayList<Item> inventory; public GameMaster(Avatar a1, Avatar a2) { x2 = a1; x1 = a2; turn = 1; winner = false; inventory = new ArrayList<Item>(); totalElements = 0; } private void fillInventory() { inventory.add( new Item( "Zealot Blades", true, 8 ) ); inventory.add( new Item( "BFG", true, 13 ) ); inventory.add( new Item( "Synthetic Cloth", false, 7 ) ); // more items inventory.add( new Item( "Gauss Rifle", true, 9 ) ); inventory.add( new Item( "Flight Unit", false, 6 ) ); totalElements = inventory.size(); } public String equip() { Avatar w; String a; if (turn%2==1) w=x2; else w=x1; if (w.beltIsFull()) { a = w.getName() + "'s belt is full. \n"; } else { turn++; Random generator = new Random(); Item rand = inventory.get(generator.nextInt(totalElements)); //terminal window in blueJ: java.lang.IllegalArgumentException: n must be positive a = w.getName()+" is equiped with "+rand.getName()+"."; } return a; }

    Read the article

  • CSS issue with margin: auto

    - by user1702273
    Hi am having an issue with the margin auto of my website where i have a wrapper div with the width set to 1000px and the margins top and bottom to 0 and left and right to auto. I have a navigation menu in the side bar, where i used java script to replace the same div with different tables. when i click a link in the menu the wrapper shifts right some px and the comes to original, I don't want that action i want the wrapper to be static and not to vary at any time. how can i achieve that. when i set the margin to just 0, so problem with positioning. But i want the wrapper to be centered. Here is my css code: body { background-color:#E2E3E4; color:#333; margin:0; padding:0; font-size: 12px; } #wrapper { width:1000px; margin:0 auto; margin-bottom:10px; } #header1 { width:1000px; height:44px; margin:0 auto; background-color:#ED6B06; } #header2 { width:1000px; height:40px; margin:0 auto; border-bottom:1px solid #EDE9DE; } #header3 { width:1000px; height:40px; margin:0 auto; border-bottom:1px solid #EDE9DE; } #header2 p { margin:0 auto; font-size:20pt; color: #364395; font-smooth: auto; margin-left:15px; margin-top:5px; } #welcome { width:600px; float:left; padding:10px; margin:0 auto; } #status{ margin:0 auto; width:50px; float:right; padding:10px; margin-top:3px; margin-right:15px; } #content { width:780px; float:right; } #sidebar { width:150px; margin-top:15px; margin-left:10px; float:left; border-right:1px solid #EDE9DE; margin-bottom:25px; } #footer { clear:both; margin:0 auto; width:1000px; height:44px; border-top:1px solid #EDE9DE; } HTML: <html> <head> <link rel="stylesheet" type="text/css" href="style/style.css" media="screen" /> <title>Pearson Schools Management Portal</title> </head> <body id="home"> <div id="wrapper"> <?php include('includes/header1.php'); ?> <?php include('includes/header2.php'); ?> <?php include('includes/header3.php'); ?> <div id="content"> <h2>Welcome to Portal!</h2> </div> <!-- end #content --> <?php include('includes/sidebar.php'); ?> <?php include('includes/footer.php'); ?> </div> <!-- End #wrapper --> <link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> <?php include('scripts/index_data.js'); ?> </body>

    Read the article

  • making a queue program

    - by seventhief
    Hi can someone help me making a queue program. i want to set the array[0] to be array[1] just in display but in real i am adding value at array[0]. i got how to run the add function to it. but i can't do the view and delete command that will view from ex. array[0] to array[4], when displayed array[1] to array[5] with the value inserted. #include <stdio.h> #include <stdlib.h> #define p printf #define s scanf int rear = 0; int front = 0; int *q_array = NULL; int size = 0; main() { int num, opt; char cont[] = { 'y' }; clrscr(); p("Queue Program\n\n"); p("Queue size: "); s("%d", &size); p("\n"); if(size > 0) { q_array = malloc(size * sizeof(int)); if(q_array == NULL) { p("ERROR: malloc() failed\n"); exit(2); } } else { p("ERROR: size should be positive integer\n"); exit(1); } while((cont[0] == 'y') || (cont[0] == 'Y')) { clrscr(); p("Queue Program"); p("\n\nQueue size: %d\n\n", size); p("MAIN MENU\n1. Add\n2. Delete\n3. View"); p("\n\nYour choice: "); s("%d", &opt); p("\n"); switch(opt) { case 1: if(rear==size) { p("You can't add more data"); } else { p("Enter data for Queue[%d]: ", rear+1); s("%d", &num); add(num); } break; case 2: delt(); break; case 3: view(); break; } p("\n\nDo you want to continue? (Y\/N)"); s("%s", &cont[0]); } } add(int a) { q_array[rear]=a; rear++; } delt() { if(front==rear) { p("Queue Empty"); } else { p("Queue[%d] = %d removed.", front, q_array[front]); front++; } } view() { int i; for(i=front;i<=rear;i++) p("\nQueue[%d] = %d", i, q_array[i]); }

    Read the article

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