Daily Archives

Articles indexed Tuesday March 30 2010

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

  • Naming lossless more appropriate

    - by LarsOn
    Starting just discussing the naming first ignoring tech details, lossless is a negative and double negative word for one good reason should get named more appropriate: Lossless also matches nothing. When naming like all intact or likewise matches something in a manner more physical like sounds are. Then more technically stated that a copy might contain more information than the original. Does method as such have a name, if so what do I refer to, can we name it if you please or just discuss related handling.

    Read the article

  • BlackBerry - MainScreen with labels vertical scroll

    - by pajton
    I am trying to create a MainScreen with vertical scrolling. From what I've read in the documentation, MainScreen has a VerticalManager inside, so it should be possible to enable vertical scrolling only with proper construction, i.e: super(MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR); This is not working for me, however. I am creating a screen, adding a couple of LabelFields and no scrollbar, no scrolling at all. I am testing on 8900, OS 5.0. Here is the code I use: public class ExampleScreen extends MainScreen { public ExampleScreen() { super(MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR); create(); } private void add(String text) { add(new LabelField(text)); } private void create() { add("line 0"); add("line 1"); ... etc ... } } The question is am I doing something wrong? Is there a way to enable vertical scrolling with MainScreen or do I need to create a VerticalManager myself?

    Read the article

  • Regular expression that contains in it...

    - by Fabiano PS
    I need my regexp to match, all the highlighted words, in order, following: Fri/Feb/10 - *Nesta* manh\303\203\302\243,* @*anestesya *entrou* \303\240s 08:18AM Fri/Feb/10 - *Nesta* tarde,* @*pernas *saiu* \303\240s 08:18AM I was trying something like: /[?=Nesta.?=@.?=(entrou|saiu)]/ So I don't care what is in between as long as it has: ' Nesta ' AND ' @' AND ' entrou ' OR ' saiu '

    Read the article

  • Cloned Cached item has memory issues

    - by ioWint
    Hi there, we are having values stored in Cache-Enterprise library Caching Block. The accessors of the cached item, which is a List, modify the values. We didnt want the Cached Items to get affected. Hence first we returned a new List(IEnumerator of the CachedItem) This made sure accessors adding and removing items had little effect on the original Cached item. But we found, all the instances of the List we returned to accessors were ALIVE! Object relational Graph showed a relationship between this list and the EnterpriseLibrary.CacheItem. So we changed the return to be a newly cloned List. For this we used a LINQ say (from item in Data select new DataClass(item) ).ToList() even when you do as above, the ORG shows there is a relationship between this list and the CacheItem. Cant we do anything to create a CLONE of the List item which is present in the Enterprise library cache, which DOESNT have ANY relationship with CACHE?!

    Read the article

  • Permissions on DVD folders in redhat10

    - by aryan
    I have written a data DVD by k3b. When I mount the DVD on my system I can't read and write on it's folders. I tried to set their permissions but it's not possible. I mean that when I set file access to Read and Write and press the Apply permissions to enclosed files button, after a few seconds my new settings (Read and Write) will be reverted to "---". Can any one guide me, please?

    Read the article

  • Time to start returning IQueryable<T> instead of IList<T> to my Web UI / Web API Layer?

    - by JohnnyO
    I've got a multi-layer application that starts with the repository pattern for all data access and it returns IQueryable to the Services layer. The Services layer, which includes all of the business logic, returns IList to the Controllers (note: I'm using ASP.NET MVC for the UI layer). The benefit of returning IQueryable in the data access layer is that it allows my repositories to be extremely simple and the database queries to be deferred. However, I'm triggering the database queries in my services layer so that my unit tests is more reliable and I don't give flexibility to the Controllers to reshape my queries. However, I've recently encountered several situations where deferring the execution of queries down to the Controllers would have been significantly more performant because the Controllers had to do some projections on the data that was UI specific. Additionally, with the emergence of things like oData, I was starting to wonder if end points (e.g. web UI or web apis) should be working directly with IQueryable. What are your thoughts? Is it time to start returning IQueryable from the services layer to the UI layer? Or stick with IList? This thread here: http://stackoverflow.com/questions/718624/to-return-iqueryablet-or-not-return-iqueryablet seems to vouch for returning IList to the UI layers, but I was wondering if things are changing because of new emerging technologies and techniques.

    Read the article

  • How is return address specified in stack?

    - by Mask
    This is what I see by disassemble for the statement function(1,2,3);: movl $0x3,0x8(%esp) movl $0x2,0x4(%esp) movl $0x1,(%esp) call 0x4012d0 <_Z8functioniii> It seems the ret address is not pushed into stack at all,then how does ret work?

    Read the article

  • VBS Script Help.

    - by MalsiaPro
    I managed to get this code from you guys here, thanks so much with a collegue of mine, I ran this code a few times and it seems to work but stops after a while due to protected files such as system files, "Permission Denied" and then the script just stops, is there a way to modify the code below so that it can handle such protected files or whether it can pass them. Any advice or help is appreciated. Set objFS=CreateObject("Scripting.FileSystemObject") WScript.Echo Chr(34) & "Full Path" &_ Chr(34) & "," & Chr(34) & "File Size" &_ Chr(34) & "," & Chr(34) & "File Date modified" &_ Chr(34) & "," & Chr(34) & "File Date Created" &_ Chr(34) & "," & Chr(34) & "File Date Accessed" & Chr(34) Set objArgs = WScript.Arguments strFolder = objArgs(0) Set objFolder = objFS.GetFolder(strFolder) Go (objFolder) Sub Go(objDIR) If objDIR <> "\System Volume Information" Then For Each eFolder in objDIR.SubFolders Go eFolder Next End If For Each strFile In objDIR.Files WScript.Echo Chr(34) & strFile.Path & Chr(34) & "," &_ Chr(34) & strFile.Size & Chr(34) & "," &_ Chr(34) & strFile.DateLastModified & Chr(34) & "," &_ Chr(34) & strFile.DateCreated & Chr(34) & "," &_ Chr(34) & strFile.DateLastAccessed & Chr(34) Next End Sub Then call it from the command line like this. c:\test> cscript //nologo myscript.vbs "c:\" > "C:\test\Output.csv" Thank you :)

    Read the article

  • dynamic check_box using field_for in rails

    - by Craig Whitley
    I have a many-to-many relationship with a link box, and I want to pull those models together into one form so I can update from the same page. I'm really struggling with getting the check_box to even show all the elements of my array - I've scoured the net and been working on this literally all day, and I'm finding it difficult to apply the information I'm reading to my problem. I'm also extremely new to RoR and I've been following a bit of an outdated video tutorial (pre 2.0) so apologies for my code. So far, I've got it to output only one key pair in the array (the last one) - although outside the form, the code used in the tutorial works exactly how it should. Thats of little use though! Host is the model for which the main form is for, and Billing is the outside model that I'm trying to add to the form. This is the code that works outside of the form from the tutorial: <% for billing in @billings -%> <%= check_box_tag('billing_title[]', billing.id, @host.billings.collect {|obj| obj.id}.include?(billing.id))%> <%= billing.title %><br /> <% end -%> I just need to know how to make it work inside the form. This is the aforementioned code that only retrieves the last array keypair after looping through them: <% f.fields_for :billings do |obj| %><br /> <%= check_box_tag('billing_title[]', billing.id, @billings.collect {|obj| obj.id}.include?(billing.id))%> <%= billing.title %><br /> <% end %> The debug(@billings) : --- - !ruby/object:Billing attributes: title: Every Month id: "1" attributes_cache: {} - !ruby/object:Billing attributes: title: 12 Months id: "2" attributes_cache: {} - !ruby/object:Billing attributes: title: 6 Months id: "5" attributes_cache: {} Any help really appreciated.

    Read the article

  • Help with SQL query (list strings and count in same query)

    - by Mestika
    Hi everybody, I’m working on a small kind of log system to a webpage, and I’m having some difficulties with a query I want to do multiple things. I have tried to do some nested / subqueries but can’t seem to get it right. I’ve two tables: User = {userid: int, username} Registered = {userid: int, favoriteid: int} What I need is a query to list all the userid’s and the usernames of each user. In addition, I also need to count the total number of favoriteid’s the user is registered with. A user who is not registered for any favorite must also be listed, but with the favorite count shown as zero. I hope that I have explained my request probably but otherwise please write back so I can elaborate. By the way, the query I’ve tried with look like this: SELECT user.userid, user.username FROM user,registered WHERE user.userid = registered.userid(SELECT COUNT(favoriteid) FROM registered) However, it doesn’t do the trick, unfortunately Kind regards Mestika

    Read the article

  • Why can't i loop through my json object using jquery?

    - by Pandiya Chendur
    I am using jquery to loop through json object... But some how it doesn't seem to work... Here is my code, success: function(jsonObj) { alert(jsonObj); for (var i = jsonObj.length - 1; i >= 0; i--) { var employee = jsonObj[i]; alert(employee.Emp_Name); When alerted my jsonObj i got [object Object] but when i alerted jsonObj.length it showed undefined any suggestion....

    Read the article

  • text not wrapping around some floated images, wraps in IE & FF but not chrome, safari

    - by Hartley
    This is unlike anything I've read about and I've been totally scratching my head for the last few hours trying to figure out what's going on. I have a hand-coded site @ hartbro.com Part of the site is a blog, in which I include pictures. Here's the HTML code around one of the images that's causing trouble. <a href="blogcontent/090811.jpg" class="img"> <img src="blogcontent/090811.jpg" alt="Downed trees" width="25%" class="floatright" /></a> The storm left as quickly as it came. The sky cleared up and we were glad that the oppressive heat had let up. What I've noticed is that, on some of the blog entries that include more than one image, the 2nd image isn't really floating like its supposed to be, with the text wrapping around it. I figure its got to be some sort of conflict with some CSS that I have that's causing the problem but I just can't figure out what it is. I don't understand how it works in FF & IE but not Chrome or Safari?? Here's all of the relevant CSS, let me know if you need anything else. Thanks in advance. img{ margin:10px; } img.floatleft{ float:left; } img.floatright{ float:right; } edit: here's an screen-shot of what's happening.

    Read the article

  • php using wamp server start up error

    - by mathirengasamy
    i try to install moodle web software...i m using wamp server and sqlserver 2005 version. i install php driver for php5.3.0 thread safe version..i just paste that php_sqlsrv_ts.dll driver file into my php ext directory...i include this line extension=php_sqlsrv_ts.dll in my php.ini file... now i restart my wampserver...i m getting this error... PHP Startup: sqlsrv: Unable to initialize module Module compiled with module API=20060613 PHP compiled with module API=20090626 These options need to match get this error also in my apache log file ADODB Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified please anybody help me..

    Read the article

  • Capturing IR Data using VB.NET

    - by E-Q
    Just found an old IR reciever (Microsoft eHome Infared Transceiver) and i'm trying to write an application that can use data it captures... Any examples or jumping off points for this are appreciated. Thanks!

    Read the article

  • RadcomboBox css help needed

    - by Kobojunkie
    I am trying to change the font color on disabled radcombobox control. Any idea what I may be doing wrong in the code below for the font color not to work? .RadComboBox_Web20 .rcbDisabled .rcbInputCell input, .RadComboBox_Web20 .rcbDisabled .rcbInputCell .rcbItem, .RadComboBox_Web20 .rcbDisabled .rcbInputCell .rcbInput, .RadComboBoxDropDown_Web20 .rcbDisabled .rcbInputCell input, .RadComboBoxDropDown_Web20 .rcbDisabled .rcbInputCell .rcbItem, .RadComboBoxDropDown_Web20 .rcbDisabled .rcbInputCell .rcbInput, .RadComboBoxDropDown_Web20 .rcbDisabled { background-color: #808080; color: #0000FF; font-weight: bold; background-image: none; }

    Read the article

  • Error creating bean with name 'sessionFactory'

    - by Sunny Mate
    hi i am getting the following exception while running my application and my applicationContext.xml is <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"> </property> <property name="url" value="jdbc:mysql://localhost/SureshDB"></property> <property name="username" value="root"></property> <property name="password" value="root"></property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </prop> </props> </property> <property name="mappingResources"> <list> <value>com/jsfcompref/register/UserTa.hbm.xml</value></list> </property></bean> <bean id="UserTaDAO" class="com.jsfcompref.register.UserTaDAO"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> <bean id="UserTaService" class="com.jsfcompref.register.UserTaServiceImpl"> <property name="userTaDao"> <ref bean="UserTaDAO"/> </property> </bean> </beans> Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V any suggestion would be heplful

    Read the article

  • how to use the template for a custom component

    - by wnoveno
    hi, I've created a custom coponent for joomla and I've created a menu which uses that component and set a template for that menu. The thing is when I go to the url test.com/index.php?option=com_mycomponent, it still uses the default template instead of the template that I set it to. PS: The component works, only it's using the wrong template.

    Read the article

  • Does jQuery ajaxSetup method not work with $.get or $.post?

    - by Justin Poliey
    Does the jQuery $.ajaxSetup method not respect the data field in the options hash when $.post or $.get is called? For example, I might have this code: $.ajaxSetup({ data: { persist: true } }); Then, to send a POST request, I would call this: $.post("/create/something", { name: "foo" }); I was expecting the actual POST data to look like this: { persist: true, name: "foo" } but the only data sent by $.post is { name: "foo" }. Is there any way to get the expected behavior? I'm using jQuery 1.4.1.

    Read the article

  • SharedPreferences.onSharedPreferenceChangeListener not being called consistently

    - by synic
    I'm registering a preference change listener like this (in the onCreate() of my main activity): SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.registerOnSharedPreferenceChangeListener( new SharedPreferences.OnSharedPreferenceChangeListener() { public void onSharedPreferenceChanged( SharedPreferences prefs, String key) { System.out.println(key); } }); The trouble is, the listener is not always called. It works for the first few times a preference is changed, and then it is no longer called until I uninstall and reinstall the app. No amount of restarting the application seems to fix it. I found a mailing list thread reporting the same problem, but no one really answered him. What am I doing wrong?

    Read the article

  • Grails GORM (Hibernate) query

    - by bsreekanth
    Hello, I'm trying to do the below sql statement in GORM select * from table1 where table1.x not in (select x from table 2 where y='something'); so, I have two tables, and needs to find the entries from table 1 which are not in table 2. In Grails def xx= table2.findByY('something') def c = table1.createCriteria() def result= c.list { not ( in('x', xx) ) } the syntax is wrong, and I'm not sure how to simulate not in sql logic. As a learning point, if someone can also tell me why minus (-) operator in grails/groovy doesn't work with list. I tried getting x and y seperately, and doing x.minus(y), but it doesn't change the list. I saw an explanation at http://stackoverflow.com/questions/1754576/groovy-on-grails-list-not-working , but I would expect the list defined are local. thank you so much.

    Read the article

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