Daily Archives

Articles indexed Saturday May 22 2010

Page 14/81 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • How to add language plugin to ckeditor?

    - by user342777
    I was trying to add Hindi input in Ckeditor but I did not get that.Then I found indic plugin to language selection from ther you can select language and input text in that language but i dont know how to add that plugin to CKeditor. Please help on this.

    Read the article

  • php json encode

    - by hafizan
    This below output come from php json_encode.What we see here is 0849 is twice.Since javascript only use sn to get value why we need the "0" value.The main problem is speed execution. If 800 kb data might can be reduce to 400 kb {"success":"true","total":968,"data":[{"0":"0849","sn":"0849" }] If no solution i have to make a script to filter in json_encode so no need twice data transter.

    Read the article

  • Can I embed an icon to a .hta file?

    - by BoltBait
    I have written an HTML Application (hta file) and am wondering if there is a way to embed an icon file into the hta file itself. I have seen html emails that include embedded graphic files, is there any way to do this with html applications and icons? HTA files have an HTA:APPLICATION tag that allows you to specify an icon, but I want to have only a single file for download. I don't want to have an external icon file. Is this possible? More info on hta files here: HTA files.

    Read the article

  • Adding custom fields to users in django

    - by Gaurav
    I am the create_user() function that Django provides to create my users. Also I want to store additional information about the users. So I tried following the instructions given at http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users but I cannot get it to work for me. Is there a step-by-step guide that I can follow to get this to work for me? Also, once I have added these custom fields, I would obviously need to add / edit / delete data from them. I cannot seem to find any instructions on how to do this.

    Read the article

  • inspect C++ template instantiation

    - by aaa
    hello. Is there some utility which would allow me to inspect template instantiation? my compiler is g++ or Intel. Specific points I would like: Step by step instantiation. Instantiation backtrace (can hack this by crashing compiler. Better method?) Inspection of template parameters. Thanks

    Read the article

  • iPhone simple commercial barcode reader via camera

    - by user347635
    Hey all, I've done some iPhone programming (safely midlevel) and now a requirement has come up for us to write a barcode reader that uses the iPhone camera. This is not for shopping or the general public but will be for internal use. My first thought was to simply programatically take a picture, upload it to server, and have a web service or something similar handle the heavy lifting of extracting the numbers out of the bar code. However I recently installed some apps already available on the iPhone that read bar codes, refer you to shopping sites, etc. and they seem to use the video camera to identify barcodes and extract the numbers. Does anyone know how this is being done or could point me to some open source or sample code?

    Read the article

  • Perl: How do I capture Chinese input via SCIM with STDIN?

    - by KCArpe
    Hi, I use SCIM on Linux for Chinese and Japanese language input. Unfortunately, when I try to capture input using Perl's STDIN, the input is crazy. As roman characters are typed, SCIM tries to guess the correct final characters. ^H (backspace) codes are used to delete previously suggested chars on the command line. (As you type, SCIM tries to guess final Asian chars and displays them.) However, these backspace chars are shown literally as ^H and not interpreted correctly. Example one-liner: perl -e 'print "Chinese: "; my $s = <STDIN>; print $s' When I enable SCIM Chinese or Japanese language input, as I type, e.g., nihao = ??, here is the result: ?^H?^H?^H?^H?^H??^H^H??^H^H??^H^H??^H^H??^H^H??^H^H??^H^H??^H^H??^H^H?? At the very end of this string, you can see "??" (nihao/hello). At a normal bash prompt, if I type nihao (with Chinese enabled), the results is perfect. This has something to do with interpretation of backspace chars (or control chars) during Perl's STDIN. The same thing happens when using command 'read' in Bash. Witness: read -p 'Chinese: ' s && echo $s Cheers, Kevin

    Read the article

  • Live chat rooms for learning ASP.NET?

    - by pkiyan
    I have come across a couple of sites in the past where a professional programmer would charge you 50 cents per minute or so to chat with them, one on one, and they would answer any questions you have about your choice of programming language. I've been studying ASP.NET 3.5 for a couple of months now and haven't been able to find a service like this for ASP.NET. Any help? A free live chat room for .NET would be of big help too.

    Read the article

  • How to boost system sound output?

    - by infant programmer
    When I use Earphones, I feel that my system output is very low, I have set all the volume output to maximum in "control panel\Sounds and Audio devices", but still not satisfactory. May be my earphones output proportionality is lower. No problem with sub-woofer, I think its because of the amplifier. Is there any software to boost up system volume output to compensate ?

    Read the article

  • Doxygen dependencies to manage during install

    - by aCuria
    Hi, i am supposed to document my code with doxygen for a homework assignment, but i have problems getting doxygen to run. I have a Doxyfile provided, and have just installed doxygen on my machine. When i enter the command to run doxygen, "doxygen Doxyfile" I get the following error: failed to run html help compiler on index.hhp can anyone clue me into what i am doing wrong? Thanks

    Read the article

  • ControlTemplate with "Control.IsMouseOver" Value="True" and "Control.IsMouseOver" Value="False">

    - by Vinjamuri
    In my WPF control, I have below code. If I don't have a trigger with false, I can see the my storyboard, but if I have both ture and false triggers, I don't see any thing. How to fix this? Appreciate your help! <Trigger Property="Control.IsMouseOver" Value="True"> <StoryBoard> Image with Opacity 1 </StoryBoard> </Trigger> <Trigger Property="Control.IsMouseOver" Value="False"> <StoryBoard> Image with Opacity 0 </StoryBoard> </Trigger>

    Read the article

  • Dedicating all processor power to a task

    - by Yktula
    Let's say we have a very processor-intensive task at hand which could be effectively parallelized. How can we dedicate all or almost all available processor power to performing that task? The task could be a variety of things, and iterative Fibonacci number generation that saves recorded numbers would be just one example.

    Read the article

  • During Spring unit test, data written to db but test not seeing the data

    - by richever
    I wrote a test case that extends AbstractTransactionalJUnit4SpringContextTests. The single test case I've written creates an instance of class User and attempts to write it to the database using Hibernate. The test code then uses SimpleJdbcTemplate to execute a simple select count(*) from the user table to determine if the user was persisted to the database or not. The test always fails though. I was suspect because in the Spring controller I wrote, the ability to save an instance of User to the db is successful. So I added the Rollback annotation to the unit test and sure enough, the data is written to the database since I can even see it in the appropriate table -- the transaction isn't rolled back when the test case is finished. Here's my test case: @ContextConfiguration(locations = { "classpath:context-daos.xml", "classpath:context-dataSource.xml", "classpath:context-hibernate.xml"}) public class UserDaoTest extends AbstractTransactionalJUnit4SpringContextTests { @Autowired private UserDao userDao; @Test @Rollback(false) public void teseCreateUser() { try { UserModel user = randomUser(); String username = user.getUserName(); long id = userDao.create(user); String query = "select count(*) from public.usr where usr_name = '%s'"; long count = simpleJdbcTemplate.queryForLong(String.format(query, username)); Assert.assertEquals("User with username should be in the db", 1, count); } catch (Exception e) { e.printStackTrace(); Assert.assertNull("testCreateUser: " + e.getMessage()); } } } I think I was remiss by not adding the configuration files. context-hibernate.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd> <bean id="namingStrategy" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"> <property name="staticField"> <value>org.hibernate.cfg.ImprovedNamingStrategy.INSTANCE</value> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" destroy-method="destroy" scope="singleton"> <property name="namingStrategy"> <ref bean="namingStrategy"/> </property> <property name="dataSource" ref="dataSource"/> <property name="mappingResources"> <list> <value>com/company/model/usr.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.use_sql_comments">true</prop> <prop key="hibernate.query.substitutions">yes 'Y', no 'N'</prop> <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop> <prop key="hibernate.cache.use_query_cache">true</prop> <prop key="hibernate.cache.use_minimal_puts">false</prop> <prop key="hibernate.cache.use_second_level_cache">true</prop> <prop key="hibernate.current_session_context_class">thread</prop> </props> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> <property name="nestedTransactionAllowed" value="false" /> </bean> <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager"> <ref local="transactionManager"/> </property> <property name="transactionAttributes"> <props> <prop key="create">PROPAGATION_REQUIRED</prop> <prop key="delete">PROPAGATION_REQUIRED</prop> <prop key="update">PROPAGATION_REQUIRED</prop> <prop key="*">PROPAGATION_SUPPORTS,readOnly</prop> </props> </property> </bean> </beans> context-dataSource.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="org.postgresql.Driver" /> <property name="jdbcUrl" value="jdbc\:postgresql\://localhost:5432/company_dev" /> <property name="user" value="postgres" /> <property name="password" value="postgres" /> </bean> </beans> context-daos.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="extendedFinderNamingStrategy" class="com.company.dao.finder.impl.ExtendedFinderNamingStrategy"/> <bean id="finderIntroductionAdvisor" class="com.company.dao.finder.impl.FinderIntroductionAdvisor"/> <bean id="abstractDaoTarget" class="com.company.dao.impl.GenericDaoHibernateImpl" abstract="true" depends-on="sessionFactory"> <property name="sessionFactory"> <ref bean="sessionFactory"/> </property> <property name="namingStrategy"> <ref bean="extendedFinderNamingStrategy"/> </property> </bean> <bean id="abstractDao" class="org.springframework.aop.framework.ProxyFactoryBean" abstract="true"> <property name="interceptorNames"> <list> <value>transactionInterceptor</value> <value>finderIntroductionAdvisor</value> </list> </property> </bean> <bean id="userDao" parent="abstractDao"> <property name="proxyInterfaces"> <value>com.company.dao.UserDao</value> </property> <property name="target"> <bean parent="abstractDaoTarget"> <constructor-arg> <value>com.company.model.UserModel</value> </constructor-arg> </bean> </property> </bean> </beans> Some of this I've inherited from someone else. I wouldn't have used the proxying that is going on here because I'm not sure it's needed but this is what I'm working with. Any help much appreciated.

    Read the article

  • Flex 4 IntelliJ IDEA wrapper html crashes browser

    - by user347641
    I'm building an Flex 4 application using IntelliJ IDEA generated sample Flex application. I replace the mxml with the following code from the book Hello Flex 4. It simply crashes the browser when I run it. I tried it on both FF and Chrome. Any clues? [Bindable] public var _bread:Number = Number.NaN; ]]></fx:Script> <fx:Declarations> <s:RadioButtonGroup id="moralityRBG"/> <s:RadioButtonGroup id="restaurantRBG" selectedValue="{_theory.length % 2 == 0 ? 'smoking' : 'non'}"/> </fx:Declarations> <s:Panel width="100%" height="100%" title="Simple Components!"> <s:layout> <s:HorizontalLayout paddingLeft="5" paddingTop="5"/> </s:layout> <s:VGroup> <s:TextArea id="textArea" width="200" height="50" text="@{_theory}"/> <s:TextInput id="textInput" width="200" text="@{_theory}"/> <s:HSlider id="hSlider" minimum="0" maximum="11" liveDragging="true" width="200" value="@{_bread}"/> <s:VSlider id="vSlider" minimum="0" maximum="11" liveDragging="true" height="50" value="@{_bread}"/> <s:Button label="{_theory}" width="200" color="{alarmTB.selected ? 0xFF0000 : 0}" click="_bread = Math.min(_theory.length, 11)"/> <s:CheckBox id="checkBox" selected="{_bread % 2 == 0}" label="even?"/> </s:VGroup> <s:VGroup> <s:RadioButton label="Good" value="good" group="{moralityRBG}"/> <s:RadioButton label="Evil" value="evil" group="{moralityRBG}"/> <s:RadioButton label="Beyond" value="beyond" group="{moralityRBG}"/> <s:RadioButton label="Smoking" value="smoking" group="{restaurantRBG}"/> <s:RadioButton label="Non-Smoking" value="non" group="{restaurantRBG}"/> <s:ToggleButton id="alarmTB" label="ALARM!"/> <s:NumericStepper id="numericStepper" value="@{_bread}" minimum="0" maximum="11" stepSize="1"/> <s:Spinner id="spinner" value="@{_bread}" minimum="0" maximum="11" stepSize="1"/> </s:VGroup> </s:Panel>

    Read the article

  • Javascript Regex to convert dot notation to bracket notation

    - by Tauren
    Consider this javascript: var joe = { name: "Joe Smith", location: { city: "Los Angeles", state: "California" } } var string = "{name} is currently in {location.city}, {location.state}"; var out = string.replace(/{([\w\.]+)}/g, function(wholematch,firstmatch) { return typeof values[firstmatch] !== 'undefined' ? values[firstmatch] : wholematch; }); This will output the following: Joe Smith is currently in {location.city}, {location.state} But I want to output the following: Joe Smith is currently in Los Angeles, California I'm looking for a good way to convert multiple levels of dot notation found between braces in the string into multiple parameters to be used with bracket notation, like this: values[first][second][third][etc] Essentially, for this example, I'm trying to figure out what regex string and function I would need to end up with the equivalent of: out = values[name] + " is currently in " + values["location"]["city"] + values["location"]["state"];

    Read the article

  • 8051 microcontroller kit recommendation?

    - by LucidDefender
    I'm a first year Computer Science student looking to get started with development for micro-controllers. I'd like to use the 8051, as it's common as dirt, and is used frequently in the real world. During my junior or senior year, I'll be taking a PIC micro-controller based embedded design class, so I'd rather not do PIC now; otherwise, I'll be fairly bored during that course. Most commercial kits I see are for the AVR or PIC series of microprocessors. I'm just looking for something with decent development tools, documentation, and enough add-ons to keep my novice self occupied for the summer. Any recommendations for an 8051 family kit? Thanks!

    Read the article

  • Is it possible to write a Java printf statement that prints the statement itself?

    - by polygenelubricants
    Is it possible to have a Java printf statement, whose output is the statement itself? Some snippet to illustrate: // attempt #1 public class Main { public static void main(String[] args) { System.out.printf("something"); } } This prints something. So the output of attempt #1 is not quite exactly the printf statement in attempt #1. We can try something like this: // attempt #2 public class Main { public static void main(String[] args) { System.out.printf("System.out.printf(\"something\");"); } } And now the output is System.out.printf("something"); So now the output of attempt #2 matches the statement in output #1, but we're back to the problem we had before, since we need the output of attempt #2 to match the statement in attempt #2. So is it possible to write a one-line printf statement that prints itself?

    Read the article

  • How can I make hash key lookup case-insensitive?

    - by mseery
    Evidently hash keys are compared in a case-sensitive manner. $ perl -e '%hash = ( FOO => 1 ); printf "%s\n", ( exists $hash{foo} ) ? "Yes" : "No";' No $ perl -e '%hash = ( FOO => 1 ); printf "%s\n", ( exists $hash{FOO} ) ? "Yes" : "No";' Yes Is there a setting to change that for the current script? Thanks.

    Read the article

  • extendible hashing

    - by Phenom
    I need to make a program that shows the hash value of a given key, using extendible hashing. In extendible hashing, I know that the buckets split and directories change. So if I make my program, do I have to already know things like if the bucket it hashes to is filled, or do I not have to worry about those things and just compute a hash value based on the key?

    Read the article

  • WPF. How do I create many LIstViews with the same look.

    - by Erik Z
    I've defined a listview in my recent project and realized that I will be using more listviews looking exactly the same and having the same solumns. Since I'm new to WPF am I curious of teh best way to do this. Is it to create a usercontrol? Use styles? I've tried to use styles but it didnt work the way I was hoping. I tried to set the "View" property using style, like this. <Style x:Key="ListViewStyle" TargetType="{x:Type ListView}"> <Setter Property="View"> <ListView.View> <GridView> But it didnt work so I'm asking for your opinion?! Thanks.

    Read the article

  • Clever ways of implementing different data structures in C & data structures that should be used mor

    - by Yktula
    What are some clever (not ordinary) ways of implementing data structures in C, and what are some data structures that should be used more often? For example, what is the most effective way (generating minimal overhead) to implement a directed and cyclic graph with weighted edges in C? I know that we can store the distances in an array as is done here, but what other ways are there to implement this kind of a graph?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >