Daily Archives

Articles indexed Monday January 10 2011

Page 19/36 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Use gnome custom themes appearance in KDE?

    - by piedro
    Is there a way to get the colors of a gnome custom theme to KDE without matching every single setting manually? (Theres tons of different color settings in the KDE color schemes, most of which I even don't know where they are applied ... I use KDE with compiz to run emerald as windows decorator. Because I really like the "Elementary"-theme. Because my eyes aren't that great I had to tweak the gtk-elementary theme for some additional contrast. I saved it as "elementary-piedro". Now I want to choose this theme in KDE-Systemsettings/appearance/gtk-applications but it doesnt't show the tweaked version? Where is it saved by the normal "gnome appearance preferences"-utility? Is there a way to use the tweaked settings for KDE-applications?

    Read the article

  • Override Built-In Maverick Keyboard Shortcuts

    - by jrc03c
    Having used the Command+M keyboard shortcut to minimize windows in OS X, I'd like to use the same functionality in Ubuntu 10.10. When I try, though, it only brings up the "communications" section of the indicator applet; like so: In the Keyboard Shortcuts preferences, I have set as the minimize shortcut "Mod4+M", which I got by capturing the Apple "Command" key and the "M" key. I find no other shortcut using this key combination in Keyboard Shortcuts, and yet I cannot get the window to minimize when using it. Does anyone know how to override Ubuntu's default usage of this key combination? Thanks!

    Read the article

  • Is it possible to save output from a command to a file after the command already has been executed?

    - by NES
    Does an elegant way exist to save the output of a command to a file after the command has been run, with the terminal window is open? I mean once the command has been executed in the terminal. The output is still there in terminal. Now i could copy & paste all the lines and save it to a file. But perhaps does a method exist to somehow write the output buffer of a terminal window to a file or even better the output of an already executed command?

    Read the article

  • how to retrieve the most entered value from database mssql using vb.net ?

    - by D Infosystems
    if i have mssql database with record displayed below : Id Serv-code Value 1 100 3 2 100 4 3 100 3 4 100 3 5 101 5 6 101 5 the logic i want when i search for the record using serv_code 100 then the output will be the average means 3 will be displayed in textbox because the value 3 will be entered 3 times than 4 as shown above .... and if if i search record with serv_code 100 and if the value of serv_code is equal means 3 and 4 only then the recent entered value will be displayed in textbox..

    Read the article

  • StringBuilder/StringBuffer vs. "+" Operator

    - by matt.seil
    I'm reading "Better, Faster, Lighter Java" (by Bruce Tate and Justin Gehtland) and am familiar with the readability requirements in agile type teams, such as what Robert Martin discusses in his clean coding books. On the team I'm on now, I've been told explicitly not to use the "+" operator because it creates extra (and unnecessary) string objects during runtime. But this article: http://www.ibm.com/developerworks/java/library/j-jtp01274.html Written back in '04 talks about how object allocation is about 10 machine instructions. (essentially free) It also talks about how the GC also helps to reduce costs in this environment. What is the actual performance tradeoffs between using "+," "StringBuilder," or "StringBuffer?" (In my case it is StringBuffer only as we are limited to Java 1.4.2.) StringBuffer to me results in ugly, less readable code, as a couple of examples in Tate's book demonstrates. And StringBuffer is thread-synchronized which seems to have its own costs that outweigh the "danger" in using the "+" operator. Thoughts/Opinions?

    Read the article

  • .NET CF on Windows CE - problem with filtering system messages

    - by mack369
    Hello, I'm trying to get every windows message that tells that the user has touched the screen. It works everywhere, except the button, when it is disabled. It seems that the application doesn't get any message when clicked on disabled control. I'm using OpenNetCF Application2 class for filtering messages: Application2.AddMessageFilter(Device.PowerManager); Application2.Run(new MainForm()); PowerManager class contains a following method (as required by IMessageFilter interface): public bool PreFilterMessage(ref Microsoft.WindowsCE.Forms.Message m) { log.DebugFormat("windows message {0} - 0x{0:X}", m.Msg); if (m.Msg == 0x0201 || m.Msg == 0x8001 || m.Msg == 0x0005) { return this.ResetPowerManager(); } return false; } in the log file there is no indication of a windows message when clicking on disabled button. I'm wondering how is it possible and how can I get this message.

    Read the article

  • How should I mock out my data connectivity

    - by BobTheBuilder
    I'm trying to unit test my Data Access Layer and I'm in the process of trying to mock my data connectivity to unit test my DAL and I'm coming unstuck trying to mock out the creation of the commands. I thought about using a queue of IDbParameters for the creation of the parameters, but the unit tests then require that the parameters are configured in the right order. I'm using MOQ and having looked around for some documentation to walk me through this, I'm finding lots of recommendation not to do this, but to write a wrapper for the connection, but it's my contention that my DAL is supposed to be the wrapper for my database and I don't feel I should be writing wrappers... if I do, how do I unit test the connectivity to the database for my wrapper? By writing another wrapper? It seems like it's turtles all the way down. So does anyone have any recommendations or tutorials regarding this particular area of unit testing/mocking?

    Read the article

  • ExtJS align radiogroup in form

    - by bensiu
    I am looking for way to setup FormPanel that labels will be aligned left on left side (this is default) and field aligned rigth on right side - they are aligned left... how long I am dealing with DisplayField, TextField, or NumberField adding ctCls: 'x-form-element-currency', where .x-form-element-currency { text-align: right; } do the work and is nicely aligned to right My problem start when I try to do this same with radiogroup element (I want to have Yes-No radio select) ctCls: what adding class to the correct (in my opinion) container abowe radiogroup does not make aligment... What I do wrong ?

    Read the article

  • How to catch an exception and email information about it in liferay portlet

    - by heikkim
    I have a custom portlet made for liferay and sometimes it throws an exception. Why it throws exceptions is irrelevant. How to catch exceptions thrown by portlet handler methods in order to email information about them? I know I could do try catching on every handler method but it would be a much more elegant and cleaner solution to catch the exception on a higher level and just email some information about the error. I'm using Spring Portlet MVC, so i got all spring-related niceties at hand.

    Read the article

  • [cli/linux] get plain text from raw emails (not attachments extraction)

    - by etuardu
    Hi, having a raw email as input (i.e. the text between "DATA" and "." sent by a smtp client) I need to extract the mail content (which I know is always text only) as plain text. This means decoding transfer encoding (if any: could be base64 or quoted-printable), merging mutiparts (if any), and stripping headers. I tried various tools that would do that: mewdecode, uudecode, uudeview... I only managed to get this last one to work, but it won't output anything if the mail is not MIME encoded and it stores its output in an unpredictable (nor forceable) filename, so it's hard to use it in a not-interactive shell script. Since this is a pretty common job (every mail client have to do that), it's weird it's so complicated. Do you have some hints? (Actually, forcing uudeview to output in a certain file would be good enough). Thank you!

    Read the article

  • What does that mean? "mi_cmd_stack_list_frames: Not enough frames in stack."

    - by HelloMoon
    Debugger is telling me this, when I run my app on device: Program received signal: “EXC_BAD_ACCESS”. mi_cmd_stack_list_frames: Not enough frames in stack. mi_cmd_stack_list_frames: Not enough frames in stack. I don't get information about where in code that happens. That's all I get. Any idea what that could mean? The app crashes after that. When the device is not connected to the mac, it still crashes, so not a debugger problem.

    Read the article

  • Is there a best practice for concatenating MP3 Files, adjusting sample rates to match, while preserving original files?

    - by Scott
    Hello overflow community! Does anyone know if there is a "best practice" to concatenate mp3 files to create new files, while preserving the original files? I am working on a CentOS Linux machine, in command line. I will eventually call the command line from a PHP script. I have been doing research and I have come up with a process that I think could work. It combines general advice from different forums, blogs, and sources like this one. So here I go: Create a temporary folder Loop through files to create a new, converted copy, of file into a "raw" format (which one, I don't know. I didn't know "raw" files existed before too long ago. I could use some suggestions on this) Store the path to the temporary files, in the temporary folder, and then loop through the files to concatenate them and then put the new merged file the final "processed directory" Delete the contents of the temporary file with the temporary raw files inside. Convert the final file from "raw" to mp3 and enjoy the finished result I'm thinking that this course of action might be best because I can't necessarily control the quality of the original "source" mp3s. The only other option I could think of would be to create a script that would perform a similar process upon files being added to the system leaving only the files with the "proper" format and removing the original "erroneous" file. Hopefully you can see that I have put some thought into this and that I'm trying to leverage the collective knowledge of this community to choose the best direction. Perhaps there is a better path that I could take? By concatenate, I mean to join together in sequence to create a new audio file from the "concatenated files."

    Read the article

  • Tomcat memory issue

    - by user305210
    Hello, I have noticed that my application that is running on Tomcat 5 starts with 1gig of memory and as soon as it starts receiving requests from client, the memory starts dropping until it is down to 100MBs and troubles start from there. I am looking at /manager/status page of tomcat under JVM section where "Free Memory", "Total Memory", "Max Memory" is listed. Is this an indicator of memory leak? Memory does not seem to be freed-up automatically even if there are no requests coming from client machines.

    Read the article

  • user inheritance in django

    - by amateur
    Hi guys, I saw a couple of ways extending user information of users and decided to adopt the model inheritance method. for instance, I have : class Parent(User): contact_means = models.IntegerField() is_staff = False objects = userManager() Now it is done, I've downloaded django_registration to help me out with sending emails to new users. The thing is, instead of using registration forms to register new user, I want to to invoke the email sending/acitvation capability of django_registration. So my workflow is: 1. add new Parent object in admin page. 2. send email My problem is, the django-registration creates a new registration profile together with a new user in the user table. how do I tweak this such that I am able to add the user entry into the custom user table. I have tried to create a modelAdmin and alter the save_model method to launch the create_inactive_user from django_registration, however I do not how to save the user object generated from django_registration into my Parent table when I have using model inheritance and I do not have a Foreign key attribute in my parent model.

    Read the article

  • Finding multiple values in a string Jquery / Javascript

    - by user257503
    I have a three strings of categories "SharePoint,Azure,IT"; "BizTalk,Finance"; "SharePoint,Finance"; I need to find a way to check if a string contains for example "SharePoint" and "IT", or "BizTalk" and "Finance". The tests are individual strings themselces. How would i loop through all the category strings (1 - 3) and only return the ones which have ALL instances of the souce. i have tried the following function doesExist(source, filterArray) { var substr = filterArray.split(" "); jQuery.each(substr, function() { var filterTest = this; if(source.indexOf(filterTest) != -1 ) { alert("true"); return true; }else { alert("false"); return false; } }); } with little success...the code above checks one at a time rather than both so the results returned are incorrect. Any help would be great. Thanks Chris UPDATE: here is a link to a work in progress version..http://www.invisiblewebdesign.co.uk/temp/filter/#

    Read the article

  • how to use string in va_start?

    - by Newbie
    for some reason, i cant get this working: void examplefunctionname(string str, ...){ ... va_start(ap, str.c_str()); nor do i get this work: void examplefunctionname(string str, ...){ ... int len = str.length(); char *strlol = new char[len+1]; for(int i = 0; i < len; i++){ strlol[i] = str[i]; } strlol[len] = 0; va_start(ap, strlol); but this does: void examplefunctionname(const char *str, ...){ ... va_start(ap, str); could someone show me how i can use string instead of const char * there? its outputting random numbers when i call examplefunctionname("%d %d %d", 1337, 1337, 1337)

    Read the article

  • XSLT 1.0: restrict entries in a nodeset

    - by Mike
    Hi, Being relatively new to XSLT I have what I hope is a simple question. I have some flat XML files, which can be pretty big (eg. 7MB) that I need to make 'more hierarchical'. For example, the flat XML might look like this: <D0011> .... .... and it should end up looking like this: <D0011> .... .... I have a working XSLT for this, and it essentially gets a nodeset of all the b elements and then uses the 'following-sibling' axis to get a nodeset of the nodes following the current b node (ie. following-sibling::*[position() =$nodePos]). Then recursion is used to add the siblings into the result tree until another b element is found (I have parameterised it of course, to make it more generic). I also have a solution that just sends the position in the XML of the next b node and selects the nodes after that one after the other (using recursion) via a *[position() = $nodePos] selection. The problem is that the time to execute the transformation increases unacceptably with the size of the XML file. Looking into it with XML Spy it seems that it is the 'following-sibling' and 'position()=' that take the time in the two respective methods. What I really need is a way of restricting the number of nodes in the above selections, so fewer comparisons are performed: every time the position is tested, every node in the nodeset is tested to see if its position is the right one. Is there a way to do that ? Any other suggestions ? Thanks, Mike

    Read the article

  • Extendable accessing of sqlite database on android platform

    - by mscriven
    Hi, I am fairly new to the android sdk and databases and have been searching for an answer to this quite some time. I am trying to build an app which has multiple tables within a database. e.g. one for weapons, armours etc. However, my DatabaseManager class which handles all of my table creating, DatabaseHelper inner class and populating of data is creating for an extremely large class requiring high maintenance. Every time I would like to add or remove a table column I need to change quite a few areas of code, - Every reference to the addition of a row in that table with data - The method that the above calls - The method returning all of the database rows - The code in the helper class creating the table - Any specific update methods My question is this: Surely there must be some better way of coding this system, maybe using a database isn't the best way to go, or am i just not used to such large classes having only learned java at university and my largest class consisting of a mere 400-600 lines of code. Thanks for any help!

    Read the article

  • Datetime comparaison in CAML Query for Sharepoint

    - by Garcia Julien
    Hi, i'm trying to have some item from a sharepoint list, depends on date in a custom column. I've created my query with 2U2 Caml Builder, and that's worked but when I put it in my own code in my webpart, it always return to me all the items od the list. Here is my code: DateTime startDate = new DateTime(Int32.Parse(year), 1, 1); DateTime endDate = new DateTime(Int32.Parse(year), 12, 31); SPQuery q = new SPQuery(); q.Query = "<Query><Where><And><Geq><FieldRef Name='Publicate Date' /><Value IncludeTimeValue='FALSE' Type='DateTime'>" + SPUtility.CreateISO8601DateTimeFromSystemDateTime(startDate) + "</Value></Geq><Leq><FieldRef Name='Publicate_x0020_Date' /><Value IncludeTimeValue='FALSE' Type='DateTime'>" + SPUtility.CreateISO8601DateTimeFromSystemDateTime(endDate) + "</Value></Leq></And></Where></Query>"; SPListItemCollection allItem = library.GetItems(q);

    Read the article

  • How can I concatenate two mp3 files with different bit rates

    - by Scott
    I have FFmpeg installed on my linux web server. When I execute the following code, I have intermittent results. I think I have figured out that the MP3s do not compile when they have different bitrates. exec ('cat '. $pair['source_file'] . ' ' . $pair['translated_word_file'] . '>' . $temp_mp3); I might have found some articles online that reference taking them apart and then bundling them back together at a consistent bitrates. I have confirmed that this won't really work with basic "cat" function and that "sox" can be used IF they have the same sample rate. The issue now becomes "What is the best way to get them to the same sample rate?"

    Read the article

  • Is this a good approach to dealing with tagging?

    - by Mel
    Can this code be optimized or re-factored? Is this an optimal approach to tagging? The following code is a callback in my posts model. It creates a record that associates a tag with a post in a QuestionsTags joiner table. When necessary, if a given tag does not already exist in the tags table, the function creates it, then uses its id to create the new record in the QuestionsTags table. The difficulty with this approach is the QuestionsTags table depends on data in the tags table which may or may not exist. The function assumes the following tables: tags(id, tagName), posts(tags) // Comma delimited list questionsTags(postId, tagId) The idea is to loop over a delimited list of tags submitted with a post and check to see if each tag already exists in the tags table If tag exists: Check to see if there's already a QuestionTag record for this post and this tag in the QuestionTags table. If yes, do nothing (the association already exists) If no, create a new QuestionTag record using the id of the existing tag and the postId If tag does not already exist: Create the new tag in the tags table Use its id to create a new QuestionsTags record Code /** * @hint Sets tags for a given question. **/ private function setTags() { // Loop over the comma and space delmited list of tags for (local.i = 1; local.i LTE ListLen(this.tags, ", "); local.i = (local.i + 1)) { // Check if the tag already exists in the database local.tag = model("tag").findOneByTagName(local.i); // If the tag exists, look for an existing association between the tag and the question in the QuestionTag table if (IsObject(local.tag)) { local.questionTag = model("questionTag").findOneByPostIdAndTagId(values="#this.postId#,#local.tag.id#"); // If no assciatione exists, create a new QuestionTag record using the tagId and the postId if (! IsObject(local.questionTag)) { local.newQuestionTag = model("questionTag").new(postId = this.id, tagId = local.tag.id); // Abort if the saving the new QuestionTag is unsuccesful if (! local.newQuestionTag.save()) { return false; } } } // If the tag does not exist create it else { local.newTag = model("tag").new(tagName = local.i, userId = this.ownerUserId); // Abort if the the new tag is not saved successfully if (! local.newTag.save()) { return false; } // Otherwise create a new association in the QuestionTags table using the id of the newly created tag and the postId local.newQuestionTag = model("questionTag").new(postId = this.id, tagId = local.newTag.id); // Abort if the new QuestionTag does not save correctly if (! local.newQuestionTag.save()) { return false; } } } } FYI: I'm using CFWheels in my application, which explains the ORM functions used.

    Read the article

  • Will this cause a problem with different runtimes with DLL?

    - by Milo
    My gui application supports polymorphic timed events so that means that the user calls new, and the gui calls delete. This can create a problem if the runtimes are incompatible. So I was told a proposed solution would be this: class base; class Deallocator { void operator()(base* ptr) { delete ptr; } } class base { public: base(Deallocator dealloc) { m_deleteFunc = dealloc; } ~base() { m_deleteFunc(this); } private: Deallocator m_deleteFunc; } int main { Deallocator deletefunc; base baseObj(deletefunc); } While this is a good solution, it does demand that the user create a Deallocator object which I do not want. I was however wondering if I provided a Deallocator to each derived class: eg class derived : public base { Deallocator dealloc; public: Derived() : base(dealloc); { } }; I think this still does not work though. The constraint is that: The addTimedEvent() function is part of the Widget class which is also in the dll, but it is instanced by the user. The other constraint is that some classes which derive from Widget call this function with their own timed event classes. Given that "he who called new must call delete" what could work given these constraints? Thanks

    Read the article

  • Java: How to write "Arabic" in properties file?

    - by SmoothCriminel
    Hi Experts, I want to write "Arabic" in the message resource bundle (properties) file but when I try to save it I get this error: "Save couldn't be completed Some characters cannot be mapped using "ISO-85591-1" character encoding. Either change encoding or remove the character ..." Can anyone guide please? I want to write: global.username = ??? ???????? How should I write the Arabic of "username" in properties file? So, that internationalization works.. BR SC

    Read the article

  • Image in absolute DIV is not positioning from containing DIV

    - by Jaime Schuster
    I have a DIV with position:absolute inside another with position:relative. But the inside DIV is flowing out of the other and positioning it self based on the browser not the containing DIV. Any ideas why this is happening? You can see the problem here: https://www.luxedesignerhandbags.com/Articles.asp?ID=239 Look at the botton right "Get Cash for your handbags" The image is in div id="sell_bag" and that is contained in div id="wrapper" The css is as follows: #wrapper { position:inherit; font-family: Quicksand, Arial, Helvetica, sans-serif; width: 980px; left: 24px; margin: auto; } #sell_bag { position:absolute; right: 190px; width: 260px; } Any help would be greatly appreciated! Thanks,

    Read the article

  • I, Android

    - by andrewbrust
    I’m just back from the 2011 Consumer Electronics Show (CES).  I go to CES to get a sense of what Microsoft is doing in the consumer space, and how people are reacting to it.  When I first went to CES 2 years ago, Steve Ballmer announced the beta of Windows 7 at his keynote address, and the crowd went wild.  When I went again last year, everyone was hoping for a Windows tablet announcement at the Ballmer keynote.  Although they didn’t get one (unless you count the unreleased HP Slate running Windows 7), people continued to show anticipation around Project Natal (which became Xbox 360 Kinect) and around Windows Phone 7.  On the show floor last year, there were machines everywhere running Windows 7, including lots of netbooks.  Microsoft had a serious influence at the show both years. But this year, one brand, one product, one operating system evidenced itself over and over again: Android.  Whether in the multitude of tablet devices that were shown across the show, or the burgeoning number of smartphones shown (including all four forthcoming 4G-LTE handsets at Verizon Wireless’ booth) or the Google TV set top box from Logitech and the embedded implementation in new Sony TV models, Android was was there. There was excitement in the ubiquity of Android 2.2 (Froyo) and the emergence of Android 2.3 (Gingerbread).  There was anticipation around the tablet-optimized Android 3.0 (Honeycomb).  There were highly customized skins.  There was even an official CES Android app for navigating the exhibit halls and planning events.  Android was so ubiquitous, in fact, that it became surprising to find a device that was running anything else.  It was as if Android had become the de facto Original Equipment Manufacturing (OEM) operating system. Motorola’s booth was nothing less than an Android showcase.  And it was large, and it was packed.  Clearly Moto’s fortunes have improved dramatically in the last year and change.  The fact that the company morphed from being a core Windows Mobile OEM to an Android poster child seems non-coincidental to their improved fortunes. Even erstwhile WinMo OEMs who now do produce Windows Phone 7 devices were not pushing them.  Perhaps I missed them, but I couldn’t find WP7 handsets at Samsung’s booth, nor at LG’s.  And since the only carrier exhibiting at the show was Verizon Wireless, which doesn’t yet have WP7 devices, this left Microsoft’s booth as the only place to see the phones. Why is Android so popular with consumer electronics manufacturers in Japan, South Korea, China and Taiwan?  Yes, it’s free, but there’s more to it than that.  Android seems to have succeeded as an OEM OS because it’s directed at OEMs who are permitted to personalize it and extend it, and it provides enough base usability and touch-friendliness that OEMs want it.  In the process, it has become a de facto standard (which makes OEMs want it even more), and has done so in a remarkably short time: the OS was launched on a single phone in the US just 2 1/4 years ago. Despite its success and popularity, Apple’s iOS would never be used by OEMs, because it’s not meant to be embedded and customized, but rather to provide a fully finished experience.  Ironically, Windows Phone 7 is likewise disqualified from such embedded use.  Windows Mobile (6.x and earlier) may have been a candidate had it not atrophied so much in its final 5 years of life. What can Microsoft do?  It could start by developing a true touch-centric OS for tablets, whether that be within Windows 8, or derived from Windows Phone 7.  It would then need to deconstruct that finished product into components, via a new or altered version of Windows Embedded or Windows Embedded Compact.  And if Microsoft went that far, it would only make sense to work with its OEMs and mobile carriers to make certain they showcase their products using the OS at CES, and other consumer electronics venues, prominently. Mostly though, Microsoft would need to decide if it were really committed to putting sustained time, effort and money into a commodity product, especially given the far greater financial return that it now derives from its core Windows and Office franchises. Microsoft would need to see an OEM OS for what it is: a loss leader that helps build brand and platform momentum for up-level products.  Is that enough to make the investment worthwhile?  One thing is certain: if that question is not acknowledged and answered honestly, then any investment will be squandered.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >